BIS fnc stalk: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - " +" to " ")
m (Text replacement - " \| *(\[[a-zA-Z,. ]*\] spawn ('''|\[\[)?BI(N|S)_fnc_[a-zA-Z]+('''|\]\])?) * \|p1=" to " |s1=$1 |p1=")
Line 12: Line 12:
Script terminates if one of the groups is eliminated or if the optional condition is activated.
Script terminates if one of the groups is eliminated or if the optional condition is activated.


| [stalker, stalked, refresh, radius, endCondition, endDestination] spawn [[BIS_fnc_stalk]]
|s1=[stalker, stalked, refresh, radius, endCondition, endDestination] spawn [[BIS_fnc_stalk]]


|p1= stalker: [[Group]] - the group that will move towards the other
|p1= stalker: [[Group]] - the group that will move towards the other

Revision as of 17:03, 12 June 2021

Hover & click on the images for description

Description

Description:
Description needed
Execution:
spawn
Groups:
Object ManipulationCombat

Syntax

Syntax:
[stalker, stalked, refresh, radius, endCondition, endDestination] spawn 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)
  • 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
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