A condition is something that is eaither true or false. It is used primarily for if blocks, while loops and wait until.
See also:
A condition is something that is eaither true or false. These conditions can be used to test whether or not any object is doing something or is in a particular state.
These only work on navigatable objects. Namely, villagers, animals, creatures and army units.
These conditions test what state the sky is in
These conditions test the state of miracles, both normal and epic.
These conditions test wheather dialogue, music and sound has been played, as well as tests on the advisors.
These conditions test containers and the objects within them
These conditions test what a creature is doing.
These conditions test what state objectives are in.
These conditions test what state a town is in.
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
These conditions test what state a platoon or a catapult is in.
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.
These conditions test what the player is doing, as well as what the menu and tooltips are doing.
A condition is something that is eaither true or false. These conditions can be used to test whether or not a location is somewhere compared to another location.
Operators that return BOOLEAN values.
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 is the last object clicked and has been clicked in the last few seconds then this check is true.
Checks what if an object hit something since you last checked. Must have physics tracking enabled on the object.
Checks if an object has hit the land since you last checked. Must have physics tracking enabled on the object.
Puck hit land
Checks where the object hit the land. Must have physics tracking enabled on 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 is in an objects hand. Suitable for checking if a creature is holding a particular object.
MyToy in MyCreature hand
Checks if in an object is in limbo
Johhny in limbo
Checks if in an object is not 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 is not a specified constant.
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 can navigate succesfully to the indicated 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 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 can navigate to coord_expression' guaranteed?
is navigation stable
See also:
checks to see if the sky is in transition
wait until sky is in transition
Is the hand over the sky?
wait until 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
A check on if a spirit_type has finished playing it's animation.
good spirit played
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
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 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 leash is in hand
A check on if an object (Spell) was cast by a specific object. Hasn't been used in a long time. May not work.
MySpell cast by MyCreature
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 leashed
Returns if an object is leashed to 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 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 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
returns true if the given creature has finished a script action
if creature MyCreature finished script action
gets the status of an objective
ObjStat = variable get player 0 objective TRIBUTE_OBJECTIVE_COLLECT_WOOD status
Check to see if an objective is complete
if player 0 objective TRIBUTE_OBJECTIVE_COLLECT_WOOD complete
Have the end of land objectives been processed
wait until land end objectives processed
Check to see if an objective is hidden
if player 0 objective TRIBUTE_OBJECTIVE_COLLECT_WOOD hidden
how big is a town - village, town, city?
is town BigTown of size type SCRIPT_SETTLEMENT_SIZE_TOWN
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 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
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 in hand can be placed
returns true if a pilgrimage object is ready to be asked to accept or decline
if pilgrims object ready
checks to see if a video is playing
wait until 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
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
returns true if the villager object can be imprisoned
villager MyLittleThief can be imprisoned
returns true if the villager object can react
villager MyLittleThief can react
returns false if the villager object is doing anything easily testable for
villager MyBigBoy available
returns true if the position is on land
villager Guy42 using alternative mesh
returns true if the given platoon is ranged
platoon MyPlatoon ranged
returns true if the given platoon is melee
platoon MyPlatoon melee
returns true if the platoon is currently engaged in fisticuffs
platoon MyPlatoon melee fighting
returns true if the platoon is currently ranged fighting
platoon MyPlatoon ranged 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
returns true if the platoon is currently being shot at
if platoon MyPlatoon under fire
returns true if the platoon is idle
wait until platoon MyPlatoon idle
returns true if the unit is fighting
if army unit SwordGuy is fighting
Is object interacting with an 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 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 {TownCentre} is in range of MyTroops
checks to see if a platoon or siegeweapon is recruiting
wait until not MyPlatoon recruiting
checks to see if platoon is disbanding
wait until 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}
returns true if the given gatehouse object is open
gate TheTownGatehouse is open
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 in widescreen
Has the camera has reached the position it is going to.
wait until camera ready
Has the interruptible cinema been skipped
if cinema skipped
Has the widescreen transition finished.
wait until widescreen transition complete
Has the fade transition finished.
wait until fade ready
camera not ready
returns whether this bindable action is currently being performed
if bindable action BINDABLE_ACTION_TILT_ROTATE_ON performed
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 buttonclicked
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
Is a position on screen.
{House} viewed
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
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
Checks if a position is within a radius of another position.
{MyVillager} near {VillagerHome} radius 20
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
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}
returns true if the position is on land as opposed to on the occean
{Rock} on land
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
Has this position just been scrubbed with the fist?
wait until {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 on the left of the operator evaluates to be greater than or equal to the expression right of the operator.
Returns true when the expression on the left of the operator evaluates to be less than or equal to the expression right of the operator.
Returns true when the expression on the left of the operator evaluates to be greater than the expression right of the operator.
Returns true when the expression on the left of the operator evaluates to be less than the expression right of the operator.
This documentation generated by LHDOC, © Lionhead Studios 2000