BIS fnc moduleLightning: Difference between revisions
Lou Montana (talk | contribs) m (Text replacement - "<code>([^<]*)\[\[([a-zA-Z][a-zA-Z0-9_]+)\]\]([^<]*) *<\/code>" to "<code>$1$2$3</code>") |
m (Update note author) |
||
(9 intermediate revisions by 2 users not shown) | |||
Line 7: | Line 7: | ||
|descr= Zeus lightning strike. | |descr= Zeus lightning strike. | ||
{{Feature|important|Note that ''target'' will be deleted by the function (part of how Zeus modules work).}} | {{Feature|important|Note that the ''target'' object will be deleted by the function (part of how Zeus modules work) if it can be edited by any curators (which is checked by the [[objectCurators]] command).}} | ||
|exec= spawn | |||
|s1= [target, nil, activate] call [[BIS_fnc_moduleLightning]] | |s1= [target, nil, activate] call [[BIS_fnc_moduleLightning]] | ||
|p1= target: [[Object]] - | |p1= target: [[Object]] - where the lightning bolt hits - '''will''' be deleted by the function! | ||
|p2= nil: [[Nothing]] - | |p2= nil: [[Nothing]] - not used | ||
|p3= activate: [[Boolean]] - [[true]] to activate, [[false]] does nothing | |p3= activate: [[Boolean]] - [[true]] to activate, [[false]] does nothing | ||
Line 19: | Line 21: | ||
|r1= [[Nothing]] | |r1= [[Nothing]] | ||
|x1= < | |x1= <sqf>player addAction | ||
[ | [ | ||
"Eat that!", | "Eat that!", | ||
Line 32: | Line 34: | ||
true, | true, | ||
"", | "", | ||
"! | "!isNull cursorTarget" | ||
];</ | ];</sqf> | ||
|x2= < | |x2= <sqf>[] spawn // Who gets hit first? ;-) | ||
{ | { | ||
{ | { | ||
Line 42: | Line 44: | ||
sleep (1 + random 4); | sleep (1 + random 4); | ||
} forEach (allPlayers call BIS_fnc_arrayShuffle); | } forEach (allPlayers call BIS_fnc_arrayShuffle); | ||
};</ | };</sqf> | ||
|seealso= [[Arma 3 Zeus]] | |seealso= [[Arma 3 Zeus]] | ||
}} | |||
{{Note | |||
|user= Smith.UA | |||
|timestamp= 20250626120044 | |||
|text= Please note that the function makes the visual effects (lightning model and light) visible only to the client on which the function was executed.<br/> | |||
The explosion sound, crater and damage will only be generated (globally) on the client where the target is local or the target curator is local to the client.<br/> | |||
<br/> | |||
If you want to call lightning globally, you must call this function on all clients:<br/> | |||
<sqf> | |||
// consider remoteExec limitations by CfgRemoteExec | |||
[target, nil, true] remoteExec ["BIS_fnc_moduleLightning"]; | |||
</sqf> | |||
}} | }} |
Latest revision as of 16:16, 27 June 2025
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
- Posted on Jun 26, 2025 - 12:00 (UTC)
-
Please note that the function makes the visual effects (lightning model and light) visible only to the client on which the function was executed.
The explosion sound, crater and damage will only be generated (globally) on the client where the target is local or the target curator is local to the client.
If you want to call lightning globally, you must call this function on all clients:
// consider remoteExec limitations by CfgRemoteExec [target, nil, true] remoteExec ["BIS_fnc_moduleLightning"];