BIS fnc moduleLightning: Difference between revisions
Jump to navigation
Jump to search
m (moved to category "curator") |
Lou Montana (talk | contribs) m (Text replacement - "(\|[pr][0-9]+ *= *[^- ]*) *- *W([a-z ])" to "$1 - w$2") |
||
(47 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
{{RV|type=function | |||
|game1= arma3 | |||
|version1= 1.16 | |||
| | |gr1= Modules | ||
| | |descr= Zeus lightning strike. | ||
{{Feature|important|Note that ''target'' will be deleted by the function (part of how Zeus modules work).}} | |||
| | |s1= [target, nil, activate] call [[BIS_fnc_moduleLightning]] | ||
|p1= target: [[Object]] - where the lightning bolt hits - '''will''' be deleted by the function! | |||
|p2= nil: [[Nothing]] - not used | |||
|p3= activate: [[Boolean]] - [[true]] to activate, [[false]] does nothing | |||
|r1= [[Nothing]] | |||
| <! | |x1= <sqf>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" | |||
];</sqf> | |||
| | |x2= <sqf>[] 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); | |||
};</sqf> | |||
|seealso= [[Arma 3 Zeus]] | |||
}} | }} | ||
Latest revision as of 16:35, 8 November 2023
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:
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