Go Back   Novahq.net Forum > Games > Joint Operations
FAQ Community Calendar Today's Posts Search

Joint Operations Anything about the Joint Operations series of games.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 02-16-2018, 11:34 PM
Guest001 is offline Guest001
Registered User

Join Date: Aug 2008
Posts: 4,971

A use for Negative Variables

The MEd clamps vars at 0 but you can still use them for some useful things...
Negative vars can be used to control how long before the next trigger...
This way you can keep the rest of your vars (in this case vars above v10,0) for other triggers.

You need...
Area 1
Area 2
Area 3
Your triggers

Player starts in area 1 (Reasons for this? Don't ask)

If it it takes 2 minutes to get in and out of area 2 then it will be 2 minutes before area 3 triggers the rescue Helo.

Code:
if area(1) and never() then
set(v10)
endif

if area(2) then
Dec(v10)
endif

if area(3) then
Inc(v10)
endif

if eq(v10,1) and never() then
text("Rescue Helicopter On The Way!")
endif
DFX2 EXAMPLE MAP BELOW...
Attached Files
File Type: zip Variables_Dec_v1001.zip (2.1 KB, 1 views)

Last edited by Guest001; 02-16-2018 at 11:55 PM.
Reply With Quote
Reply


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

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 06:54 PM.




Powered by vBulletin®