setShotParents: Difference between revisions

From Bohemia Interactive Community
m (formatting)
No edit summary
(8 intermediate revisions by one other user not shown)
Line 2: Line 2:


|game1= arma3
|game1= arma3
|version1= 1.66
|version1= 1.66


Line 19: Line 18:
|p1= projectile: [[Object]] - The actual projectile shot
|p1= projectile: [[Object]] - The actual projectile shot


|p2= vehicle: [[Object]] - Vehicle shooting projectile
|p2= vehicle: [[Object]] - Vehicle shooting projectile (appears as the 'killer' in "Killed" EH)


|p3= instigator: [[Object]] - Person pulling the trigger
|p3= instigator: [[Object]] - Person pulling the trigger (appears as the 'instigator' in "Killed" EH)


|r1= [[Nothing]]
|r1= [[Nothing]]


|x1= <code>myProjectile [[setShotParents]] [<nowiki/>[[vehicle]] bob, bob];</code>
|x1= <sqf>myProjectile setShotParents [vehicle bob, bob];</sqf>


|x2= <code>tank [[addEventHandler]] ["Fired", {_this [[select]] 6 [[setShotParents]] [tank, [[commander]] tank]}];</code>
|x2= <sqf>tank addEventHandler ["Fired", {_this select 6 setShotParents [tank, commander tank]}];</sqf>


|seealso= [[getShotParents]]
|seealso= [[getShotParents]]
}}
}}

Revision as of 10:10, 24 July 2022

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: Object - Vehicle shooting projectile (appears as the 'killer' in "Killed" EH)
instigator: Object - Person pulling the trigger (appears as the 'instigator' in "Killed" EH)
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.
Only post proven facts here! Add Note