onTeamSwitch: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - " " to " ")
m (Text replacement - "\{\{( *)Informative( *)\|" to "{{$1Feature$2|$2Informative$2|")
Line 12: Line 12:
Commandset receives the following special variables: ''_from'' object previous unit, ''_to'' object current unit.
Commandset receives the following special variables: ''_from'' object previous unit, ''_to'' object current unit.
Consecutive use of onTeamSwitch command will overwrite previously set commandset.  
Consecutive use of onTeamSwitch command will overwrite previously set commandset.  
{{Informative|Since '''Arma 3''' ''v1.57'' a stackable version of this EH is available: [[Arma_3:_Event_Handlers/addMissionEventHandler#TeamSwitch|TeamSwitch]]}}
{{Feature|Informative|Since '''Arma 3''' ''v1.57'' a stackable version of this EH is available: [[Arma_3:_Event_Handlers/addMissionEventHandler#TeamSwitch|TeamSwitch]]}}
<br>
<br>
{{Informative | When player switches and leaves behind AI unit, you need to enable "TeamSwitch" AI on it (with&nbsp;{{Inline code|[[onTeamSwitch]] { _from [[enableAI]] "TeamSwitch" };}}) so that the unit continues with [[waypoints]]. }}
{{Feature | Informative | When player switches and leaves behind AI unit, you need to enable "TeamSwitch" AI on it (with&nbsp;{{Inline code|[[onTeamSwitch]] { _from [[enableAI]] "TeamSwitch" };}}) so that the unit continues with [[waypoints]]. }}


| [[onTeamSwitch]] commandset
| [[onTeamSwitch]] commandset

Revision as of 00:13, 7 February 2021

Hover & click on the images for description

Description

Description:
Description needed
Groups:
Team SwitchEvent Handlers

Syntax

Syntax:
Syntax needed
Parameters:
commandset: String or Code
Return Value:
Return value needed

Examples

Example 1:
onTeamSwitch { [_from, _to] execVM "myTeamSwitchScript.sqf"; };

Additional Information

See also:
See also needed

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