Module Core.UserFlag
Core - Manage user flags to interact with the mission editor trigger system and server side scripts.
Features:
- Set or get DCS user flags within running missions.
Author: FlightControl
Global(s)
Global USERFLAG |
Management of DCS User Flags. |
Management of DCS User Flags.
1. USERFLAG constructor
- USERFLAG.New(): Creates a new USERFLAG object.
Type(s)
Fields and Methods inherited from USERFLAG | Description |
---|---|
Get the userflag Number. |
|
Get the userflag name. |
|
Check if the userflag has a value of Number. |
|
USERFLAG Constructor. |
|
Set the userflag to a given Number. |
|
Field(s)
Function(s)
Get the userflag Number.
Defined in:
USERFLAG
Return value:
#number:
Number The number value to be checked if it is the same as the userflag.
Usage:
local BlueVictory = USERFLAG:New( "VictoryBlue" )
local BlueVictoryValue = BlueVictory:Get() -- Get the UserFlag VictoryBlue value.
Get the userflag name.
Defined in:
USERFLAG
Return value:
#string:
Name of the user flag.
Check if the userflag has a value of Number.
Defined in:
USERFLAG
Parameter:
#number Number
The number value to be checked if it is the same as the userflag.
Return value:
#boolean:
true if the Number is the value of the userflag.
Usage:
local BlueVictory = USERFLAG:New( "VictoryBlue" )
if BlueVictory:Is( 1 ) then
return "Blue has won"
end
USERFLAG Constructor.
Defined in:
USERFLAG
Parameter:
#string UserFlagName
The name of the userflag, which is a free text string.
Return value:
Set the userflag to a given Number.
Defined in:
USERFLAG
Parameters:
#number Number
The number value to set the flag to.
#number Delay
Delay in seconds, before the flag is set.
Return value:
The userflag instance.
Usage:
local BlueVictory = USERFLAG:New( "VictoryBlue" )
BlueVictory:Set( 100 ) -- Set the UserFlag VictoryBlue to 100.