setShotParents: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "<!-- Appropriate categories go here -->" to "")
m (Text replacement - " *\| *([Cc]omments|COMMENTS|Game|[Gg]ame [Nn]ame( +[0-9])?|Game [Vv]ersion( +[0-9])?|Game Version \(number surrounded by NO SPACES\)|Arguments in MP|MP[Aa]rg|Multiplayer Arguments( \("local" or "global"\))?|Effects|Execution|Effects...)
Line 1: Line 1:
{{Command|Comments=
{{Command
|arma3 |= Game
|arma3 |= Game
|1.66|Game Version=
|1.66
|arg=global |Multiplayer Arguments=
|arg=global
|eff=global |Multiplayer Effects=
|eff=global
|serverExec= server |Exec=
|serverExec= server |Exec=


|gr1= Weapons |GROUP1=
|gr1= Weapons
| Sets vehicle and instigator pair for the given projectile. |DESCRIPTION=
| Sets vehicle and instigator pair for the given projectile.
| projectile [[setShotParents]] [vehicle, instigator] |SYNTAX=
| projectile [[setShotParents]] [vehicle, instigator]
|p1= projectile: [[Object]] - the actual projectile shot |PARAMETER1=
|p1= projectile: [[Object]] - the actual projectile shot
|p2= [vehicle, instigator]: [[Array]] |PARAMETER2=
|p2= [vehicle, instigator]: [[Array]]
|p3= vehicle: [[Object]] - Vehicle shooting projectile|PARAMETER3=
|p3= vehicle: [[Object]] - Vehicle shooting projectile
|p4= instigator: [[Object]] - Person pulling the trigger |PARAMETER4=
|p4= instigator: [[Object]] - Person pulling the trigger


| [[Nothing]] |RETURNVALUE=
| [[Nothing]]
|x1= <code>myProjectile [[setShotParents]] [<nowiki/>[[vehicle]] bob, bob];</code> |EXAMPLE1=
|x1= <code>myProjectile [[setShotParents]] [<nowiki/>[[vehicle]] bob, bob];</code>
|x2= <code>tank [[addEventHandler]] ["Fired", {_this [[select]] 6 [[setShotParents]] [tank, [[commander]] tank]}];</code> |EXAMPLE2=
|x2= <code>tank [[addEventHandler]] ["Fired", {_this [[select]] 6 [[setShotParents]] [tank, [[commander]] tank]}];</code>
| [[getShotParents]] |SEEALSO=
| [[getShotParents]]
}}
}}



Revision as of 12:11, 18 January 2021

Hover & click on the images for description

Description

Description:
Sets vehicle and instigator pair for the given projectile.
Groups:
Weapons

Syntax

Syntax:
projectile setShotParents [vehicle, instigator]
Parameters:
projectile: Object - the actual projectile shot
[vehicle, instigator]: Array
vehicle: Object - Vehicle shooting projectile
instigator: Object - Person pulling the trigger
Return Value:
Nothing

Examples

Example 1:
myProjectile setShotParents [vehicle bob, bob];
Example 2:
tank addEventHandler ["Fired", {_this select 6 setShotParents [tank, commander tank]}];

Additional Information

See also:
getShotParents

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

Bottom Section