Back to index.
A condition is something that is either true or false. It is used primarily for if blocks, while loops and wait until.
See also:
A condition is doing something or is in a particular state.
- get villagers ignore object resource
- object active
- object can view camera
- object left_right clicked
- object hit
- object hit land
- object hit land position
- object locked interaction
- object played
- object decayed
- object skeleton
- object of type types
- object on fire
- object in object hand
- object in limbo
- object not in object hand
- object is constant
- object is not constant
- object exists
- object not exists
- object frozen
- object hit by arrow
- object controlled by script
- object is moving
- object has damage decal
- object has damage cleave
These only work on navigable objects. Namely, villagers, animals, creatures and army units.
- object can navigate to coord_expression
- object can navigate to object object
- object preview nav ready
- can object preview nav succeed
- is navigation stable
These conditions test what state the sky is in
These conditions test the state of miracles, both normal and epic.
- spell constant in object
- spell constant for player expression
- player expresion spell charging
- player expresion specific spell charging
- wonder fire near coord_expression radius expression
- wonder in hand
These conditions test wheather dialogue, music and sound has been played, as well as tests on the advisors.
- constant music played
- spirit_type played
- spirit_type speaks expressions
- spirit_type speaks in expression
- dialogue ready
- spirit not ready
- read
- sound exists
- sound string playing
- music line expression
These conditions within them
These conditions test what a creature is doing.
- leash is in hand
- object cast by object
- creature constant is available
- desire of object is constant
- object leashed
- object leashed to object
- object knows action constant
- object fighting
- object is auto fighting
- ask creature object to enter scripted learning for constant with object
- creature object finished script action
These conditionives are in.
- get player expression objective constant status
- player expression objective constant complete
- land end objectives processed
- player expression objective constant hidden
These conditions test what state a town is in.
- is town object of size type constant
- is town object settlement
- town object is under takeover from player expression
- can town object recruit constant platoon of size expression
- can town object recruit constant siege weapon
- object in hand can be placed
- pilgrimage object ready
These conditions test what state videos and hand demos are in.
These conditions test what state the game is in, as well as providing general true/false functionality
These conditions test what state a villager is in
- object is male
- object is drowning
- animation marker string on object played
- villager object can be imprisoned
- villager object can react
- villager object available
- villager object using alternative mesh
These conditions test what state a platoon or a catapult is in.
- platoon object ranged
- platoon object melee
- platoon object melee fighting
- platoon object ranged fighting
- platoon object fighting
- platoon object attacking platoon object
- platoon object under fire
- platoon object idle
- army unit object is fighting
- object interacting with object
- object is on wall
- army flag constant held
- coord_expression is in range of object
- object recruiting
- object disbanding
- does platoon respond to town attack
- does platoon respond to local platoon attack
- platoon object current action is constant using object
- platoon object current action is constant using coord_expression
- siege weapon object current action is constant using object
- siege weapon object current action is constant using coord_expression
These conditions test what state a gate or wall is in
These conditions test what state the camera is in, as well as whethere the game is in widescreen or not.
- in widescreen
- camera ready
- cinema skipped
- widescreen transistion complete
- fade ready
- camera not ready
These conditions test what the player is doing, as well as what the menu and tooltips are doing.
- if bindable action constant performed
- key constant down
- mouse left_right_middle button down
- mouse left_right_middle opt_double clicked
- within rotation
- player has mouse wheel
- toolbar handle held
A conditions can be used to test whether or not a location is somewhere compared to another location.
- coord_expression viewed
- coord_expression ahead of camera
- player expression cast miracle MY_MIRACLE near coord_expression radius expression
- coord_expression valid for creature
- coord_expression left_right clicked radius expression
- fire near coord_expression radius expression
- coord_expression near coord_expression radius
- coord_expression not near coord_expression radius
- coord_expression at coord_expression
- coord_expression not at coord_expression
- coord_expression near constant cast by player expression radius effect range expression
- coord_expression is under landscape
- coord_expression and coord_expression on same side of line between coord_expression and coord_expression
- coord_expression on land
- coord_expression under water
- position coord_expression scrubbed radius epression
Operators that return BOOLEAN values.
- not condition
- condition and condition
- condition or condition
- expression == expression
- expression != expression
- expression >= expression
- expression <= expression
- expression > expression
- expression < expression
6.1.1 get villagers ignore object resource
returns whether or not villagers are ignore the fact that the object has a resource
Ignoring = get villagers ignore MyTree resource
If an object is active - eg. ScriptHighlight is active, spell dispenser active or reward is opened
Reward active
Returns if an object can view the camera
LostBrother can view camera
If an object clicked and has been clicked in the last few seconds then this check is true.
Checks what if an object.
Checks if an object.
Puck hit land
Checks where the object.
Puck hit land position
If an object is in locked interaction - eg. Totem moving up and down, creature stroking.
A check on if an object has finished playing it's animation or if weather has finished it's current storm.
LostBrother played
A check on an object to see if it is decayed
LostBrother decayed
A check on an object to see if it is a skeleton
LostBrother skeleton
A check on an object to see if it is of a certain type
Animal of type ANIMAL COW
A check on an object to see if it is on fire.
LostBrother on fire
Checks if in an object.
MyToy in MyCreature hand
Checks if in an object is in limbo
Johhny in limbo
Checks if in an objects hand.
MyToy not in MyCreature hand
Casts the result of a get property to BOOLEAN - Not sure if this function is used...
MyHouse is HOUSE_A
Checks if an object.
MyHouse is not HOUSE_A
checks a variable to see if it has a game thing.
LostBrother exists
Checks a variable to see if it has not been assigned a game thing.
LostBrother not exists
returns true if object is frozen
if MyGoolies frozen
returns true if the given object has been hit by an arrow. must have physics tracking enabled.
if MyVillager hit by arrow
returns true if the object is at the final position in its waypoint schedule
MonsterFood controlled by script
returns true if the object is moving from one location to another (as opposed to moving on the spot or wanting to move somewhere)
Army324 is moving
returns true if the has a damage decal on it
RodleHouse has damage decal
returns true if the has been cleaved
TorledHouse has damage cleave
Does navigation think this object can navigate succesfully to the indicated position. This may not be stable, even if 'is navigation stable' returns true... as the player may build a wall in the way after the navigation starts...
OverLord can navigate to {GodHome}
See also:
Does navigation think this object. This may not be stable, even if 'is navigation stable' returns true... as the player may build a wall in the way after the navigation starts...
OverLord can navigate to [object](objects.md#8) GodHome
has the preview nav finished calculating?
ReadyToCheck = MyPlatoon preview nav ready
can the platoon's preview nav succeed
CanGo = can MyPlatoon preview nav succeed
is a call to 'object' guaranteed?
is navigation stable
See also:
checks to see if the sky is in transition
[wait until](statements.md#3.25.1) sky is in transition
Is the hand over the sky?
[wait until](statements.md#3.25.1) hand over sky
Has an object got a spell. (Worship sites/towns/towncentres)
spell MAGIC_TYPE_WOOD in MyWorshipSite
checks if a player has a specific spell
spell SPELL_HEAL_LEVEL_1 for player 1
Check if a spell (any) is charging for a player
player 1 spell charging
Check if a specific spell is charging for a player
player 1 spell SPELL_FOOD charging
Returns true if a wonder has recently been fired near the specified location
if wonder fire near {ScriptLoc} radius 100
Returns true if the player's hand is holding a wonder spell
if wonder in hand
Returns if the script music passed is no longer playing
MUSIC_TYPE_SCRIPT_MISSIONARIES_VERSE_1 music played
6.5.2 spirit_type played
A check on if a spirit_type has finished playing it's animation.
good spirit played
6.5.3 spirit_type speaks expressions
A check on if a spirit_type speaks the text? Hasn't been used in a long time. May not work.
good spirit speaks 102
6.5.4 spirit_type speaks in expression
Does the spirit_type speak in the text group? Hasn't been used in a long time. May not work.
good spirit speaks in GroupID
Returns if we can have dialogue control.
dialogue ready
Returns true if a spirit is not ready.
spirit not ready
Checks if text is being outputted to the screen. Often used after a say statement in the form: wait until read.
read
checks if a player has sound
sound exists
Is a say sound playing?
if say sound "HELP_TEXT_DEFINITELY_NEWEST_INTRO_01" playing
Look at the last line of music that was playing. Has not been used for a long time and may not work.
[wait until](statements.md#3.25.1) music line 6
Returns all members of a flock within their flock limits?
MyFlock within flock limits
Checks if an object is within a container ie. Dance, Flock or Town.
MySheep in MyFlock
Checks that an object is not within a container.
MySheep not in MyFlock
Checks if the creature leash is in the hand
[wait until](statements.md#3.25.1) leash is in hand
A check on if an object. Hasn't been used in a long time. May not work.
MySpell cast by MyCreature
6.7.3 creature constant is available
See if player has a creature type available.
creature CREATURE_TYPE_LEOPARD is available
Compares the desire of an object to a specified desire. Suitable for checking the desire of a creature.
desire of MyCreature is TO_REST
Returns if an object is leashed or not.
[object](objects.md#8) leashed
Returns if an object or not.
MyCreature leashed to Rock
Returns if an object knows an action (see CREATURE_ACTION_KNOWN_ABOUT in enum.h)
MyCreature knows action CREATURE_ACTION_KNOWN_ABOUT_BUILD
Returns if a creature object is fighting.
[object](objects.md#8) fighting
checks if a creature is auto fighting whenin a fight. This hasn't been used for a long time and may not work.
[object](objects.md#8) is auto fighting
Asks the creature to enter scripted learning mode. This hasn't been used for a long time and may not work.
IsInLearning = ask creature MyCreature to enter scripted learning for CREATURE_THROW_BALL_AT_OBJECT with Mouth
6.7.11 creature object finished script action
returns true if the given creature has finished a script action
if creature MyCreature finished script action
6.8.1 get player expression status
gets the status of an objective
ObjStat = variable get player 0 [object](objects.md#8)ive TRIBUTE_OBJECTIVE_COLLECT_WOOD status
6.8.2 player expression complete
Check to see if an objective is complete
if player 0 [object](objects.md#8)ive TRIBUTE_OBJECTIVE_COLLECT_WOOD complete
6.8.3 land end objectives processed
Have the end of land objectives been processed
[wait until](statements.md#3.25.1) land end [object](objects.md#8)ives processed
6.8.4 player expression hidden
Check to see if an objective is hidden
if player 0 [object](objects.md#8)ive TRIBUTE_OBJECTIVE_COLLECT_WOOD hidden
how big is a town - village, town, city?
is town BigTown of size type SCRIPT_SETTLEMENT_SIZE_TOWN
6.9.2 is town object settlement
is the town object actually a settlement?
is town MyTown settlement
returns true if the town is being taken over by the player
[wait until](statements.md#3.25.1) town MyTown is under takeover from player 1
Returns true if the town can recruit x soldiers
CanRecruit = can town MyTown recruit ARMY_UNIT_TYPE_MELEE_1 platoon of size 100
6.9.5 can town object siege weapon
Returns true if the town can recruit the siege weapon
CanRecruit = can town MyTown recruit SIEGE_BALANCE_TYPE_CATAPULT_LEVEL_1 siege weapon
returns whether the building placement in the hand can be placed
CanPlace = [object](objects.md#8) in hand can be placed
6.9.7 pilgrimage object ready
returns true if a pilgrimage object is ready to be asked to accept or decline
if pilgrims [object](objects.md#8) ready
checks to see if a video is playing
[wait until](statements.md#3.25.1) not video is playing
Checks to see if a hand demo is running
hand demo played
If the hand demo trigger has been set to TRUE. The hand demo can be created with triggers. Calling this will tell when a trigger is come across. Not that triggers are clear once this function is called.
hand demo trigger
6.11.1 expression second[s]
Waits for a number of second(s) to elapse from the moment the instruction is called.
Returns if the help system is on.
help system on
Returns if the creature help system is on.
creature help on
returns true if the game is in min spec
if game is min spec
Checks the sex of an object for if it's male.
Checks if the object is drowning. May provide odd results for non-villagers.
returns true if the animation marker has been reached
animation marker "MyMarker" on MyVillager played
6.12.4 villager object can be imprisoned
returns true if the villager object can be imprisoned
villager MyLittleThief can be imprisoned
6.12.5 villager object can react
returns true if the villager object can react
villager MyLittleThief can react
6.12.6 villager object available
returns false if the villager object is doing anything easily testable for
villager MyBigBoy available
6.12.7 villager object using alternative mesh
returns true if the position is on land
villager Guy42 using alternative mesh
6.13.1 platoon object ranged
returns true if the given platoon is ranged
platoon MyPlatoon ranged
6.13.2 platoon object melee
returns true if the given platoon is melee
platoon MyPlatoon melee
6.13.3 platoon object melee fighting
returns true if the platoon is currently engaged in fisticuffs
platoon MyPlatoon melee fighting
6.13.4 platoon object ranged fighting
returns true if the platoon is currently ranged fighting
platoon MyPlatoon ranged fighting
6.13.5 platoon object fighting
returns true if the platoon is currently fighting
platoon MyPlatoon fighting
returns true if the platoon is currently fighting with the second platoon
if platoon MyPlatoon attacking platoon TheirPlatoon
6.13.7 platoon object under fire
returns true if the platoon is currently being shot at
if platoon MyPlatoon under fire
6.13.8 platoon object idle
returns true if the platoon is idle
[wait until](statements.md#3.25.1) platoon MyPlatoon idle
6.13.9 army unit object is fighting
returns true if the unit is fighting
if army unit SwordGuy is fighting
Is object. Works only on creatures and platoons.
MyCreature interacting with Totem
Returns true if the object is on a wall. Works for army units.
if MyGuy is on wall
checks to see if the given type of army flag is held
[wait until](statements.md#3.25.1) army flag ARMY_FLAG_INFO_GREEK_MELEE held
checks to see if the position is within firing range of the object (siege weapon or ranged platoon)
[wait until](statements.md#3.25.1) {TownCentre} is in range of MyTroops
checks to see if a platoon or siegeweapon is recruiting
[wait until](statements.md#3.25.1) not MyPlatoon recruiting
checks to see if platoon is disbanding
[wait until](statements.md#3.25.1) MyPlatoon disbanding
Returns true if platoon is set to respond to attack on that town
ResponseEnabled = does platoon MyPlatoon respond to town MyTown attack
Returns true if platoon is set to respond to attack on local platoons
ResponseEnabled = does platoon MyPlatoon respond to local platoon attack
Returns true if platoons current action is the one specified
if platoon MyPlatoon current action is PLATOON_AGENDA_ACTION_ATTACK_TOWN_CENTRE_FOR_TAKE_OVER using MyTown
Returns true if platoons current action is the one specified
if platoon MyPlatoon current action is PLATOON_AGENDA_ACTION_MOVE_TO_POS using {MyPos}
Returns true if siege weapons current action is the one specified
if siege weapon MyCatapult current action is SIEGEWEAPON_AGENDA_ACTION_ATTACK_THING using MyWall
Returns true if siege weapons current action is the one specified
if siege weapon MyCatapult current action is SIEGEWEAPON_AGENDA_ACTION_MOVE_TO_POS using {MyPos}
6.14.1 gate object open
returns true if the given gatehouse object is open
gate TheTownGatehouse is open
6.14.2 gate object moving
returns true if the given gatehouse object is moving
gate TheTownGatehouse is moving
Returns true if two objects are connected (wall towers connected by a wall)
Connected = does MyTower connect to MyOtherTower
Checks are we in a widescreen section.
[wait until](statements.md#3.25.1) in widescreen
Has the camera has reached the position it is going to.
[wait until](statements.md#3.25.1) camera ready
Has the interruptible cinema been skipped
if cinema skipped
Has the widescreen transition finished.
[wait until](statements.md#3.25.1) widescreen transition complete
Has the fade transition finished.
[wait until](statements.md#3.25.1) fade ready
camera not ready
6.16.1 if bindable action constant performed
returns whether this bindable action is currently being performed
if bindable action BINDABLE_ACTION_TILT_ROTATE_ON performed
6.16.2 key constant down
If an key is pressed down.
key KB_SPACE down
If a mouse button is down.
mouse left button down mouse middle button down
If a mouse button is clicked or double clicked.
mouse left button clicked
Is the player within the interface rotation border?
within rotation
Returns if the player has a mouse wheel.
player has mouse wheel
returns true if the toolbar handle is currently held
if toolbar is held
6.17.1 coord_expression viewed
Is a position on screen.
{House} viewed
6.17.2 coord_expression ahead of camera
Is a position ahead of the camera plane
if {House} is ahead of camera
Detects whether a miracle has been cast at a position. Triggers when the miracle is poured or bounces.
if player 0 cast miracle MIRACLE_TYPE_HEAL near {MyMarker} radius 15
6.17.4 coord_expression valid for creature
Is the position valid for a creature to be at (Eg. Not a mountain side).
{SheepPos} valid for creature
If the last postion clicked (if in the last few seconds) is within the defined radius of the defined position this check is true.
{House} right clicked radius 5
A check on an position to see if it there is a fire within the defined radius.
fire near {WoodPile} radius 10
6.17.7 coord_expression radius
Checks if a position is within a radius of another position.
{MyVillager} near {VillagerHome} radius 20
6.17.8 coord_expression radius
Checks that a position is not within a radius of another position.
{MyVillager} not near (VillagerHome} 20
Checks if a position is the same as another position.
{MyVillager} at {VillagerHome}
Checks that a position is not the same as another position.
{MyVillager} not at {VillagerHome}
returns true if the spell has been cast within the given range of the given point
{MonsterMine} near SPELL_TYPE_HEAL cast by player 0 radius effect range 50
6.17.12 coord_expression is under landscape
returns true if the given position is under the landscape
{MyPos} is under landscape
returns true if the two given positions are on the same side of the line defined by two positions
{EnemyPlatoon} and {HomeTown} on same side of the line between {WestPos} and {East Pos}
6.17.14 coord_expression on land
returns true if the position is on land as opposed to on the occean
{Rock} on land
6.17.15 coord_expression under water
returns true if the position is under the level of the water. If an object is far enough under the landscape, it will also be under the water.
{Rock} under water
6.17.16 position coord_expression scrubbed radius epression
Has this position just been scrubbed with the fist?
[wait until](statements.md#3.25.1) {MyPos} scrubbed radius 10
Returns true when the condition is not true.
Returns true when both conditions are true.
Returns true when one or more of the conditions is true.
Returns true when the expression evaluate as the same.
Returns true when the expression do not evaluate as the same.
Returns true when the expression right of the operator.
Returns true when the expression right of the operator.
Returns true when the expression right of the operator.
Returns true when the expression right of the operator.