Novahq.net Forum

Novahq.net Forum (https://novahq.net/forum/index.php)
-   Delta Force (https://novahq.net/forum/forumdisplay.php?f=101)
-   -   [DFX2] A use for Negative Variables (https://novahq.net/forum/showthread.php?t=48601)

Guest001 02-17-2018 12:25 AM

A use for Negative Variables
 
1 Attachment(s)
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...


All times are GMT -5. The time now is 06:45 AM.

Powered by vBulletin®