BIS fnc moduleLightning: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "\|gr([0-9]+) = " to "|gr$1= ") |
Lou Montana (talk | contribs) m (spaces → tab) |
||
Line 21: | Line 21: | ||
|x1= <code>[[player]] [[addAction]] | |x1= <code>[[player]] [[addAction]] | ||
[ | [ | ||
"Eat that!", | |||
{ | |||
[<nowiki/>[[cursorTarget]],[[nil]],[[true]]<nowiki>]</nowiki> [[spawn]] [[BIS_fnc_moduleLightning]]; | |||
[[cursorTarget]] [[setDamage]] 1; | |||
}, | |||
[], | |||
1.5, | |||
[[true]], | |||
[[true]], | |||
"", | |||
"![[isNull]] [[cursorTarget]]" | |||
];</code> | ];</code> | ||
|x2= <code>[] [[spawn]] | |x2= <code>[] [[spawn]] {{cc|Who gets hit first? ;-)}} | ||
{ | { | ||
{ | |||
[_x,[[nil]],[[true]]<nowiki>]</nowiki> [[spawn]] [[BIS_fnc_moduleLightning]]; | |||
[[sleep]] [[random]] 5; | |||
} [[forEach]] ([[allMissionObjects]] "" [[call]] [[BIS_fnc_arrayShuffle]]); | |||
};</code> | };</code> | ||
|seealso= | |seealso= [[Arma 3 Zeus]] | ||
}} | }} |
Revision as of 23:05, 26 April 2021
Description
Syntax
- Syntax:
- [target, nil, activate] call BIS_fnc_moduleLightning
- Parameters:
- target: Object - Where the lightning bolt hits.
- nil: Nothing - Not used
- activate: Boolean - true to activate, false does nothing
- Return Value:
- Nothing
Examples
- Example 1:
player addAction [ "Eat that!", { [cursorTarget,nil,true] spawn BIS_fnc_moduleLightning; cursorTarget setDamage 1; }, [], 1.5, true, true, "", "!isNull cursorTarget" ];
- Example 2:
[] spawn // Who gets hit first? ;-) { { [_x,nil,true] spawn BIS_fnc_moduleLightning; sleep random 5; } forEach (allMissionObjects "" 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