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 06-16-2011, 03:27 AM
M.M. is offline M.M.
M.M.'s Avatar
Mapping

Join Date: Jun 2011
Location: Zagreb, Croatia
Posts: 23

Confused What is mission Varible?

I see "Mission Varible" in events of many maps I downloaded, but what is it anyway???
Reply With Quote
  #2  
Old 06-16-2011, 03:46 AM
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
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.
__________________
Reply With Quote
  #3  
Old 06-16-2011, 09:05 AM
M.M. is offline M.M.
M.M.'s Avatar
Mapping

Join Date: Jun 2011
Location: Zagreb, Croatia
Posts: 23

Thanks dave61! But what to put? Equal, Greater Than, Greater Than or Equal To, Less Then, Less Then or Equal To???
Reply With Quote
  #4  
Old 06-16-2011, 10:15 AM
Luis is offline Luis
Luis's Avatar
N' gatz we truz

Join Date: Sep 2008
Location: Brazil
Posts: 256

Look at this:
Code:
Event 2: Player shoot at teammate

Triggers:
Group 1 has shot SSN 1

Actions:
Set Mission Var#1 to 1
In the .wac file i write this:
Code:
//*****************************
// PLAYER SHOOT TEAMMATE SSN 1
//*****************************

if eq(v1,1) and never() then
wave("happy1.wav",254)
endif
If the variable is equal 1 to 1, the .wac file will execute that sound or whatever you put there.
Reply With Quote
  #5  
Old 06-16-2011, 11:38 AM
M.M. is offline M.M.
M.M.'s Avatar
Mapping

Join Date: Jun 2011
Location: Zagreb, Croatia
Posts: 23

Thanks Luis! And you too dave61. Thanks both of you!!!
Reply With Quote
  #6  
Old 06-16-2011, 11:56 AM
SilentTrigger is offline SilentTrigger
-1PARA-

Join Date: Sep 2002
Location: Sweden
Posts: 3,972

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.
__________________
-1PARA-AlexKall

My photography website



Reply With Quote
  #7  
Old 06-16-2011, 12:12 PM
Luis is offline Luis
Luis's Avatar
N' gatz we truz

Join Date: Sep 2008
Location: Brazil
Posts: 256

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.
Reply With Quote
  #8  
Old 06-16-2011, 02:12 PM
SilentTrigger is offline SilentTrigger
-1PARA-

Join Date: Sep 2002
Location: Sweden
Posts: 3,972

Thanks for the info Luis!
__________________
-1PARA-AlexKall

My photography website



Reply With Quote
  #9  
Old 06-16-2011, 02:39 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 M.M. View Post
Thanks dave61! But what to put? Equal, Greater Than, Greater Than or Equal To, Less Then, Less Then or Equal To???
These actions commands can be used with mission variables:

;---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.
__________________
Reply With Quote
  #10  
Old 06-16-2011, 02:52 PM
M.M. is offline M.M.
M.M.'s Avatar
Mapping

Join Date: Jun 2011
Location: Zagreb, Croatia
Posts: 23

thx again dave61...
Reply With Quote
  #11  
Old 06-16-2011, 03:28 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
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 !
__________________
Reply With Quote
  #12  
Old 06-17-2011, 07:27 AM
M.M. is offline M.M.
M.M.'s Avatar
Mapping

Join Date: Jun 2011
Location: Zagreb, Croatia
Posts: 23

lol... Fun, good work!-Very good work...
Reply With Quote
  #13  
Old 06-17-2011, 11:42 PM
Guest001 is offline Guest001
Registered User

Join Date: Aug 2008
Posts: 4,971

Quote:
QUOTE=dave61;373124 No problem, glad I could help !
G'day Dave.
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
Reply With Quote
  #14  
Old 06-18-2011, 09:25 AM
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 stompem View Post
G'day Dave.
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
I don't think there's a preset value.

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.
__________________
Reply With Quote
  #15  
Old 06-20-2011, 02:04 AM
MERMITE is offline MERMITE
Registered User

Join Date: May 2006
Posts: 736

Quote:
Originally Posted by M.M. View Post
I see "Mission Varible" in events of many maps I downloaded, but what is it anyway???
Are a total waste of time, as a mapper and a very good one at that you will learn time, the meaning of Random, and it's affect in the game..in time in your life too!
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"
Reply With Quote
  #16  
Old 06-20-2011, 03:18 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 MERMITE View Post
Are a total waste of time, as a mapper and a very good one at that you will learn time, the meaning of Random, and it's affect in the game..in time in your life too!
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"
Try using an event to execute a .wac trigger. This "JOKER" would prefer to use a variable than to chase a ever-changing MED event.

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.
__________________
Reply With Quote
  #17  
Old 06-20-2011, 03:28 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 MERMITE View Post
as a mapper and a very good one at that
"M"
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.
Reply With Quote
  #18  
Old 06-20-2011, 10:45 PM
Guest001 is offline Guest001
Registered User

Join Date: Aug 2008
Posts: 4,971

I have achieved true random causality in my new map!
Using variables "M"
Reply With Quote
  #19  
Old 06-20-2011, 10:49 PM
Guest001 is offline Guest001
Registered User

Join Date: Aug 2008
Posts: 4,971

Game companies all use variables through necessity. It would be hopeless without them due to the complexity of the programming needed these days.
Reply With Quote
  #20  
Old 06-20-2011, 10:53 PM
Guest001 is offline Guest001
Registered User

Join Date: Aug 2008
Posts: 4,971

Quote:
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
What does this all mean? Where is it? What is it. Does it have any use?
Stomp
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

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


All times are GMT -5. The time now is 11:29 AM.




Powered by vBulletin®