Endless loop using if/then/else as action inside a trigger ?
I want: If a if/then/else statement is FALSE it loops the if/then/else statement until it is TRUE.
I do NOT want: if the if/then/else statement is FALSE continue the trigger.
Basically I want to use a if/then/else statement inside a trigger to hold execution of all actions that come AFTER the if/then/else.
(in commodore 64 basic this is what i want to do inside a wc3 trigger)
10 A=0
20 A=A+1
30 IF A=10 then goto 40 ELSE goto 20
40 continue the program from here...because A has reached value 10 after 10 cycles in the if loop
(inside wc3 this is how for i got)
Event:
Game time of day is 06.50
Action:
Set Variable A=0
IF A=10 then (do nothing) else Set A=A+1 (and now I need a command to repeat the IF statement)
Floating Text 'Integer<A> is finally 10 and the if statement looped 10 times'
What Action do I use at the ELSE statement to loop the if/then after the Set A=A+1 statement?
---------------------------------------------------------------------------------------------
By the way:
Is there a boolean-check I can make on a Unit to see if its walking or not?
Thanks in advance SO much,
Carda
I want: If a if/then/else statement is FALSE it loops the if/then/else statement until it is TRUE.
I do NOT want: if the if/then/else statement is FALSE continue the trigger.
Basically I want to use a if/then/else statement inside a trigger to hold execution of all actions that come AFTER the if/then/else.
(in commodore 64 basic this is what i want to do inside a wc3 trigger)
10 A=0
20 A=A+1
30 IF A=10 then goto 40 ELSE goto 20
40 continue the program from here...because A has reached value 10 after 10 cycles in the if loop
(inside wc3 this is how for i got)
Event:
Game time of day is 06.50
Action:
Set Variable A=0
IF A=10 then (do nothing) else Set A=A+1 (and now I need a command to repeat the IF statement)
Floating Text 'Integer<A> is finally 10 and the if statement looped 10 times'
What Action do I use at the ELSE statement to loop the if/then after the Set A=A+1 statement?
---------------------------------------------------------------------------------------------
By the way:
Is there a boolean-check I can make on a Unit to see if its walking or not?
Thanks in advance SO much,
Carda
Last edited: