Using elseif
Does anyone have a working WAC example of using "elseif" ?
|
I have this, but the ELSE constantly prints to screen ???
if event(1) and event(4) and never() then Text("In Area 1 and switch 9 destroyed") elseif event(1) and event(5) and never() then Text("In Area 1 and switch 10 destroyed") elseif event(1) and event(6) and never() then Text("In Area 1 and switch 11 destroyed") else Text("What are you waiting for") endif |
What I'm looking for is a either or type of script. A decision made.
|
You speak Chinese too??? lol One of the hardest to understand of Boolan is the GRAMMER. Look hard you will see YOUR PROBLEMS
(you might combine 2 events to one, but too ardous) There is NO advantage to you using this trigger on that action, like loading your weapon back to front.....lol if trigger then action else if trigger then action endif endif that does exactly the same as. if trigger then action endif if trigger then action endif |
Quote:
Really confused on this ..... but here is my answer: if event(1) and event(4) and never() then Text("In Area 1 and switch 9 destroyed") elseif event(1) and event(5) and never() then Text("In Area 1 and switch 10 destroyed") elseif event(1) and event(6) and never() then Text("In Area 1 and switch 11 destroyed") else and never() then Text("What are you waiting for") endif I believe all you were missing on the ELSE command was the "and never() then" loop stopper. I hope this helps ! Dave |
I used a combination of both those suggestions to make it work as I needed a multiple choice, but not a mutlipe answer. Thanks.
One last peice: How do you delay an action as part of an IF, but not separately ??? has to be in the same IF statement. if 'some action' then Text("x") wave("wave.wav") *** delay for 3 seconds *** killssn(10000) endif |
if trigger and never() then
text("000000") wave("000000.wav") endif if chain(3) then ;//*** delay for 3 seconds *** killssn(10000) endif go have a look at dave61's site click his sig "M" |
Can't have it as a secondary follow-up, because of other multiple choices within the primary IF.
It needs to be in the IF itself. How do you delay an action as part of an IF, but not separately ??? has to be in the same IF statement. (NOT chained) if 'some action' then Text("x") wave("wave.wav") *** delay for 3 seconds *** killssn(10000) endif |
All times are GMT -5. The time now is 09:35 PM. |
Powered by vBulletin®