BIS fnc moduleLightning: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "<code>([^<]*)\[\[([a-zA-Z][a-zA-Z0-9_]+)\]\]([^<]*) *<\/code>" to "<code>$1$2$3</code>") |
Lou Montana (talk | contribs) m (Text replacement - "<code>([^<]*)\[\[([a-zA-Z][a-zA-Z0-9_]+)\]\]([^<]*) *<\/code>" to "<code>$1$2$3</code>") |
||
Line 24: | Line 24: | ||
{ | { | ||
private _tempTarget = createSimpleObject ["Land_HelipadEmpty_F", getPosASL cursorTarget]; | private _tempTarget = createSimpleObject ["Land_HelipadEmpty_F", getPosASL cursorTarget]; | ||
[_tempTarget, nil, true] | [_tempTarget, nil, true] spawn [[BIS_fnc_moduleLightning]]; | ||
[[cursorTarget]] [[setDamage]] 1; | [[cursorTarget]] [[setDamage]] 1; | ||
}, | }, | ||
Line 40: | Line 40: | ||
private _tempTarget = createSimpleObject ["Land_HelipadEmpty_F", getPosASL _x]; | private _tempTarget = createSimpleObject ["Land_HelipadEmpty_F", getPosASL _x]; | ||
[_tempTarget, nil, true] spawn BIS_fnc_moduleLightning; | [_tempTarget, nil, true] spawn BIS_fnc_moduleLightning; | ||
sleep (1 + [[random]] 4); | |||
} [[forEach]] ([[allPlayers]] [[call]] [[BIS_fnc_arrayShuffle]]); | } [[forEach]] ([[allPlayers]] [[call]] [[BIS_fnc_arrayShuffle]]); | ||
};</code> | };</code> |
Revision as of 21:40, 12 July 2022
Description
Syntax
- Syntax:
- [target, nil, activate] call BIS_fnc_moduleLightning
- Parameters:
- target: Object - Where the lightning bolt hits - will be deleted by the function!
- nil: Nothing - Not used
- activate: Boolean - true to activate, false does nothing
- Return Value:
- Nothing
Examples
- Example 1:
player addAction [ "Eat that!", { private _tempTarget = createSimpleObject ["Land_HelipadEmpty_F", getPosASL cursorTarget]; [_tempTarget, nil, true] spawn BIS_fnc_moduleLightning; cursorTarget setDamage 1; }, [], 1.5, true, true, "", "!isNull cursorTarget" ];
- Example 2:
[] spawn // Who gets hit first? ;-) { { private _tempTarget = createSimpleObject ["Land_HelipadEmpty_F", getPosASL _x]; [_tempTarget, nil, true] spawn BIS_fnc_moduleLightning; sleep (1 + random 4); } forEach (allPlayers call BIS_fnc_arrayShuffle); };
Additional Information
- See also:
- Arma 3 Zeus
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