Jump to content
Hossus

Lock Doors Random in Trigger Area

Recommended Posts

HI

I'm, using   the Breaching Charge Mod , what im trying to do is Locking Doors in a Trigger Area Random  on oure Dedicated Server but i cant get it to work .

i absoluty have no clue how to do this to be honest

 

some help would be appreciated.

Share this post


Link to post
Share on other sites

Place your trigger with an area (circle preferred)

set the condition to TRUE  (always met)

make it server only, as reference for every players. You don't want the players to have different locked doors;

 

in on activation field of the trigger:

{
  _nbDoors = getNumber (configfile >> "CfgVehicles" >> typeOf _x >> "numberOfDoors");
  for "_i" from 0 to _nbDoors - 1 do {
    _var = format ["bis_disabled_Door_%1", _i];
    _x setVariable [_var,selectRandom [0,1],true]
  }
}forEach (nearestTerrainObjects [getpos thisTrigger,["house","building","tourism"],(triggerArea thisTrigger) select 0]);

 

  • Like 3
  • Thanks 1

Share this post


Link to post
Share on other sites

Works like a charm

Thx Man

 

Btw. your mods are great

  • Like 2

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×