• 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.

Ugh goddamn facing angles!

Status
Not open for further replies.
Level 2
Joined
Nov 19, 2006
Messages
11
This worked the first time i tested it, heres the thing. I want this spell to do initial damage, then it releases 3 more spells if the targets back is facing to the caster. The 3 extra spells work, but then if i hit the target in front itll still cast the 3 extra spells, im doing something wrong with my facing angles not sure what though.

Code:
Actions
    Set Shurikencaster = (Casting unit)
    Set Shurikentarget = (Target unit of ability being cast)
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        If - Conditions
            (Facing of Shurikencaster) Greater than or equal to ((Facing of Shurikentarget) - 150.00)

you guys see wahts wrong with the If-Conditions? I want the trigger to work under the condition that the Shurikentarget is facing away from shurikencaster
 
Level 6
Joined
Apr 28, 2005
Messages
155
Aye laddy!

(Facing of Shurikencaster) Greater than or equal to ((Facing of Shurikentarget) - 150.00)

That means it'll work only if the facing is identical or lower (if the target is faced more to the right(clockwise)). If the target is faced more to the left than the caster, its facing degree is higher! (casters facing + a little)

If you want the target to be able to be turned a little to the right as well as left, you should have "facing of target + (random real number between -150 and 150)".

The fact that you can hit the front and still to damage is because 150 degrees is almost half a turn!!! 360 is a whole turn, and 180 is a half.
I'd put about +-45 degrees instead of 150. That'll be a quarter of a circle.

You could also make the spell do less damage the further away from the back of the target it hits. If you want to know how just message me.
 
Level 6
Joined
Apr 28, 2005
Messages
155
I'm answering your PM here because I noticed another error(too obvious to notice right away).

(Facing of Shurikencaster) Greater than or equal to ((Facing of Shurikentarget) - 150.00)

Shurikencaster and Shurikentarget must switch place. And like I said before, instead of having -150, make it Equal to (random number between -45 and 45)
I think that will work, but I'm tired so who knows.

And as to how you make it do more damage the closer to the back it hits... I forgot :(
 
Status
Not open for further replies.
Top