addMissionEventHandler: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
No edit summary
Line 7: Line 7:
____________________________________________________________________________________________
____________________________________________________________________________________________


| Adds mission event handler. Every event will create an array named _this, which contains specific information about the particular event.   |= Description
| Adds mission event handler. Every event will create an array named ''_this'', which contains specific information about the particular event. Available mission event handlers:
<br/>"loaded"
<br/>"ended"
<br/>"draw3D"  |= Description
____________________________________________________________________________________________
____________________________________________________________________________________________


Line 21: Line 24:




|x1= <code>_id = addMissionEventHandler ["ended",{_this exec "missionEnded.sqs"}];</code>|= EXAMPLE1  
|x1= <code>_id = [[addMissionEventHandler]] ["ended",{_this [[exec]] "missionEnded.sqs"}];</code>|= EXAMPLE1  


____________________________________________________________________________________________
____________________________________________________________________________________________


| |= SEEALSO  
| [[removeMissionEventHandler]], [[removeAllMissionEventHandlers]] |= SEEALSO  


|  |= MPBEHAVIOUR  
|  |= MPBEHAVIOUR  

Revision as of 10:14, 31 August 2013

Hover & click on the images for description

Description

Description:
Adds mission event handler. Every event will create an array named _this, which contains specific information about the particular event. Available mission event handlers:
"loaded"
"ended"
"draw3D"
Groups:
Uncategorised

Syntax

Syntax:
addMissionEventHandler [type, command]
Parameters:
[type, command]: Array
type: String
command: Code or String
Return Value:
Number - The index of the currently added mission event handler is returned.

Examples

Example 1:
_id = addMissionEventHandler ["ended",{_this exec "missionEnded.sqs"}];

Additional Information

See also:
removeMissionEventHandlerremoveAllMissionEventHandlers

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

Posted on March 3, 2013 - 16:34
Druid
There is only one type at this time:
ended - It is triggered when the mission is successfuly ended. In variable _this is stored type of the end ("end1","end2", etc.).

Bottom Section