public class Trigger
extends Object
This class provides a collection of RM commands concerning Triggers.
Basically only the default triggers can be used in RM scripts, because of the way they are inserted. With a couple of workarounds you can inject raw trigger code in a RM script though. You can use the following functions:
void rmInsertConditionCode(string xs="") {
rmAddTriggerCondition("Timer");
rmSetTriggerConditionParam("Param1","0==("+xs+"));//");
}
void rmInsertEffectCode(string xs="") {
rmAddTriggerEffect("SetIdleProcessing");
rmSetTriggerEffectParam("IdleProc", "true); "+xs+" //");
}
rmInsertConditionCode("(trTime() <= 5.0)");
rmInsertEffectCode("trSetFogAndBlackmap(false, false);");
Modifier and Type | Method and Description |
---|---|
void |
rmAddTriggerCondition(string conditionType)
Add a condition from the trigger(2)\typetest.xml file to the random map.
|
void |
rmAddTriggerEffect(string effectType)
Add an effect from the trigger(2)\typetest.xml file to the random map.
|
void |
rmAddUnitsToArmy(int playerID,
int armyID,
int objectDefID)
Add the given units to the armyID.
|
void |
rmCreateArmy(int playerID,
string armyName)
Create an army for the given player ID.
|
void |
rmCreateTrigger(string triggerName)
Create a trigger to add to this random map.
|
void |
rmSetTriggerActive(bool active)
Sets the current trigger active.
|
void |
rmSetTriggerConditionParam(string paramName,
string value,
bool add)
Adds a parameter to the current condition.
|
void |
rmSetTriggerConditionParamArmy(string paramName,
int playerID,
int armyID,
bool add)
Adds an army parameter to the current condition.
|
void |
rmSetTriggerConditionParamFloat(string paramName,
float value,
bool add)
Adds a float parameter to the current condition.
|
void |
rmSetTriggerConditionParamInt(string paramName,
int value,
bool add)
Adds an integer parameter to the current condition.
|
void |
rmSetTriggerEffectParam(string paramName,
string value,
bool add)
Adds a parameter to the current effect.
|
void |
rmSetTriggerEffectParamArmy(string paramName,
int playerID,
int armyID,
bool add)
Adds an army parameter to the current effect.
|
void |
rmSetTriggerEffectParamFloat(string paramName,
float value,
bool add)
Adds a float parameter to the current effect.
|
void |
rmSetTriggerEffectParamInt(string paramName,
int value,
bool add)
Adds an int parameter to the current effect.
|
void |
rmSetTriggerLoop(bool loop)
Sets the current trigger looping.
|
void |
rmSetTriggerPriority(int priority)
Sets the current trigger's priority.
|
void |
rmSetTriggerRunImmediately(bool runImmediately)
Sets the current trigger to "run immediately"
|
void |
rmSetVCFile(string filename)
Assigns a specific victory condition file to this RMS.
|
void |
rmSwitchToTrigger(int triggerID)
Sets the given trigger as current.
|
int |
rmTriggerID(string triggerName)
Returns the ID for the trigger with as name triggerName
|
public void rmAddUnitsToArmy(int playerID, int armyID, int objectDefID)
public void rmCreateArmy(int playerID, string armyName)
public void rmSetTriggerActive(bool active)
public void rmSetTriggerConditionParam(string paramName, string value, bool add)
public void rmSetTriggerConditionParamArmy(string paramName, int playerID, int armyID, bool add)
public void rmSetTriggerConditionParamFloat(string paramName, float value, bool add)
public void rmSetTriggerConditionParamInt(string paramName, int value, bool add)
public void rmSetTriggerEffectParam(string paramName, string value, bool add)
public void rmSetTriggerEffectParamArmy(string paramName, int playerID, int armyID, bool add)
public void rmSetTriggerEffectParamFloat(string paramName, float value, bool add)
public void rmSetTriggerEffectParamInt(string paramName, int value, bool add)
public void rmSetTriggerLoop(bool loop)
public void rmSetTriggerPriority(int priority)
public void rmSetTriggerRunImmediately(bool runImmediately)
public void rmSetVCFile(string filename)
public void rmSwitchToTrigger(int triggerID)
public void rmAddTriggerCondition(string conditionType)
public void rmAddTriggerEffect(string effectType)
public void rmCreateTrigger(string triggerName)
public int rmTriggerID(string triggerName)