• 🏆 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 me with a trigger

Status
Not open for further replies.
Level 2
Joined
Mar 21, 2007
Messages
11
Does anyone know how to make a trigger where it will move all the units one player has to a region.

For example:
Events:
If variable Blank becomes 1.00
Conditions:
Actions:
Move all units owned by player red to Blank <gen>
 
Level 32
Joined
Oct 23, 2006
Messages
5,291
Move Units

To move all units of a certain player to a specific region use a variation of this trigger:

  • Move Units
    • Events
      • Time - Elapsed game time is 15.00 seconds
    • Conditions
    • Actions
      • Set region = (Center of Region 000 <gen>)
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units in (Playable map area) owned by Player 1 (Red)) and do (Unit - Move (Picked unit) instantly to region)
      • Custom script: call RemoveLocation(udg_region)
Specify an event that meets your needs.

Note: "region" is a point variable.
 
Level 8
Joined
Feb 4, 2007
Messages
389
I think what he was asking is how he would check if his variable was equal to 1.

This should work (Done without WE)

E-
Every x seconds of game

C-
IntegerVar is less than or equal to 1.00

A-
Set region = (Center of Region 000 <gen>)
Custom script: set bj_wantDestroyGroup = true
Unit Group - Pick every unit in (Units in (Playable map area) owned by Player 1 (Red)) and do (Unit - Move (Picked unit) instantly to region)
Custom script: call RemoveLocation(udg_region)
 
Status
Not open for further replies.
Top