Go Back   Novahq.net Forum > Games > Delta Force

Delta Force Anything to do with the Delta Force series of games, DF1, DF2, LW, TFD, BHD, DFX, AF etc.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 10-30-2009, 09:50 AM
Navigator is offline Navigator
Navigator's Avatar
Registered User

Join Date: Aug 2009
Location: 5 hrs left of center
Posts: 54

Using elseif

Does anyone have a working WAC example of using "elseif" ?
Reply With Quote
  #2  
Old 10-30-2009, 02:35 PM
Navigator is offline Navigator
Navigator's Avatar
Registered User

Join Date: Aug 2009
Location: 5 hrs left of center
Posts: 54

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
Reply With Quote
  #3  
Old 10-30-2009, 02:56 PM
Navigator is offline Navigator
Navigator's Avatar
Registered User

Join Date: Aug 2009
Location: 5 hrs left of center
Posts: 54

What I'm looking for is a either or type of script. A decision made.
Reply With Quote
  #4  
Old 10-30-2009, 05:01 PM
MERMITE is offline MERMITE
Registered User

Join Date: May 2006
Posts: 736

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
Reply With Quote
  #5  
Old 10-30-2009, 06:13 PM
dave61 is offline dave61
dave61's Avatar
I.C.U.

Join Date: Jul 2005
Location: Here & There
Posts: 2,155

Send a message via Yahoo to dave61
Quote:
Originally Posted by gorlosky View Post
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
gorlosky,

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
__________________

Last edited by dave61; 10-30-2009 at 06:45 PM.
Reply With Quote
  #6  
Old 10-31-2009, 12:45 PM
Navigator is offline Navigator
Navigator's Avatar
Registered User

Join Date: Aug 2009
Location: 5 hrs left of center
Posts: 54

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
Reply With Quote
  #7  
Old 10-31-2009, 01:05 PM
MERMITE is offline MERMITE
Registered User

Join Date: May 2006
Posts: 736

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"
Reply With Quote
  #8  
Old 10-31-2009, 02:24 PM
Navigator is offline Navigator
Navigator's Avatar
Registered User

Join Date: Aug 2009
Location: 5 hrs left of center
Posts: 54

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
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 04:01 PM.




Powered by vBulletin®