BIS fnc moduleLightning: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (added two examples)
m (Text replacement - "(\|[pr][0-9]+ *= *[^- ]*) *- *W([a-z ])" to "$1 - w$2")
 
(40 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{RV|type=function


{{Function|Comments=
|game1= arma3
____________________________________________________________________________________________
|version1= 1.16


| arma3 |Game name=
|gr1= Modules


|1.00|Game version=
|descr= Zeus lightning strike.
____________________________________________________________________________________________
{{Feature|important|Note that ''target'' will be deleted by the function (part of how Zeus modules work).}}


| <pre>/*
|s1= [target, nil, activate] call [[BIS_fnc_moduleLightning]]


Description:
|p1= target: [[Object]] - where the lightning bolt hits - '''will''' be deleted by the function!
Zeus lightning strike


Parameter(s):
|p2= nil: [[Nothing]] - not used
http://community.bistudio.com/wiki/Arma_3_Modules


Returns:
|p3= activate: [[Boolean]] - [[true]] to activate, [[false]] does nothing
NONE
*/


</pre><small>''(Placeholder description extracted from the function header by [[BIS_fnc_exportFunctionsToWiki]])''</small> |DESCRIPTION=
|r1= [[Nothing]]
____________________________________________________________________________________________


| <!-- [] call [[BIS_fnc_moduleLightning]]; --> |SYNTAX=
|x1= <sqf>player addAction  
 
|p1= |PARAMETER1=
 
| |RETURNVALUE=
____________________________________________________________________________________________
 
|x1= <code>[[player]] [[addAction]]
[
[
    "Eat that!",  
"Eat that!",  
    {
{
        <nowiki>[</nowiki>[[cursorTarget]],[[nil]],[[true]]<nowiki>]</nowiki> [[spawn]] [[BIS_fnc_moduleLightning]];
private _tempTarget = createSimpleObject ["Land_HelipadEmpty_F", getPosASL cursorTarget];
        [[cursorTarget]] [[setDamage]] 1;
[_tempTarget, nil, true] spawn BIS_fnc_moduleLightning;
    },
cursorTarget setDamage 1;
    [],
},
    1.5,  
[],
    [[true]],  
1.5,  
    [[true]],  
true,  
    "",
true,  
    "![[isNull]] [[cursorTarget]]"
"",
];</code> |EXAMPLE1=
"!isNull cursorTarget"
];</sqf>


|x2= <code>[] [[spawn]]//Who gets hit first? ;)
|x2= <sqf>[] spawn // Who gets hit first? ;-)
{  
{
    {  
{
        [_x,[[nil]],[[true]]<nowiki>]</nowiki> [[spawn]] [[BIS_fnc_moduleLightning]];  
private _tempTarget = createSimpleObject ["Land_HelipadEmpty_F", getPosASL _x];
        [[sleep]] [[random]] 5;  
[_tempTarget, nil, true] spawn BIS_fnc_moduleLightning;
    } [[forEach]] ([[allMissionObjects]] "" [[call]] [[BIS_fnc_arrayShuffle]]);  
sleep (1 + random 4);
};
} forEach (allPlayers call BIS_fnc_arrayShuffle);
 
};</sqf>
| |SEEALSO=


|seealso= [[Arma 3 Zeus]]
}}
}}
<h3 style="display:none">Notes</h3>
<dl class="command_description">
<!-- Note Section BEGIN -->
<!-- Note Section END -->
</dl>
<h3 style="display:none">Bottom Section</h3>
[[Category:Functions|{{uc:moduleLightning}}]]
[[Category:Function Group: Curator|{{uc:moduleLightning}}]]

Latest revision as of 17:35, 8 November 2023

Hover & click on the images for description

Description

Description:
Zeus lightning strike.
Note that target will be deleted by the function (part of how Zeus modules work).
Execution:
call
Groups:
Modules

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