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

How to make neutrals run away from units that run close

Status
Not open for further replies.
Level 14
Joined
Mar 27, 2008
Messages
1,003
Basically I need to figure out a trigger that makes it so when any unit nears (gets within 250 distance) a unit (this unit is a deer in my map), the deer will run 1000 distance in a random direction away from the nearing unit. How would I go about doing that?
 
Level 21
Joined
Nov 4, 2013
Messages
2,017
  • Run Away Deer!
  • Events
    • Unit - A unit comes within 250 range of Deer
  • Conditions
  • Actions
    • Order Deer to Move To ((Position of (Deer)) offset by 1000 towards (Random real number between 0.00 and 360.00) degrees)
If you need help to make the triggers, I'll tell you how to do them.
Use variables for the position, I am just too lazy to put them.
 
Level 14
Joined
Mar 27, 2008
Messages
1,003
  • Run Away Deer!
  • Events
    • Unit - A unit comes within 250 range of Deer
  • Conditions
  • Actions
    • Order Deer to Move To ((Position of (Deer)) offset by 1000 towards (Random real number between 0.00 and 360.00) degrees)
If you need help to make the triggers, I'll tell you how to do them.
Use variables for the position, I am just too lazy to put them.

What exactly do you mean use variables for the position? Do I have to make a "Real" variable?
 
Status
Not open for further replies.
Top