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

Unit arrives at a point

Status
Not open for further replies.
Level 4
Joined
Jan 30, 2012
Messages
61
Hello,

i have a problem....in a trigger i give a unit the order to move to a random point in a region...but if he is at the random point he shall move to another random point...how can i do that if he arrived the random point he will move to another point?


Hope for an fast answer...
 
Level 11
Joined
Dec 5, 2009
Messages
846
There are maybe another way but i guess this will work aswell
  • Untitled Trigger 002
    • Events
      • Time - Every 0.05 seconds of game time
    • Conditions
      • (Current order of (Your Unit) Not Equal to (Order(move))
    • Actions
      • Unit - Order YourUnit to Move To (Random point in (Your region))
The unit has to move not patrol nor attack-move otherwise this wont work.
 
Level 9
Joined
Apr 23, 2011
Messages
460
There are maybe another way but i guess this will work aswell
  • Untitled Trigger 002
    • Events
      • Time - Every 0.05 seconds of game time
    • Conditions
      • (Current order of (Your Unit) Not Equal to (Order(move))
    • Actions
      • Unit - Order YourUnit to Move To (Random point in (Your region))
The unit has to move not patrol nor attack-move otherwise this wont work.

This trigger will do nothing. You gave the order too quickly so units will stand there and do nothing. Try changing time to something like 2 or 3 seconds. Otherwise it gets a "new" order ever .05 seconds and doesn't have time to move.
 
Level 4
Joined
Jan 30, 2012
Messages
61
But the unit a helicopter and the all players (max 10) can call a helicopter... Have i to make a trigger each player??
 
Level 4
Joined
Jan 30, 2012
Messages
61
maybe you dont know what i want to?

So if the helicopter is called then at a random point of the map is a helicopter spawned... it shall fly to a random point and if the helicopter is at the random point which the helicopter moved to, he shall again move to a random point.....
 
Level 4
Joined
Jan 30, 2012
Messages
61
Which "Generic Unit Event" at "Events" is for moving to a point.....maybe this?


  • Events
    • Unit - A unit Is issued an order targeting a point
 
Level 4
Joined
Jan 30, 2012
Messages
61
Completly: I want a skill that calls a helicopter which are flying around the map but it shall not be clickable (because i can give the helicopter a order like move, patrol etc.) if i use locust it is unclickable so for spells,too but there is a spell to shoot a rocket to a helicopter.... this is so fucking hard to do....do you know a way??
 
Level 11
Joined
Dec 5, 2009
Messages
846
So if you "call" a helicopter? What do you mean with call on a helicopter?
Then it will move to a random point. Use my trigger but set the time to 2 or 3 seconds as khamarr suggested

EDIT: I didn't see your post above...
 
Last edited:
Level 9
Joined
Apr 23, 2011
Messages
460
Master please don't double (triple) post. Simply click the edit button on your last post and post there. Thank you. As for this system, it seems like you are separating this system or you only gave us a portion of the information. If you are separating this system into 3 + triggers, you might want to look to Jass for this system, otherwise a more complex GUI trigger may solve your solution. I don't have enough details (or time possibly) to help you much further but I'm certain if you expand on this post and tell us what your entire goal and give us a detailed explanation for this system and implication, we can help you create it :p.

Edit: With the information provided you need a few triggers made. I can make you one that allows you to not use locust units but also make it non-selectable. I assume you want GUI, which isn't my strongest coding method but I'll do my best. Will post it shortly.
 
Status
Not open for further replies.
Top