• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Unit Spawn Behind Target

Status
Not open for further replies.
Level 11
Joined
Jul 20, 2004
Messages
2,760
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
 
Level 7
Joined
May 16, 2004
Messages
355
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
 
Level 10
Joined
Apr 9, 2004
Messages
502
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
 
Level 7
Joined
May 16, 2004
Messages
355
Code:
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
 
Status
Not open for further replies.
Top