BIS fnc stalk: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
mNo edit summary
m (Text replacement - " |s1=[" to " |s1= [")
 
(25 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Function|Comments=
{{RV|type=function
____________________________________________________________________________________________


| arma3 |Game name=
|game1= arma3
|version1= 1.00


|1.00|= Game version
|gr1= Object Manipulation


|gr1= Object Manipulation |GROUP1=
|gr2= Combat


|gr2= Combat |GROUP2=
|descr= 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.


| Continuously set WP of one group to a different group to hunt it. It does not change the group's behaviour.<br>
|s1= [stalker, stalked, refresh, radius, endCondition, endDestination] spawn [[BIS_fnc_stalk]]
Script terminates if one of the groups is eliminated or if the optional condition is activated. |DESCRIPTION=
____________________________________________________________________________________________


| [stalker, stalked, refresh, radius, endCondition, endDestination] spawn [[BIS_fnc_stalk]] |SYNTAX=
|p1= stalker: [[Group]] - the group that will move towards the other


|p1= stalker: [[Group]] - the group that will move towards the other |PARAMETER1=
|p2= stalked: [[Group]] - the group that will be followed


|p2= stalked: [[Group]] - the group that will be followed |PARAMETER2=
|p3= refresh: [[Number]] - (Optional, default 10, minimum 5) time between waypoint updates


|p3= refresh: [[Number]] - (Optional, default 10, minimum 5) time between waypoint updates |PARAMETER3=
|p4= radius: [[Number]] - (Optional, default 0, minimum 0) waypoint "precision"


|p4= radius: [[Number]] - (Optional, default 0, minimum 0) waypoint "precision" |PARAMETER4=
|p5= endCondition: [[Code]] - (Optional, default {[[false]]}) condition that if true stops ''stalker'' to follow ''stalked''
 
|p5= endCondition: [[Code]] - (Optional, default {[[false]]}) condition that if true stops ''stalker'' to follow ''stalked'' |PARAMETER5=


|p6= endDestination: [[String]] or [[Position]] or [[Object]] or [[Number]] - (Optional, default 0) destination ''stalker'' will go after ''endCondition'' is met (or ''stalked'' is killed)
|p6= endDestination: [[String]] or [[Position]] or [[Object]] or [[Number]] - (Optional, default 0) destination ''stalker'' will go after ''endCondition'' is met (or ''stalked'' is killed)
Line 34: Line 30:
** 0: return to original group waypoints
** 0: return to original group waypoints
** 1: search around their current stalking position, in a 50m radius
** 1: search around their current stalking position, in a 50m radius
** 2: return to the original position before stalking |PARAMETER6=
** 2: return to the original position before stalking


| [[Boolean]] - [[true]] when done |RETURNVALUE=
|r1= [[Boolean]] - [[true]] when done
____________________________________________________________________________________________


|x1= <code>_stalking = [BIS_grpStalkers, BIS_grpPlayer] [[spawn]] [[BIS_fnc_stalk]];</code> |EXAMPLE1=
|x1= <sqf>private _stalking = [BIS_grpStalkers, BIS_grpPlayer] spawn BIS_fnc_stalk;</sqf>


|x2= <code>_stalking = [grp1, [[group]] [[player]], [[nil]], [[nil]], { [[player]] [[distance]] BIS_Heli < 100 }, "BIS_mrkRetreatMarker"] [[spawn]] [[BIS_fnc_stalk]];</code> |EXAMPLE2=
|x2= <sqf>private _stalking = [grp1, group player, nil, nil, { player distance BIS_Heli < 100 }, "BIS_mrkRetreatMarker"] spawn BIS_fnc_stalk;</sqf>


|x3= <code>_stalking = [BIS_grpStalkers, BIS_grpPlayer, 20, 10, { BIS_Return }, 1] [[spawn]] [[BIS_fnc_stalk]];</code> |EXAMPLE3=
|x3= <sqf>private _stalking = [BIS_grpStalkers, BIS_grpPlayer, 20, 10, { BIS_Return }, 1] spawn BIS_fnc_stalk;</sqf>


|x4= <code>_stalking = [BIS_grpStalkers, BIS_grpPlayer, 5, 0, { [[dayTime]] > 20 }, [3600,600,0]] [[spawn]] [[BIS_fnc_stalk]];</code> |EXAMPLE4=
|x4= <sqf>private _stalking = [BIS_grpStalkers, BIS_grpPlayer, 5, 0, { dayTime > 20 }, [3600,600,0]] spawn BIS_fnc_stalk;</sqf>
____________________________________________________________________________________________


|exec= spawn |Execution=
|exec= spawn


| [[BIS_fnc_spawnGroup]] |SEEALSO=
|seealso= [[BIS_fnc_spawnGroup]]
}}
}}
<h3 style="display:none">Notes</h3>
<dl class="command_description">
<!-- Note Section BEGIN -->
<!-- Note Section END -->
</dl>
<h3 style="display:none">Bottom Section</h3>
[[Category:Functions|{{uc:stalk}}]]
[[Category:{{Name|arma3}}: Functions|{{uc:stalk}}]]

Latest revision as of 23:12, 12 July 2022

Hover & click on the images for description

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:
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:
private _stalking = [BIS_grpStalkers, BIS_grpPlayer] spawn BIS_fnc_stalk;
Example 2:
private _stalking = [grp1, group player, nil, nil, { player distance BIS_Heli < 100 }, "BIS_mrkRetreatMarker"] spawn BIS_fnc_stalk;
Example 3:
private _stalking = [BIS_grpStalkers, BIS_grpPlayer, 20, 10, { BIS_Return }, 1] spawn BIS_fnc_stalk;
Example 4:
private _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