BIS fnc stalk: Difference between revisions
Jump to navigation
Jump to search
m (1 revision imported: BIS Functions update 1/7) |
Lou Montana (talk | contribs) (Page filling) |
||
Line 1: | Line 1: | ||
{{Function|= Comments | {{Function|= Comments | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
Line 8: | Line 7: | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| < | | Continuously set WP of one group to a different group to hunt it. It does not change the group's behaviour.<br /> | ||
Script terminates if one of the groups is eliminated or if the optional condition is activated. |= Description | |||
____________________________________________________________________________________________ | |||
| [stalker, stalked, refresh, radius, endCondition, endDestination] call [[BIS_fnc_stalk]] |= Syntax | |||
|p1= stalker: [[Group]] - the group that will move towards the other |= Parameter 1 | |||
|p2= stalked: [[Group]] - the group that will be followed |= Parameter 2 | |||
|p3= refresh: [[Number]] - (Optional, default 10, minimum 5) time between waypoint updates |= Parameter 3 | |||
|p4= radius: [[Number]] - (Optional, default 0, minimum 0) waypoint "precision" |= Parameter 4 | |||
|p5= endCondition: [[Code]] - (Optional, default {[[false]]}) condition that if true stops ''stalker'' to follow ''stalked'' |= Parameter 5 | |||
|p6= endDestination: [[String]] or [[Position]] or [[Object]] or [[Number]] - (Optional, default 0) destination ''stalker'' will go after ''endCondition'' is met (or ''stalked'' is killed) | |||
* [[String]] - destination marker name | |||
* [[Position]] - destination | |||
* [[Object]] - destination | |||
* [[Number]] | |||
** 0: return to original group waypoints | |||
** 1: search around their current stalking position, in a 50m radius | |||
** 2: return to the original position before stalking |= Parameter 6 | |||
| [[Boolean]] - [[true]] when done |= Return value | |||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| < | |x1= <code>_stalking = [BIS_grpStalkers,BIS_grpPlayer] [[spawn]] [[BIS_fnc_stalk]];</code> |= Example 1 | ||
| |= | |x2= <code>_stalking = [grp1,[[group]] [[player]],nil,nil,{[[player]] [[distance]] BIS_Heli < 100},"BIS_mrkRetreatMarker"] [[spawn]] [[BIS_fnc_stalk]];</code> |= Example 2 | ||
|x3= <code>_stalking = [BIS_grpStalkers,BIS_grpPlayer,20,10,{BIS_Return},1] [[spawn]] [[BIS_fnc_stalk]];</code> |= Example 3 | |||
| | |x4= <code>_stalking = [BIS_grpStalkers,BIS_grpPlayer,5,0,{[[dayTime]] > 20},[3600,600,0]] [[spawn]] [[BIS_fnc_stalk]];</code> |= Example 4 | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| |= See also | | [[BIS_fnc_spawnGroup]] |= See also | ||
}} | }} | ||
Revision as of 22:38, 6 May 2018
Description
- Description:
- Continuously set WP of one group to a different group to hunt it. It does not change the group's behaviour.
Script terminates if one of the groups is eliminated or if the optional condition is activated. - Execution:
- call
- Groups:
- Uncategorised
Syntax
- Syntax:
- [stalker, stalked, refresh, radius, endCondition, endDestination] call BIS_fnc_stalk
- Parameters:
- stalker: Group - the group that will move towards the other
- stalked: Group - the group that will be followed
- refresh: Number - (Optional, default 10, minimum 5) time between waypoint updates
- radius: Number - (Optional, default 0, minimum 0) waypoint "precision"
- endCondition: Code - (Optional, default {false}) condition that if true stops stalker to follow stalked
- endDestination: String or Position or Object or Number - (Optional, default 0) destination stalker will go after endCondition is met (or stalked is killed)
- Return Value:
- Boolean - true when done
Examples
- Example 1:
_stalking = [BIS_grpStalkers,BIS_grpPlayer] spawn BIS_fnc_stalk;
- Example 2:
_stalking = [grp1,group player,nil,nil,{player distance BIS_Heli < 100},"BIS_mrkRetreatMarker"] spawn BIS_fnc_stalk;
- Example 3:
_stalking = [BIS_grpStalkers,BIS_grpPlayer,20,10,{BIS_Return},1] spawn BIS_fnc_stalk;
- Example 4:
_stalking = [BIS_grpStalkers,BIS_grpPlayer,5,0,{dayTime > 20},[3600,600,0]] spawn BIS_fnc_stalk;
Additional Information
- See also:
- BIS_fnc_spawnGroup
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