|
Delta Force Anything to do with the Delta Force series of games, DF1, DF2, LW, TFD, BHD, DFX, AF etc. |
|
Thread Tools | Search this Thread | Display Modes |
#1
|
||
|
What is mission Varible?
I see "Mission Varible" in events of many maps I downloaded, but what is it anyway???
|
#2
|
||
|
I use mission variables in my maps for communication between .wac and map events.
For example , I can set a mission variable with MED events and then create a .wac event to recognize the variable change. if eq(v10, 2) and never() then set(seatbelt, 0) endif The above script sees the med variable change and locks the player onto a vehicle seat. In reverse, you can use the .wac to set a variable for the med to see. if ssnarea(10000,1) and never then set(v2,0) endif The above .wac script sets the variable, when the MED sees the variable change and creates and MED action.
__________________
|
#3
|
||
|
Thanks dave61! But what to put? Equal, Greater Than, Greater Than or Equal To, Less Then, Less Then or Equal To???
|
#4
|
||
|
Look at this:
Code:
Event 2: Player shoot at teammate Triggers: Group 1 has shot SSN 1 Actions: Set Mission Var#1 to 1 Code:
//***************************** // PLAYER SHOOT TEAMMATE SSN 1 //***************************** if eq(v1,1) and never() then wave("happy1.wav",254) endif |
#5
|
||
|
Thanks Luis! And you too dave61. Thanks both of you!!!
|
#6
|
||
|
Whats the never() part for? Seen it many times but never got around to ask what it's purpose is as it seems to always be included in a IF statement.
|
#7
|
||
|
From the 'WAC TUTORIAL BY CHRISLEW200':
Ok this is the easiest one of the lot you have probobaly seen me use it allready in the previous examples what does the “NEVER” command do. The if never command normally follows another trigger it is to prevent the same event happening time and time again and not causing a wave file which is activated by a area trigger from playing over and over aslong as you are in that trigger. So quite simply the if never command/trigger makes sure a wac command only happens once. |
#8
|
||
|
Thanks for the info Luis!
|
#9
|
|||
|
Quote:
;---VARIABLE COMPARE ;eq(#,#) true if #==# ;ne(#,#) true if #!=# ;lt(#,#) true if #<# ;gt(#,#) true if #># ;le(#,#) true if #<=# ;ge(#,#) true if #>=# ;true(#) true if #!=0 ;false(#) true if #==0 ; ;---VARIABLE MODIFY ;set(var,#) set var to # ;add(var,#) add # to var ;sub(var,#) subtract # from var, clamp at 0 ;inc(var) add 1 to var ;dec(var) subtract 1 from var, clamp at 0 However , the ones' most commonly used are the eq(v#,#) equals and the set(v#,#) set variable commands.
__________________
|
#10
|
||
|
thx again dave61...
|
#11
|
||
|
No problem, glad I could help !
Btw, here's my little experiment with variables. Try this out in your .wac : if never then set(v100,59) ; cd s endif if elapse(1) then dec(v100) endif if elapse(2) then consol#("Seconds left",v100) consol("<CO30>Countdown to") // YELLOW TEXT COLOR CHANGE consol("<CO30>player death") // YELLOW TEXT COLOR CHANGE endif if eq(v90,0) and eq(v100,0) and never then text("Countdown finished") text("<CF500000>YOU'RE DEAD !") // RED TEXT COLOR CHANGE endif if chain(2) and never then killssn(10000) lose endif Hope ya like this !
__________________
|
#12
|
||
|
lol... Fun, good work!-Very good work...
|
#13
|
|||
|
Quote:
Do any particular variables have a preset value? IE: I have heard not to use v260 I am using v2,0 to v2,2 to trigger random actions in conjuction with "2nd time" even or odd numbered time playing |
#14
|
|||
|
Quote:
I never had to use any variables above v10 since the variables' value range is 0-10000. The only variables I've ever had problems with was in the 0 to 1.5 range.
__________________
|
#15
|
|||
|
Quote:
these Variables are but switches, thats all.. end of story, as you can see they are not used that often, thats why you see them here, jokers trying to IMPRESS each other with boring code ....blah blah...dave!! I have used them with great success for laying out an early morning Artillary barrage, complete with .ptl effect, smoke, noise, etc etc, but to be honest, they could have been done just as well with a 2-3 second chain .cmmd "M" |
#16
|
|||
|
Quote:
Get a clue, Mermite. Just when I think you've softened alittle you show your a$$. Who's trying to impress who ? You're beyond boring.
__________________
|
#17
|
||
|
I'm still lmao at that one !
As I remember, you're still all BLOW and no show, LOL @ you !
__________________
Last edited by dave61; 06-20-2011 at 03:42 PM. |
#18
|
||
|
I have achieved true random causality in my new map!
Using variables "M" |
#19
|
||
|
Game companies all use variables through necessity. It would be hopeless without them due to the complexity of the programming needed these days.
|
#20
|
|||
|
Quote:
Stomp |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How do i get N.I.L.E Mission Editor?? | bluehawk90y | Delta Force | 1 | 02-18-2007 09:23 AM |
mission objectves | Coopwarriors | Delta Force | 8 | 06-14-2005 05:55 AM |
How do I beat a particular mission? | Steve | Delta Force | 0 | 01-08-2004 09:06 PM |
QUESTIONS ABOUT A MISSION | irishdc | Delta Force | 1 | 01-04-2004 11:21 AM |
Mission Help | DebtMan | Delta Force | 2 | 12-01-2003 02:11 PM |