BIS_fnc_switchLamp

From Bohemia Interactive Community
Jump to: navigation, search
Introduced with Arma 3 version 1.64
  Arguments of this scripting function don't have to be local to the client the function is executed onEffects of this scripting function are broadcasted over the network and happen on every computer in the network

Click on the images for descriptions

Introduced in

Game:
Arma 3
Version:
1.64

Description

Description:
Switch streetlamp on/off

Syntax

Syntax:
[object, state] call BIS_fnc_switchLamp
Parameters:
object: Object - Street Lamp
state: Bool - true to turn lamp on, false to turn it off
Return Value:
Nothing

Examples

Example 1:
// Switches all lamps off in a radius of 200m private _lampsIn200m = nearestObjects [player, ["Lamps_base_F", "PowerLines_base_F", "PowerLines_Small_base_F"], 200]; { [_x, false] call BIS_fnc_switchLamp; } forEach _lampsIn200m;
Example 2:
// Simulates a damaged street light aLamp spawn { private _lamp = param [0, objNull, [objNull]]; while { player distance _lamp < 200; } do { [_lamp, selectRandom [ true, false ]] call BIS_fnc_switchLamp; sleep 0.1 + random 0.5; }; };

Additional Information

Execution:
call
Multiplayer:
-
See also:
switchLight

Notes

Only post proven facts here. Report bugs on the feedback tracker. Use the talk page or the forums for discussions.
Add New Note | How To

Bottom Section