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

A simpler question

Status
Not open for further replies.
Level 10
Joined
Apr 9, 2004
Messages
502
Since no one can answer ym other question i'll tryt his one.

How can i get it to check not for 1 specific angle, but for and area of an angle. As in the angle can be anything within 30 degrees of another angle.

How do i trigger that?


Once again in simplest form.

How do i trigger it to check for a certain amount of degrees from an angle that i already know?
 
Level 11
Joined
Jul 20, 2004
Messages
2,760
If (AngleBetweenPoints(GetUnitLoc(cast), GetUnitLoc(targ))>30 and AngleBetweenPoints(GetUnitLoc(cast), GetUnitLoc(targ))<60)

Practically you check if the unit is in the angle between 30 and 60 of the position of casting unit and the targeted unit. If you want to base it on the facing of the unit you can use instead of GetUnitLoc(Cast) the FacingAngle(cast).

~Daelin
 
Level 10
Joined
Apr 9, 2004
Messages
502
yours has two units daelin. I'm not detecting the random angle between two units. I'm detecting the change in my guy's angle. I want to check if he's facing (180 +/-75 degrees) from where he was facing last time the trigger checked.


I'd trying to make it so that he slows down if while he's moving, he turns around.

Still i think you're could still work with a little change in the units.
 
Status
Not open for further replies.
Top