• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece!🔗 Click here to enter!

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