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

Needs help in makin a trigger like this

Status
Not open for further replies.
Level 10
Joined
Jul 22, 2008
Messages
363
I want it so that when when all units are in a region are dead then one person wins. You choose your unit outside of the region and when you pick your unit it goes in the region. So i need it so that when there are no units in this region then Player whatever wins. Help would be very appreciated.:grin:
 
Level 10
Joined
Jul 22, 2008
Messages
363
More like one Big Guy trying to kill other guys (like island defence) once all the little guys are dead there units dissapear to so its once there are no more little guys on island then the Big Guy wins. Problem Is I have no idea how to make this trigger.
 
Level 18
Joined
Sep 27, 2005
Messages
2,069
yes :)

make one unit type variable named smallguys - and tick the array field - now if you have 10 small guys type in 10 in the array field. If 5 type 5.

Trigger 1

Time elapsed is 1 second

action:

set variable smallguys(1) = small guy owned by player one red

The (1) is the index - you have an array variable -

set variable smallguys(2) = small guy owned by player two blue
set variable smallguys(3) = small guy owned by player three

etc. One variable for all guys = array variable

every 0.01 seconds of game

smallguys(1 - 10) not equal to alive

victory for big guy
 
Level 18
Joined
Sep 27, 2005
Messages
2,069
More like one Big Guy trying to kill other guys (like island defence) once all the little guys are dead there units dissapear to so its once there are no more little guys on island then the Big Guy wins. Problem Is I have no idea how to make this trigger.

It is a vampirism type thing. One guy needs to kill all the guys one the map and then he wins.
 
Level 18
Joined
Sep 27, 2005
Messages
2,069
"so its once there are no more little guys on island then the Big Guy wins"

On the island I think he got confused on the original post anyway :D
However it seems that your solution would work if all the little guys unit die, but he wanted to make it when just the main little guy dies.

If you have ever played a tag game its like that.
 
Level 11
Joined
May 31, 2008
Messages
698
This should work, just set the time elapsed part to a time that all "little guys" have spawned but the "big guy" hasnt spawned yet. Also where you set the builders_players to allies of player 1, player 1 must be a little guy and i think he has to be in the game too (not sure tho).

  • Untitled Trigger 002
    • Events
      • Time - Elapsed game time is 60.00 seconds
    • Conditions
    • Actions
      • Set builders_players = (All allies of Player 1 (Red))
      • Player Group - Pick every player in builders_players and do (Actions)
        • Loop - Actions
          • Unit Group - Pick every unit in (Units owned by (Picked player)) and do (Actions)
            • Loop - Actions
              • Set builders_units = (Last created unit group)
              • Wait until ((Number of units in builders_units) Equal to 0), checking every 0.10 seconds
              • Game - Victory Player 12 (Brown) (Show dialogs, Show scores)
              • Player Group - Pick every player in builders_players and do (Game - Defeat (Picked player) with the message: Defeat!)
Variables:
builders_units is a unit group (no array)
builders_players is a player group (no array)

____________________
give rep to those who help you!
 
Level 10
Joined
Jul 22, 2008
Messages
363
I am having trouble finding the set (my variable trigger)= (allies of player one red) Where is the ally to trigger? This may be a noob question because I may not be looking closely and thanks for the patience.
  • Events
    • Time - Every 0.01 seconds of game time
  • Actions
    • Player Group - Pick every player in (All allies of Player 1 (Red)) and do (Actions)
      • Loop - Actions
        • Game - Victory Player 12 (Brown) (Show dialogs, Show scores)
        • Player Group - Pick every player in (All allies of Player 1 (Red)) and do (Game - Defeat (Picked player) with the message: Defeat!)
This is as far as I could get with the trigger because I cannot find half of the other stuff......
 
Last edited:
Status
Not open for further replies.
Top