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

[Solved] Order creeps owned by player 12(vJass)

Status
Not open for further replies.
Level 4
Joined
Apr 7, 2012
Messages
63
I would like someone to tell me how to create a vjass script to order a creep when my hero comes in range of it for example if my Paladin is in 350 range of the Gnoll Warrior, the script then orders the gnoll to attack the paladin, if it moves more than 1500 range away from the point where it was when it met the paladin, the script then orders it to back again to that point.

This might be more than one script.
Someone please help, +rep .
I understand most concepts of vjass and i can make spells, just not sure the way i should write this type of script.
 
Level 37
Joined
Mar 6, 2006
Messages
9,243
You could register each unit with TriggerRegisterUnitInRange or you could periodically pick unit within range of the hero. When there is a unit in range, add it into a group or linked list of units for example. Periodically loop through the units and check their distance to the hero. If it is > 1500 order it to retreat.

If you can code spells in vjass then this should be no problem.
 
Status
Not open for further replies.
Top