onTeamSwitch: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - " \{\{GameCategory\|[a-z]+[0-9]?\|Scripting Commands\}\}" to "") |
Lou Montana (talk | contribs) m (Text replacement - " \| *(game[0-9]|version[0-9]|gr[0-9]|serverExec|mp|pr|descr|s[0-9]|p[0-9]{1,3}|r[0-9]|x1?[0-9]|seealso) *= +" to " |$1= ") |
||
Line 24: | Line 24: | ||
{{Feature | Informative | When player switches and leaves behind AI unit, you need to enable "TeamSwitch" AI on it (with {{ic|[[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 {{ic|[[onTeamSwitch]] { _from [[enableAI]] "TeamSwitch" };}}) so that the unit continues with [[waypoints]]. }} | ||
|s1= | |s1= [[onTeamSwitch]] commandset | ||
|p1= commandset: [[String]] or [[Code]] | |p1= commandset: [[String]] or [[Code]] |
Revision as of 22:20, 19 June 2021
Description
- Description:
- Defines an action performed when the team switch is finished.
Commandset receives the following special variables: _from object previous unit, _to object current unit.
Consecutive use of onTeamSwitch command will overwrite previously set commandset.
- Groups:
- Team SwitchEvent Handlers
Syntax
- Syntax:
- onTeamSwitch commandset
- Parameters:
- commandset: String or Code
- Return Value:
- Nothing
Examples
- Example 1:
onTeamSwitch { [_from, _to] execVM "myTeamSwitchScript.sqf"; };
Additional Information
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