Jump to content
  • 0

Creating a sensor.


Renegade2k6

Question

7 answers to this question

Recommended Posts

  • 0
Check your mission.sqm file for class=sensors;
 
add this code before the } of that class and increase the items=# by one and Item# by last item#+1:
 
class Item#
{
position[]={distancefromwest,elevation,distancefromsouth};
a=100;
b=100;
rectangular=1
activationBy="WEST";
repeating=1;
interruptable=1;
age="UNKNOWN";
name="dome";
expCond="(vehicle player) in thislist;";
expActiv="dome = [] execVM ""dome.sqf"";";
expDesactiv="terminate dome; titleText [""You've left the dome"", ""PLAIN DOWN"", 3];";
class Effects
{
};
};

 

Link to comment
Share on other sites

  • 0

Better creating it with a script, then you can change the variable on the fly. 

 

http://community.bistudio.com/wiki/createTrigger

 

Really easy to do, I use them for my snowman loot drops..

Waits until the player is within a 10 meter radius then blasts out some festive tunes lol :)

 

If this works server side, it will be a lot easier for what  want to do :P Thanks

Link to comment
Share on other sites

  • 0
_nplayers = [];
while {true} do {
    {if((isPlayer _x) AND (_x distance [0,0,0] <= 1000) AND !(_x in _nplayers)) then {
        _nplayers = _nplayers + [_x];
        [nil,_x,"loc",rTITLETEXT,"You have entered the area","PLAIN DOWN",5] call RE;
        }forEach playableUnits;
    {if((isPlayer _x) AND (_x distance [0,0,0] >= 1000) AND (_x in _nplayers)) then {
        _nplayers = _nplayers - [_x];
        [nil,_x,"loc",rTITLETEXT,"You have left the area","PLAIN DOWN",5] call RE;
        };
        }forEach playableUnits;
sleep 1;
};

Have not tested this so I'm not sure if it works. Someone might be able to chime in and make this more efficient.

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...