View Single Post
  #1  
Old 02-17-2018, 12:25 AM
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, 0 views)
Reply With Quote