• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Unit Group - Order problem

Status
Not open for further replies.
Level 3
Joined
Oct 3, 2008
Messages
41
To make it so more units could be ordered at once, I switched the Unit - Order trigger for Unit Group - Order. I also put a condition in (triggering unit belongs to player 12).
The problem is that units owned by players other and player 12 are still being moved by the trigger
 
Level 3
Joined
Oct 3, 2008
Messages
41
im not sure how to put triggers in post, and I'm not using WE, but i'll try to remember anyway:

  • Events
  • Time - Every 1.00 seconds of game time
  • Conditions
  • ((Triggering unit) belongs to an enemy of Player 1 (Red)) Equal to True
  • Actions
  • Unit Group - Order (Units in RegionA <gen>) to Attack-Move To (Center of RegionB <gen>)
can you please tell me what is wrong, and how to fix it
 
Level 12
Joined
Apr 15, 2008
Messages
1,063
"Triggering unit" usually referes to unit that triggred the trigger, but in this case the trigger runs without any unit acting.
What you need is
  • Events
    • Every 1.00 second of the game time
  • Actions
    • set uGroup = (Units in Region A owned by player 11)
    • Unit Group - Pick Every unit in uGroup
      • Set tPoint = Center of Region B
      • Order unit to Attack-move to tPoint
      • Custom script - "call RemoveLocation( udg_tPoint)
    • Custom Script - "call DestroyGroup( udg_uGroup)
You will need two global variables to run this trigger - point called tPoint and unit group called uGroup.
The custom script commands are there to prevent the map from leaking
 
Level 3
Joined
Oct 3, 2008
Messages
41
how do I put in this trigger? i cant find the action:

set uGroup = (units in Region A owned by player 11)

I can get the set uGroup = part, but I cant find the (units in Region A owned by player 11)
 
Level 3
Joined
Oct 3, 2008
Messages
41
thanks you so much, ive got it now.

One last question, will I need multiple variables for multiple regions?

edit: when I went to save it, it said there was an error:
Line 301: expected a code statement

it highlights this: "call RemoveLocation(udg_tpoint)
 
Last edited:
Status
Not open for further replies.
Top