Sensor Class Problems

taikonaut

Member
Hey Survivors,

here´s one for you... I have this Sensor-Class in my mission.sqm

Code:
class Item0
        {   
            position[]={4691,0.436,13432};
            a=200;
            b=200;
            rectangular=1;
            activationBy="WEST";
            repeating=1;
            interruptable=1;
            age="UNKNOWN";
            name="sensor1";
            expCond="(vehicle player) in thislist;";
            expActiv="sensor1= [] execVM ""scripts\amazingone\sensor_enter.sqf"";";
            expDesactiv="terminate sensor1; titleText [""You've left the Sensor."", ""PLAIN DOWN"", 3];";
            class Effects;
        };

All is fine, works great, hooray!

Now I want to start a script on leaving the sensor... I figured changing it to:

Code:
class Item0
        {   
            position[]={4691,0.436,13432};
            a=200;
            b=200;
            rectangular=1;
            activationBy="WEST";
            repeating=1;
            interruptable=1;
            age="UNKNOWN";
            name="sensor1";
            expCond="(vehicle player) in thislist;";
            expActiv="sensor1= [] execVM ""scripts\amazingone\sensor_enter.sqf"";";
            expDesactiv="sensor1= [] execVM ""scripts\amazingone\sensor_leave.sqf"";";
            class Effects;
        };

Computer says NO... Sensor is broken. Strangely enough, I failed to find a proper documentation about the sensor stuff, esp. "expDesactiv".

Anybody got an idea how to do it?
 
F2K Sel from http://forums.bistudio.com pointed out a possible error here....

http://forums.bistudio.com/showthread.php?169982-Sensors-executing-script-on-leaving

According to him, the sensor must not have the name "sensor"... so somethink like

Code:
...
name="awsomeness";
expCond="(vehicle player) in thislist;";
expActiv="sensorEnter= [] execVM ""scripts\awesome\sensor_enter.sqf"";";
expDesactiv="sensorLeave= [] execVM ""scripts\awesome\sensor_leave.sqf"";";
...

should be working.

Need to test it tonight, though.
 
Back
Top