• 🏆 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!

help with math

Status
Not open for further replies.
Level 3
Joined
Jan 9, 2006
Messages
27
Well, i am trying to make an ability called "fear"
E: unit casts an ability
C: ability = fear
A: Pick players[all enemys of casting unit]
unit group pick all units owned by picked player in
300 aoe from units point
disable controlling unit
order picked unit to ..*


*HERE is my problem, i have no idea how to calculate it, i want the units to run away from the casting unit eg:
casting unit pos = 250 / 300 picked unit pos = 400 / 800
order picked unit to 1600 / 6400

BUT! IF
casting unit pos = 10000 / 5000
picked unit pos = 9700/ 4700
order picked unit to 1600 / 6400

The problem is i want the unit to run away, depending on the position of both units, in a line where the picked unit could face the casting unit all the time, i hope you understand it and you can help me!
 
Status
Not open for further replies.
Top