The following section will provide more help on how to do the most common things that a single player mission requires that weren't covered in the previous chapter. It is by no means comprehensive, and is only to provide some extra help and examples.
CreateObjectType("[objective name]"), "Objective")
{
Condition("NOT")
{
Condition("InRegion")
{
Region("Green_base");
Tag("sarge")
{
Amount(0);
Operator(">");
}
}
}
Action()
{
[action];
}
}
Within the NOT condition is another condition running an InRegion check. In this case, we are testing to see when a particular object is NOT in that region. The action would be triggered as soon as the tag "sarge
" left the region. NOT can be used with any Condition Type.
CreateObjectType("[objective name]", "Objective")
{
Condition("AND")
{
Condition("TagCount")
{
Tag("enemy_units")
{
Operator("==");
Amount(0);
}
}
Condition("InRegion")
{
Region("goal");
Tag("players_units")
{
Amount(0);
Operator(">");
}
}
}
Action()
{
[action];
}
}
In this example, both the TagCount (Are all units tagged "enemy_units
" dead?) and InRegion (Is at least one unit tagged "player_units
" in the region "goal
"?) checks have to become true to make the entire condition true.
CreateObjectType("[objective name]", "Objective")
{
Condition("OR")
{
Condition("TagCount")
{
Tag("enemy_units")
{
Operator("==");
Amount(0);
}
}
Condition("InRegion")
{
Region("goal");
Tag("players_units")
{
Amount(0);
Operator(">");
}
}
}
Action()
{
[action];
}
}
In this example, if the TagCount check become true, the entire condition will be true, regardless of if the InRegion is true or false. This goes vice versa for InRegion becoming true as well.
CreateObjectType("[objective_name]", "Objective")
{
Condition("Timer")
{
Time(60);
}
Action()
{
[action];
}
}
These are the most common condition types, but there are several more that are handy. See the DR2 Technical Reference Manual for more info.