BIS fnc switchLamp: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "|eff= global |=" to "|eff= global |MPeff=") |
Lou Montana (talk | contribs) m (Text replacement - "|arg= global |=" to "|arg= global |MParg=") |
||
Line 6: | Line 6: | ||
|1.64|= Game Version (number surrounded by NO SPACES) | |1.64|= Game Version (number surrounded by NO SPACES) | ||
|arg= global |= Multiplayer Arguments | |arg= global |MParg= Multiplayer Arguments | ||
|eff= global |MPeff= Multiplayer Effects | |eff= global |MPeff= Multiplayer Effects |
Revision as of 22:05, 2 September 2019
Description
- Description:
- Switch streetlamp on/off
- Execution:
- call
- Groups:
- Uncategorised
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
- See also:
- switchLight
Notes
-
Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note