Warcraft III resources & community, 2003–2006 · archived

Unit Spawn Behind Target

15 posts
#1

Unit Spawn Behind Target

is there a way to make it so a unit always appears behind someone, not beside or in front, BEHIND! any help will be great! :D
#2
I faced the same problem as you, use an equation that reverses the facing of the casting unit
#3
ummm i dont understand :oops:
#4
Create Unit At Point with Polar Offset(Position of (UNIT YOU WANT) offset by (OFFSET YOU WANT) towards ((Facing Angle of (UNIT YOU WANT))+180).

~Daelin
#5
hmm it didnt work..... it worked when i was facing one way but when i use it on a unit while i was facing the other way the unit appeared beside the target....
#6
Hmm... I got now what you really need. Just keep moving the unit and use an endless for or something... In which you should include a condition as well if to skip remaining actions. And keep moving the unit behind. This spell should give you more info:

Try this spell and just change it so the unit is always BEHIND the unit instead of IN FRONT of the unit. http://www.wc3sear.ch/index.php?p=Spells&ID=774&sid=edd4f69d0b6aca06cb37e6049e679385

~Daelin
#7
hmmm this would be help if i knew how to do JASS!
#8
Okay look, no1 really needs jass, you can do most things jass can just as easily with normal triggers. Heres how i got mine towork nicely. Every time it spawned i set an if then else statement, if the facing og the unit was 180 or lower then it spawned the unit at facing+ 180 degrees. Else facing-180

This worked nicly and now it spawns in the right place
#9
where can i find the condition involving the unit facig somewhere?
#10
there's no such condition. It's checked during the placement action with you use polar placement (im a bit rusty with my trig linguo, haven't trigged in a while)

but yeah, no such condintion i dont think. Thing is, it should Always spawn behind your hero if it's set right. However, some things that might affect yours is perhaps other units in which the unit cannot be placed directly behind and thus uis placed beside. Another thing is offset, which will affect where the unit goes (has to be far enough away).

that's all i got
#11
this is not working can some one please just post the exact trigger, and i want the unit to spawn a little bit away from the target unit of the spell.
#12
show us what you made and we can fix it
#13
i havn't started yet, just post the trigger that creates a unit behind the target unit of the spell!
#14
Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        If - Conditions
            (Facing of FireWalkCaster) Less than or equal to 180.00
        Then - Actions
            Unit - Create 1 dummy1 for (Owner of FireWalkCaster) at ((Position of FireWalkCaster) offset by 50.00 towards ((Facing of FireWalkCaster) + 180.00) degrees) facing Default building facing degrees
            Unit - Add a 10.00 second Generic expiration timer to (Last created unit)
        Else - Actions
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                If - Conditions
                    (Facing of FireWalkCaster) Greater than or equal to 181.00
                Then - Actions
                    Unit - Create 1 dummy1 for (Owner of FireWalkCaster) at ((Position of FireWalkCaster) offset by 50.00 towards ((Facing of FireWalkCaster) - 180.00) degrees) facing Default building facing degrees
                    Unit - Add a 10.00 second Generic expiration timer to (Last created unit)
                Else - Actions
                    Do nothing
 


There, this worked for me very nicely
#15
hey tanks this works perfectly! :o