triggerType: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\|x([0-9])= *<code>([^<]*)<\/code>" to "|x$1= <sqf>$2</sqf>")
m (Add "ERROR" return value)
Line 18: Line 18:
|descr= Returns trigger type (see [[setTriggerType]]).  
|descr= Returns trigger type (see [[setTriggerType]]).  


{{Feature | important | The trigger could be [[Multiplayer Scripting#Locality|local]] or remote but the result returned by this command will be for the trigger type set up locally on the client that executed the command. See [[createTrigger]] for more info.}}
{{Feature|important|
The trigger could be [[Multiplayer Scripting#Locality|local]] or remote but the result returned by this command will be for the trigger type set up locally on the client that executed the command.
See [[createTrigger]] for more info.
}}


|s1= [[triggerType]] trigger
|s1= [[triggerType]] trigger
Line 24: Line 27:
|p1= trigger: [[Object]]
|p1= trigger: [[Object]]


|r1= [[String]]
|r1= [[String]] - one of:
{{Columns|8|
* {{hl|"NONE"}}
* {{hl|"EAST G"}}
* {{hl|"WEST G"}}
* {{hl|"GUER G"}}
* {{hl|"SWITCH"}}
* {{hl|"END1"}}
* {{hl|"END2"}}
* {{hl|"END3"}}
* {{hl|"END4"}}
* {{hl|"END5"}}
* {{hl|"END6"}}
* {{hl|"LOOSE"}}
* {{hl|"WIN"}}
}}
Can return {{hl|"ERROR"}} in case of an invalid trigger type (due to [[Mission.sqm]] manual edit or other type of data corruption)


|x1= <sqf>_type = triggerType tr1;</sqf>
|x1= <sqf>_type = triggerType tr1;</sqf>

Revision as of 16:01, 28 April 2023

Hover & click on the images for description

Description

Description:
Returns trigger type (see setTriggerType).
The trigger could be local or remote but the result returned by this command will be for the trigger type set up locally on the client that executed the command. See createTrigger for more info.
Groups:
Triggers

Syntax

Syntax:
triggerType trigger
Parameters:
trigger: Object
Return Value:
String - one of:
  • "NONE"
  • "EAST G"
  • "WEST G"
  • "GUER G"
  • "SWITCH"
  • "END1"
  • "END2"
  • "END3"
  • "END4"
  • "END5"
  • "END6"
  • "LOOSE"
  • "WIN"
Can return "ERROR" in case of an invalid trigger type (due to Mission.sqm manual edit or other type of data corruption)

Examples

Example 1:
_type = triggerType tr1;

Additional Information

See also:
setTriggerType

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