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

plz help me whit trigger

Status
Not open for further replies.
Level 2
Joined
Aug 5, 2006
Messages
9
i try to make trigger that do: when gold hits 0 all of ur units die. but i cant make that
"all units die thing" javascript:emoticon(':(')
Sad !HELP!
 
Level 8
Joined
Nov 20, 2005
Messages
372
What you need:
2 Variables

1st.Boolream ( array 12 ) - PlayerWasDefeated (False)
2nd.UnitGroup (array 12 )- TempRemoveGroup(No group)

2 triggers ( bc of lagg )

1st trigger: Notice that player have no gold
Event: Time-Every 1,00 seconds of the game
Conditions:
Actions:
PlayerGroup-Pick every Player in all players and do (multiplicate actions)
If then do else do(Multiplicate actions)
Picked player slot status equal to is playing
PlayerWasDefeated(Playernumber of Player(Picked Player)) equal to False
Player - Picked playre current gold equal to 0
then do
Set PlayerWasDefeated ( Playernumber of Playser(Picked Player)) equal to true
Unitgroup Add group to unitgroup - Pick every unit owned by Player(Picked Player) and add picked unit to TempRemoveGroup ( Playernumber of Player (Picked player))
wait 0,10 seconds
Unitgroup-For each unit in TempRemoveGroup(Playernumber of Player(Picked Player))
and Order unit to stop
wait 0,10 seconds
Clear TempRemoveGroup(Playernumber of Player(Picked Player))

2nd trigger ( bc of lagg )

Event:A unit gets an order without point
Conditions:playerWasDefeated(playernumber of player(Owner of Unit(triggering unit))) equal to true
Actions:
Unit-Kill Triggering unit


Thats all.. Now you don't use any point and remove the units from the player...
 
Status
Not open for further replies.
Top