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

If /then/else.

Status
Not open for further replies.
Level 4
Joined
Feb 26, 2010
Messages
42
Hi every one.I would like to know where is if/then/else triggers.Are there anythin like that.For example i want to make a trigger in order to create units for player when player status is equal to "is playing" else do nothing.What about that??
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
They are the same as normal C conditional structures.

Code:
if(bool){
}else if(bool){
//... (many more can go here)
}else{
}
Sadly galaxy is like a sort of watered down C thus the bracers between code blocks are required in all cases (even if you want just a single statement).

They also did impliment them in GUI, but who really uses that.
For the GUI ones you need to add a multiple if then else action and then add individual elements to that (right click and choose add element).
 
Status
Not open for further replies.
Top