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

Help! Got a triggering problem...

Status
Not open for further replies.
Level 3
Joined
Jun 6, 2004
Messages
50
I don't know how many times I'v come across this, but in many trigger faq it says:

If <Something> then do <something> else do (Actions)

What does they mean by the last one? Okay, it might be simle, but I have missed something.
And also under some of this it says:

Loop - Actions

What does that mean? Where do I finde this?
 
Level 3
Joined
Jan 10, 2005
Messages
72
Well, hmm...the else actions are ones that are done in case that the first one aren't. For example,
If [music_playing=true](this is var) then do [Sound - Stop Music] else do (now another If/Then/Else) If [music_playing=false] than do [Sound - Play Music] else [Do nothing]
 
Level 4
Joined
Jan 3, 2005
Messages
91
here it is: if ALL conditions are true, then the actions after "then" are being executed. if any of the conditions fails, so in any other case, the actions after "else" are being executed.

So whenever you have an IF/THEN/ELSE statement, either stuff stated after "then" or after "else" is being run. small example:

IF:
- Dummy_Integer_Variable == 1
THEN:
- Send text message to all players -> "Variable is 1"
ELSE:
- Send text message to all players -> "Variable is not equal 1"

gl,

klovadis
 
Level 3
Joined
Jun 6, 2004
Messages
50
I think you missunderstood me there. I know what if/then/else is. But in some tutorials and other stuff like that there could be a trigger like:

If Dying unit equel to Footman then do create footman else do (Action)

I mean what the part 'Else do '(Action)'' is. Can't finde that option in the action-list.
 
Level 3
Joined
Jun 6, 2004
Messages
50
Okay, then we enter my second question...
What does they meen with 'Loop-Actions' ?
I'v seen screenshots from other trigger where they have that command and a whole lot of triggers after that. It seams like I need this trigger to get my multiboard to work.
 
Level 5
Joined
Jul 31, 2004
Messages
108
Loop Ations doesn't really mean anything like in this

Loops Actions
Events
Map initialization
Conditions
Actions
Player Group - Pick every player in (All players) and do (Actions)
Loop - Actions
Game - Display to (All players) the text: Loop Actions don't ...
-------- Unless --------
For each (Integer A) from 1 to 10, do (Actions)
Loop - Actions
For each (Integer B) from 1 to 5, do (Actions)
Loop - Actions
Unit - Create 1 Forum_Variable[(Integer B)] for Player 1 (Red) at (Center of (Playable map area)) facing Default building facing (270.0) degrees
It will make 10 of Forum_Varible 1-5 for Player 1

I'm pretty sure I did that right...
 
Level 4
Joined
Jan 3, 2005
Messages
91
Loop actions in general are used for doing a few commands multiple times, depending on few variables that change. I.e. we want to display the number from 1 to 10 to the users so we create a trigger:

For each (Integer A) from 1 to 10, do (Actions)
Loop - Actions:
- Display to (All Players) the text: String(Integer A)

This action, or any actions in the for-each>loop are being executed 10 times. In the case of your multiboard, I think these loops refer to every player (> the player number is a variable) or to every row/item.


klovadis
 
Status
Not open for further replies.
Top