BIS fnc target: Difference between revisions
Jump to navigation
Jump to search
m (added image) |
Lou Montana (talk | contribs) (Fix arguments,) |
||
Line 6: | Line 6: | ||
|version1= 1.00 | |version1= 1.00 | ||
|descr= Handles the shooting targets in the Bootcamp DLC, statistics, animation, etc. (targets such as <tt>TargetBootcampHuman_f</tt> | |descr= [[File:A3 BIS fnc target.jpg|300px|thumb|right|Target Board display]] | ||
Handles the shooting targets in the Bootcamp DLC, statistics, animation, etc. (targets such as <tt>TargetBootcampHuman_f</tt>) | |||
) | |||
|s1= [ | |s1= [action, parameters] call [[BIS_fnc_target]] |SYNTAX= | ||
|p1= | |p1= action: [[String]] - one of: | ||
<div style="columns: 3"> | |||
* initialize | |||
* terminate (does nothing(?)) | |||
* animate | |||
* getAnimationPhase | |||
* getAnimationPhaseString | |||
* getAnimatedSelection | |||
* hit | |||
* hitPart | |||
* getShooterDataIndex | |||
* getShooterData | |||
* setShooterData | |||
* getShotsData | |||
* getShotsDataFromTargets | |||
* getShotsDataWithFilter | |||
* setShotsData | |||
* getShootersData | |||
* setShootersData | |||
* resetShootersData (clears all data on object) | |||
* getShooterTemplate | |||
* getShotTemplate | |||
* getShooterByUid | |||
* uiOpen | |||
* uiOnLoad (internal) | |||
* uiFillTable (internal) | |||
* uiFillTableRow (internal) | |||
</div> | |||
|p2= | |p2= parameters: [[Array]] - array of data, depending on ''action'':<br> | ||
'''initialize''' - Initializes the target and sets it to the "up" position | '''initialize''' - Initializes the target and sets it to the "up" position | ||
* target: [[Object]] - Target object of type "TargetBootcamp_base_F" | * target: [[Object]] - Target object of type "TargetBootcamp_base_F" | ||
'''terminate''' - Doesn't do anything | '''terminate''' - Doesn't do anything | ||
'''animate''' - Animate the object to the given position ("up" or "down") | '''animate''' - Animate the object to the given position ("up" or "down") | ||
* target: [[Object]] - Target object of type "TargetBootcamp_base_F" | * target: [[Object]] - Target object of type "TargetBootcamp_base_F" | ||
* position: [[String]] - "up" or "down" (default) | * position: [[String]] - "up" or "down" (default) | ||
Line 30: | Line 54: | ||
'''getAnimationPhaseString''' - Returns (String)"up" or "down" depending on current state | '''getAnimationPhaseString''' - Returns (String)"up" or "down" depending on current state | ||
* target: [[Object]] - Target object of type "TargetBootcamp_base_F" | * target: [[Object]] - Target object of type "TargetBootcamp_base_F" | ||
'''getAnimatedSelection''' - Returns (String) the name of the "animatedSelection" from object config | '''getAnimatedSelection''' - Returns (String) the name of the "animatedSelection" from object config | ||
* target: [[Object]] - Target object of type "TargetBootcamp_base_F" | * target: [[Object]] - Target object of type "TargetBootcamp_base_F" | ||
'''hit''' - Handles the hit event to animate the target down and up again | '''hit''' - Handles the hit event to animate the target down and up again | ||
* target: [[Object]] - Target object of type "TargetBootcamp_base_F" | * target: [[Object]] - Target object of type "TargetBootcamp_base_F" | ||
* unit: [[Object]] - Unit which shot the target | * unit: [[Object]] - Unit which shot the target | ||
Line 44: | Line 65: | ||
'''hitPart''' - Handles the hit event and stores the data | '''hitPart''' - Handles the hit event and stores the data | ||
* partsList: [[Array]] - Contains list of all parts which got hit (see [[Arma 3: Event Handlers#HitPart|HitPart EH]] format) to format [target, shooter]: | |||
** target: [[Object]] - Target object of type 'TargetBootcamp_base_F' | |||
** shooter: [[Object]] - Unit which shot the target | |||
'''getShooterDataIndex''' - Get (Integer) index from Shooter Data for specific unit | '''getShooterDataIndex''' - Get (Integer) index from Shooter Data for specific unit | ||
Line 72: | Line 93: | ||
* target: [[Object]] - Target object of type "TargetBootcamp_base_F" | * target: [[Object]] - Target object of type "TargetBootcamp_base_F" | ||
* uid: [[String]] - Player UID of unit who shot the target | * uid: [[String]] - Player UID of unit who shot the target | ||
* filter: [[String]] - One of "time", "distance", "weapon" or "direct" | |||
* code: [[Code]] - Custom code to validate the shot. _this is the value of filtered data | |||
'''setShotsData''' - Set Shots Data for specific unit | '''setShotsData''' - Set Shots Data for specific unit | ||
Line 94: | Line 115: | ||
* uid: [[String]] - Player UID of unit who shot the target | * uid: [[String]] - Player UID of unit who shot the target | ||
'''getShotTemplate''' - Return (Array) template for Shot Data (see HitPart EH) | '''getShotTemplate''' - Return (Array) template for Shot Data (see [[Arma 3: Event Handlers#HitPart|HitPart EH]] format) | ||
* target: [[Object]] - Target object of type "TargetBootcamp_base_F" | * target: [[Object]] - Target object of type "TargetBootcamp_base_F" | ||
* shooter: [[Object]] - Unit who shot the target | |||
* projectile: [[Object]] - ("_bullet" not used) | |||
* position: [[Array]] format [[Position]] - ("_position" not used) | |||
* velocity: [[Array]] - ("_velocity" not used) | |||
* selection: [[Array]] - ("_selection" not used) | |||
* ammo: [[Array]] - ("_ammo" not used) | |||
* vector: [[Array]] - ("_direction" not used) | |||
* radius: [[Array]] - ("_radius" not used) | |||
* surfaceType: [[String]] - ("_surface" not used) | |||
* isDirect: [[Boolean]] - [[true]] if object was directly hit, [[false]] if it was hit by indirect/splash damage. | |||
'''getShooterByUid''' - Return (Object) unit | '''getShooterByUid''' - Return (Object) unit | ||
Line 128: | Line 149: | ||
* data: [[Array]] - Shooter Data | * data: [[Array]] - Shooter Data | ||
|x1= <code>{{cc|open the Score Board through addAction}} | |x1= <code>{{cc|open the Score Board through addAction}} |
Revision as of 17:30, 7 January 2020
Description
- Description:
- Handles the shooting targets in the Bootcamp DLC, statistics, animation, etc. (targets such as TargetBootcampHuman_f)
- Execution:
- call
- Groups:
- Uncategorised
Syntax
- Syntax:
- [action, parameters] call BIS_fnc_target
- Parameters:
- action: String - one of:
- initialize
- terminate (does nothing(?))
- animate
- getAnimationPhase
- getAnimationPhaseString
- getAnimatedSelection
- hit
- hitPart
- getShooterDataIndex
- getShooterData
- setShooterData
- getShotsData
- getShotsDataFromTargets
- getShotsDataWithFilter
- setShotsData
- getShootersData
- setShootersData
- resetShootersData (clears all data on object)
- getShooterTemplate
- getShotTemplate
- getShooterByUid
- uiOpen
- uiOnLoad (internal)
- uiFillTable (internal)
- uiFillTableRow (internal)
- parameters: Array - array of data, depending on action:
initialize - Initializes the target and sets it to the "up" position- target: Object - Target object of type "TargetBootcamp_base_F"
- target: Object - Target object of type "TargetBootcamp_base_F"
- position: String - "up" or "down" (default)
- target: Object - Target object of type "TargetBootcamp_base_F"
- target: Object - Target object of type "TargetBootcamp_base_F"
- target: Object - Target object of type "TargetBootcamp_base_F"
- target: Object - Target object of type "TargetBootcamp_base_F"
- unit: Object - Unit which shot the target
- damage: Number - Amount of damage done to the target
- partsList: Array - Contains list of all parts which got hit (see HitPart EH format) to format [target, shooter]:
- target: Object - Target object of type "TargetBootcamp_base_F"
- uid: String - Player UID of unit who shot the target
- target: Object - Target object of type "TargetBootcamp_base_F"
- uid: String - Player UID of unit who shot the target
- target: Object - Target object of type "TargetBootcamp_base_F"
- uid: String - Player UID of unit who shot the target
- data: Array - Shooter Data
- target: Object - Target object of type "TargetBootcamp_base_F"
- uid: String - Player UID of unit who shot the target
- targets: Array of Object - List of target objects of type "TargetBootcamp_base_F"
- uid: String - Player UID of unit who shot the target
- target: Object - Target object of type "TargetBootcamp_base_F"
- uid: String - Player UID of unit who shot the target
- filter: String - One of "time", "distance", "weapon" or "direct"
- code: Code - Custom code to validate the shot. _this is the value of filtered data
- target: Object - Target object of type "TargetBootcamp_base_F"
- uid: String - Player UID of unit who shot the target
- data: Array - Shots Data
- target: Object - Target object of type "TargetBootcamp_base_F"
- target: Object - Target object of type "TargetBootcamp_base_F"
- target: Object - Target object of type "TargetBootcamp_base_F"
- uid: String - Player UID of unit who shot the target
- target: Object - Target object of type "TargetBootcamp_base_F"
- shooter: Object - Unit who shot the target
- projectile: Object - ("_bullet" not used)
- position: Array format Position - ("_position" not used)
- velocity: Array - ("_velocity" not used)
- selection: Array - ("_selection" not used)
- ammo: Array - ("_ammo" not used)
- vector: Array - ("_direction" not used)
- radius: Array - ("_radius" not used)
- surfaceType: String - ("_surface" not used)
- isDirect: Boolean - true if object was directly hit, false if it was hit by indirect/splash damage.
- uid: String - Player UID of unit who shot the target
- target: Object - Target object of type "TargetBootcamp_base_F"
- target: Object - Target object of type "TargetBootcamp_base_F"
- display: Display
- Return Value:
- Return value needed
Examples
- Example 1:
// open the Score Board through addAction ["uiOpen", [myTarget]] call BIS_fnc_target;
- Example 2:
// open the Score Board for all players in MP ["uiOpenToAll", [myTarget]] call BIS_fnc_target;
- Example 3:
// clear all data from Score Board ["resetShootersData", [myTarget]] call BIS_fnc_target;
Additional Information
- See also:
- doTarget
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