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

Trigger / Variable Question

Status
Not open for further replies.
Level 2
Joined
Jun 12, 2006
Messages
13
Suppose I want to construct an event that causes one unit to spawn for each of 8 players (Whichever ones are playing) in the center of a region.

Now, I understand the region portion, and the unit selected to spawn. The thing I want to use is a variable to select each of the 8 players and spawn one of thsoe units for them. I also want this trigger to tell which players are currently playing (Suppose 7 are playing, not 8), and only spawn those players this unit.
 
Level 2
Joined
Jun 12, 2006
Messages
13
You say it's easy, yet it doesn't work. I've input everything in exactly as you said (Assuming the *starred* parts are values I fill in), and it doesn't work.

Of course, that's assuming I got this right:

help0eg.jpg
 
Level 3
Joined
May 6, 2006
Messages
44
how about making the triggers invidivually for each player?


Event: *event to make the units

Conditions: *Player 1 equal to playing true blah blah

Action Create # of UNIT for PLAYER at RECT facing # Degrees

might work...
 
Level 2
Joined
Jun 12, 2006
Messages
13
Yea, that'll work easily noob, but the thing is, I want to be conservative with my triggers. Any extra triggers that may not be needed, I don't want. Thus using variables rather than individual players. The more triggers, the more lag. Even the more actions in a trigger is more lag. Especially for older machines.
 
Level 8
Joined
Nov 20, 2005
Messages
372
For each integer from 1 to *Playernumbers*
If Player[For Integer A] slot status equal to playing
then do Unit-Create *numberofunits* *unittype* for Player[For Integer A] at *yourrect* facing *yourdegrees* degrees <<<<<<<<< This MUST work....

because I have it in my map too and that still works!
Oah and , better to have not the event at map init.
Then it could be that it doesn'T work. Better to make it so:
Time - Elapsed Game time equal to 1 seconds

etc.
 
Status
Not open for further replies.
Top