onTeamSwitch: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(links)
(added note to description, old note goes to talk)
Line 7: Line 7:
____________________________________________________________________________________________
____________________________________________________________________________________________


| Defines an action performed when the team switch is finished. Command receives: _from object previous unit, _to object current unit. |= 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. |= Description
____________________________________________________________________________________________
____________________________________________________________________________________________


| '''onTeamSwitch''' command |= Syntax
| '''onTeamSwitch''' commandset |= Syntax


|p1= command:  [[String]] or [[Code]]  |= PARAMETER1  
|p1= commandset:  [[String]] or [[Code]]  |= PARAMETER1  


|p2= |= PARAMETER2  
|p2= |= PARAMETER2  
Line 34: Line 34:
<dl class='command_description'>
<dl class='command_description'>
<!-- Note Section BEGIN -->
<!-- Note Section BEGIN -->
There can only be one instance of onTeamSwitch used per mission.  If multiple instances are used then the last one loaded into memory will override previous instance(s). This includes use of onTeamSwitch in installed addons as well. --[[User:Loyalguard|Loyalguard]] 04:53, 28 October 2011 (CEST)


<!-- Note Section END -->
<!-- Note Section END -->

Revision as of 20:46, 4 June 2015

Hover & click on the images for description

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:
Uncategorised

Syntax

Syntax:
onTeamSwitch commandset
Parameters:
commandset: String or Code
Return Value:
Nothing

Examples

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

Additional Information

See also:
Team_SwitchenableTeamSwitchonBriefingTeamSwitchteamSwitchteamSwitchEnabled

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

Notes

Bottom Section