Lionhead Challenge Language Documentation

Up to contents.

3 Statements

Statements appear in the body section of scripts. There are many statements available for you to use. Each of them results in something happening somewhere! Statements do not return a result.

See also:

3.1 Statements using generic objects

These statements can be used (generally) to control any object.

  1. move object position to position
  2. set object position to position
  3. set object resource constant to expression
  4. set object focus to position
  5. set object focus on object
  6. play anim string on object opt_loop opt_stand
  7. set object anim constant
  8. set object physics balance expression
  9. override object anim constant
  10. cancel object anim override
  11. delete object
  12. set object in player expression hand
  13. set object velocity heading position speed expression
  14. set object target coord_expression time expression
  15. set object temperature expression
  16. set object player expression
  17. release object
  18. release object focus
  19. enable_disable object can be leashed to
  20. set object colour red expression green expression blue expression
  21. reset object colour
  22. set object secondary colour red expression green expression blue expression
  23. stop object moving
  24. move object to limbo
  25. release object from limbo
  26. set object angular velocity x expression y expression z expression
  27. override mesh for object with string
  28. enable/disable object indestructible
  29. enable/disable object hurt by fire.
  30. enable/disable object set on fire
  31. enable/disable object on fire expression
  32. enable_disable fire system
  33. enable_disable floaty icons
  34. enable/disable object moveable
  35. enable/disable object pickup
  36. enable/disable pickup type constant
  37. set object alpha expression
  38. set lava running at coord_expression heading coord_expression radius expression
  39. set object shake expression
  40. enable_disable object reactable
  41. enable_disable object can be fisted
  42. enable_disable object interactable
  43. enable_disable object cylindar override
  44. enable_disable object physics tracking
  45. clear object hit object
  46. clear object hit land
  47. enable/disable force object renderable

3.2 Statements involving state driven objects

Statements controlling state driven objects. These are objects such as villagers and animals (but not the creature)

  1. enable_disable anim events on object
  2. set object anim event probability
  3. Controlling Villagers
    1. move villager object focus to coord_expression
    2. set object disciple constant opt_sound
    3. set housewife object pregnant by object
    4. set object to follow object at distance expression
    5. enable/disable object skeleton
    6. set object carrying constant
    7. enable_disable villager object can be imprisoned
    8. set villager object default speed to constant
    9. enable_disable villagers ignore object resource
    10. enable_disable object alternative mesh
    11. play paired anim constant on object with object (snap to position)
    12. set anim speed of object to expression
    13. reset object anim speed
    14. reset object speed

3.3 Statements involving visual effects

Statements controlling visual effects

  1. enable_disable object visible
  2. enable_disable object pulse (speed expression) (with fadetime expression)
  3. enable_disable object additive
  4. enable_disable object secondary additive
  5. stop visual effect object
  6. remove visual effect object target at coord_expression
  7. add object target at coord_expression
  8. set visual effect target object
  9. enable_disable object pulse (speed expression) (with fadetime expression)

3.4 Statements involving migrations

Statements controlling the migration of villagers betwene towns

  1. start migration from town object to town object
  2. enable_disable migration from object to object
  3. enable_disable migration object can be declined
  4. enable_disable migration from town object to all other towns
  5. set migration threshold between town object and town object
  6. enable_disable player town migration
  7. enable_disable town object impressiveness override opt_amount
  8. accept pilgrims object
  9. decline pilgrims object

3.5 Statements affecting players

Statements that change values for players.

  1. set player expression mana expression
  2. set player expression alignment expression
  3. set player expression town object capture reason constant
  4. enable_disable spell constant for player expression
  5. clear player expression spell charging
  6. set object player expression relative belief
  7. enable_disable player expression virtual influence

3.6 Statements Affecting Buildings

Statements controlling houses and other buildings.

  1. enable_disable abode object
  2. enable/disable villagers can build object
  3. set field object height to expression
  4. enable_disable monster mine object

3.7 Statements Affecting Epic Miracles

Statements that allow scripts to control epics. These are used for dynamic epic cutscences and the like.

  1. stop spell object
  2. invoke spell stage
  3. create expression worshippers at object
  4. create epic constant at coord_expression
  5. enable_disable predefined sky string time expression

3.8 Statements Affecting Video Playback

Statements that allow scripts to play videos and fine tune their display.

  1. play video string
  2. play video string with sound string
  3. set object clipping window left expression top expression width expression height expression
  4. stop video

3.9 Statements Controlling Physics

Statements that controll the physics system, as well as create phyics forces.

  1. set physics from hand with strength position radius expression
  2. set capture radius for physics objects to expression
  3. set physics at position position with strength position radius expression random expression
  4. remove all objects in physics
  5. delete all objects in physics

3.10 Statements Affecting Spread Effects

Statements that create spread effects, like heat, and statements that change the displayed alignment of an area.

  1. add effect EFFECT_TYPE at position strength expression radius expression
  2. set ground alignment to expression at coord_expression radius expression amount expression
  3. set lava puddle at coord_expression radius expression temperate expression

3.11 Statements Affecting Gates

Statements that controll gates.

  1. set gate object open
  2. set gate object close
  3. enable_disable gate can open for platoons

3.12 Statements Controlling game objectives

These statements control the game objectives. e.g. mine a x amount of ore

  1. process land end objectives
  2. set player expression objective TRIBUTE_OBJECTIVE_TYPE status to TRIBUTE_OBJECTIVE_STATE
  3. set player expression objective class constant amount expression
  4. reset all objectives for player expression
  5. set player expression objective constant with LOTS OF PARAMETERS
  6. set player expression objective constant icon constant
  7. set player expression objective constant amount expression
  8. set player expression objective constant parent objective constant
  9. set player expression objective text string opt_amount
  10. set player expression objective description string
  11. disable player expression objective constant
  12. reset player expression objective constant
  13. set player expression objective constant value expression

3.13 Statements Controlling the Whole Game

These statements control what is happening in the game such as changing game settings or the level

  1. enable_disable game can be lost
  2. enable_disable global influence
  3. set min height camera experssion focus expression
  4. enable_disable text skip
  5. enable_disable villager interaction manager
  6. enable_disable can use destruction tool
  7. enable_disable tribute visual
  8. enable_disable disciple placedown speech
  9. enable_disable single active speech
  10. force save load
  11. play credits
  12. force save goto menu
  13. enable_disable dialogue manager
  14. enable_disable heartbeat sound
  15. enable_disable constant menu
  16. enable_disable pause menu in widescreen
  17. enable_disable interface action constant
  18. enable_disable creature icon visible
  19. enable_disable army flag in widescreen
  20. enable_disable objective list in widescreen
  21. enable_disable toolbar in cutscene
  22. enable_disable build out of town within influence
  23. enable_disable performance checking
  24. add performance stat called string
  25. set persistent data constant to expression
  26. enable/disable influence
  27. enable/disable influence visual effect
  28. enable/disable blooming
  29. exit game
  30. enable/disable help system
  31. set interaction constant
  32. set game speed to expression
  33. Load Map "Filename"
  34. enable_disable loading screen
  35. save game in slot expression
  36. set fade red expression green expression blue expression time expression
  37. set fade in time expression
  38. enable_disable leash draw
  39. enable_disable highlight draw
  40. enable_disable spell icon draw
  41. enable/disable force flag draw
  42. enable/disable force tooltip draw
  43. enable_disable shadows
  44. enable/disable markers
  45. set cameratool object to object
  46. increment tribute by expression
  47. decrement tribute by expression
  48. force auto save
  49. skip current cutscene
  50. empty player hand

3.14 Statements Controlling Dynamic Music

These statements control the dynamic music system of the game.

  1. start dynamic music
  2. stop dynamic music
  3. set dynamic music string loop expression (urgent)

3.15 Statements Controlling Towns

These statements control objects which are specifically towns, as well as adjusting the ways in which the player can interact with their towns.

  1. set research ARTEFACT available to RESEARCH_AVAILABILITY
  2. enable_disable town object can be taken by force
  3. extend town object influence by expression
  4. set town object maximum population to expression
  5. build all town object buildings in group expression
  6. set object emergency for 20 seconds
  7. stop object emergency
  8. set town object desire for constant to expression
  9. enable_disable town object job constant
  10. enable/disable personalisations
  11. enable_disable spell constant in object
  12. enable_disable town object desire speech

3.16 Statements Controlling the interface

Allows you to the toolbar, the interface, floaty icons, and whatever appears in wide screen.

  1. enable_disable build menu override (with constant)
  2. set toolbar menu to constant
  3. enable_disable toolbar
  4. enable_disable objective window
  5. enable_disable toolbar pause
  6. enable_disable toolbar locked
  7. highlight toolbar item expression
  8. clear toolbar highlight
  9. remove world icon expression
  10. enable_disable hand icon draw
  11. enable_disable hand demo icon
  12. enable_disable hand text draw
  13. set hand icon constant
  14. set mouse position x expression y expression
  15. set hand height multiplier expression
  16. set maximum hand distance to expression
  17. set bindable hand icon constant
  18. set hand icon text string
  19. set toolbar state to constant
  20. enable_disable tribute menu scroll
  21. set tribute menu selection to constant
  22. trigger floaty number FLOATY_ENUM at coord_expression (importance expression) (icon FLOATY_ENUM) (value expression)
  23. enable_disable floaty number draw in widescreen
  24. clear left_right clicked object
  25. clear left_right clicked position
  26. clear left_right button opt_double clicked
  27. enable/disable force tooltip draw
  28. enable_disable script controlled migration player expression

3.17 Controlling Objects which are Creatures

Creatures are more complex than other game objects, so further control functions have been created to manipulate them. Creature desires are things that motivate him, eg: CREATURE_DESIRE_HUNGER, CREATURE_DESIRE_ANGER, (see CreatureEnum.h)

  1. enable_disable object action availability constant
  2. set object desire constant to expression
  3. set object only desire constant
  4. set object disable only desire
  5. set object desire constant constant
  6. set object constant development
  7. set creature object role to constant radius expression
  8. set object magic properties constant time expression
  9. enable_disable object attack own town
  10. enable_disable right hand only for object
  11. enable_disable object can learn constant
  12. enable_disable object auto scale opt_expression
  13. set object all desire constant
  14. set object desire maximum constant to expression
  15. set object priority expression
  16. set player expression creature to object
  17. teach object constant constant constant
  18. teach object all
  19. teach object all excluding constant
  20. force object constant object with object
  21. force object constant object object
  22. force object constant object with coord_expression
  23. initialise number of constant for object
  24. force action object finish
  25. enable object confined to coord_expresison radius expression
  26. disable object confined
  27. clear dropped by object
  28. attach object leash to object
  29. attach object leash to hand
  30. enable/disable leash on object
  31. toggles player expression leash
  32. detach object leash
  33. load midi file string on object
  34. add note expression on object using object with sound string (anim string)
  35. play midi object
  36. set object home position coord_expression
  37. clear last gesture
  38. set object name constant
  39. enable_disable object navigation
  40. disable object can drop
  41. request creature move to position distance expression
  42. request creature play individual anim expression
  43. request creature play static anim string expresion seconds
  44. request creature object action constant object object
  45. set creature object hair length expresion
  46. release creature object hair length
  47. snap creature object focus to coord_expression
  48. set creature object CREATURE_SCRIPT_TRANSITIONAL_ATTRIBUTE_TYPE expression opt_time
  49. enable_disable creature object flag visible
  50. enable_disable drawing all flags
  51. enable_disable creature object flip animation
  52. enable_disable script creature object run
  53. set creature object walk override injured
  54. set creature object walk override sad
  55. set creature object walk override angry
  56. set creature object walk override scared
  57. cancel creature object walk override
  58. set creatures object hapiness to maximum
  59. set creature object script thought text text_string
  60. clear creature object script thought
  61. set creature object energy to expression
  62. enable_disable script creature object interaction
  63. ask creature object to leave scripted learning
  64. enable_disable tooltip on creature object
  65. play anim constant on object loop
  66. load my_creature at coord_expression
  67. save my_creature
  68. load creature string player expression at coord_expression

3.18 Controlling Armies

Controlling Armies

  1. add object to platoon object attack list
  2. remove object to platoon object attack list
  3. add coord_expression to waypoint list object
  4. move object along object with patrol constant
  5. object attack object with severity expression
  6. object attack buildings near coord_expression radius expression
  7. set object attack everything near coord_expression radius expression
  8. merge platoon object into platoon object
  9. enable/disable platoon object merge
  10. enable/disable platoon object split
  11. enable/disable platoon object camp
  12. thread platoon object to platoon object
  13. remove platoon object from platoon object
  14. disband army object
  15. disband a platoon object
  16. set army object formation to formation_type_enum
  17. set platoon object experience to expression
  18. increment platoon object experience
  19. enable_disable town manager
  20. set town object platoon type constant at ratio expression
  21. set town object army type constant platoon ratio on wall to expression
  22. set platoon take over town
  23. remove villager object from platoon
  24. add villager to platoon
  25. set platoon object formation to expression wide by expression deep
  26. set platoon stat constant of object to expression
  27. set platoon movement value constant of object to expression
  28. add action constant using object to platoon action queue
  29. add action constant using object to front of platoon action queue
  30. add action constant using object to next in platoon action queue
  31. add action constant using coord_expression to platoon action queue
  32. add action constant using coord_expression to front of platoon action queue
  33. add action constant using coord_expression to next in platoon action queue
  34. clear platoon action queue
  35. remove current action from platoon action queue
  36. remove action expression from platoon action queue
  37. reset platoon object movement stats
  38. force platoon object camp
  39. set town object siege weapon type constant to expression
  40. add action constant using object to siege weapon object action queue
  41. add action constant using object to front of siege weapon object action queue
  42. add action constant using object to next in siege weapon object action queue
  43. add action constant using coord_expression to siege weapon object action queue
  44. add action constant using coord_expression to front of siege weapon object action queue
  45. add action constant using coord_expression to next in siege weapon object action queue
  46. clear siege weapon object action queue
  47. remove current action from siege weapon object action queue
  48. remove action expression from siege weapon object action queue
  49. enable_disable platoon response to town attack
  50. enable_disable platoon response to local platoon attack
  51. enable_disable platoon object respond to player army
  52. enable_disable platoon object eating
  53. set flock object to migration
  54. town object capture all enemy towns
  55. enable_disable siege weapon object auto attack
  56. enable_disable scripted platoon get on enemy wall
  57. set initial level of player melee platoon to constant
  58. set initial level of player ranged platoon to constant
  59. set initial level of player siege weapon to constant
  60. enable_disable show army bubbles
  61. set all platoon of town object to town object
  62. enable_disable show army set effect
  63. enable_disable platoon object can disband
  64. enable_disable leashing on platoon object

3.19 Statements controlling timers

Some scripts may have time limits on them, for these you can set up a timer which can be accessed for triggers dependant on time left.

  1. set object time to expression second[s]

3.20 Statements controlling the depth of field

These statements allow for fine control of the depth of field.

See also:

  1. set depth of field strength multiplier to expression
  2. set depth of field distance multiplier to expression

3.21 Controlling Containers

An object can be a container ie. Dance, Flock or Town; something which holds a number of objects. This container can be manipulated and generally effects the group of objects within the container. Some functions on objects can be called on containers too, eg. delete, set position, etc.

  1. disband object
  2. populate object with expression constant
  3. set object properties inner expression outer expression
  4. set flock object to coord_expression with radius expression
  5. set flock object altitude to expression
  6. nominate object as leader for flock object
  7. add object to flock object

3.22 Time Functions

The in game time of day can be set and got by a script, but also the real world time details can be accessed for Easter Egg scripts.

  1. set game time expression
  2. move game time expression time expression
  3. enable_disable game time

3.23 Reactions.

Reactions can be set up to effect people around the defined area. The constants used can be found in Enum.h Reactions will work on script markers as well as objects.

  1. create reaction object constant
  2. detach reaction object
  3. detach constant reaction object

3.24 Running Scripts

Any calls to run script outside of a scripts begin-end block is in auto run. However scripts can be run from other scripts, then return to the script caller, or run the script and continue processing the current script.

See also:

  1. run script identifier
  2. run background script identifier
  3. Stop Script string
  4. Stop All Scripts Exclusing string
  5. Stop Scripts Files string
  6. Stop Scripts in File string excluding string
  7. Stop All Scripts Exclusing Files string
  8. run map script line string

3.25 Wait conditions

It is possible to stop script progress until a condition is successful. There are two versions available for wait; for good reading the script author can use the optional word 'until'.

  1. wait until condition
  2. wait condition

3.26 Sound and Music

Sound and music can be played with the scripts to the same quality as in the game.

  1. start music string opt_fadetime opt_music_loop
  2. stop music opt_fadetime
  3. attach music string to object opt_range
  4. detach music from object
  5. move music from object to object
  6. enable_disable music on object
  7. restart music on object
  8. set object music position to coord_expression
  9. enable_disable alignment music
  10. set object atmos group expression time expression opt_id
  11. set camera atmos group expression time expression opt_id 0
  12. attach atmos string to camera opt_range opt_volume
  13. attach atmos string to object
  14. detach atmos from object
  15. detach atmos from camera
  16. enable_disable atmos sound string fade
  17. enable_disable simulation sound opt_fadetime
  18. enable_disable atmos sound
  19. set atmos volume expression
  20. destroy mixer expression opt_fadetime
  21. set mixer expression channel AUDIO_MIXER_CHANNEL to expression opt_fadetime
  22. set mixer expression to string opt_fadetime
  23. set auto mixer override on object channel constant min expression max expression
  24. reset auto mixer override
  25. release loop
  26. play string sound string opt_volume opt_loop opt_pitch
  27. play sound string at coord_expression opt_volume opt_loop opt_pitch
  28. play random sound from group string at coord_expression
  29. stop sound string
  30. release sound string
  31. attach opt_3d sound string to object
  32. detach sound string from object

3.27 Weather Storms

Creates weather conditions.

  1. set precipitation at coord_expression radius expression enable_disable rainfall enable_disable snowfall enable_disable overcast
  2. set object properties rainfall expression snowfall expression overcast speed expression
  3. set cloud object altitude expression
  4. set cloud generation expression
  5. set cloud object points to expression
  6. set cloud object size to x expression y expression z expression
  7. set lightning strike at coord_expression from object
  8. set cloud for object above coord_expression
  9. set sandstorm object position moving to position strength expression radius expression
  10. set cloud alignment to expression at coord_expression radius expression
  11. enable/disable object affected by wind

3.28 state object constant expression> expression, expression> coord_expression>

This is a dangerous feature, where you can set the object in a state. Do not set them into a simulation state as it may go mad! States have data which needs to be set up for the specific statae, the float, ulong, and position params may need to be filled for the state. BE CAREFUL!

state LostBrother LIVING_IN_SCRIPT

3.29 Statement Blocks

Certain things in Black and white insist that they have control start and control release sections. Example the camera must be free for control before you do anything. Putting these in blocks inforces the programmer to release control properly. Other parts of the internal language require blocks for parsing reasons. Exmaple: The script compiler must know where the end of an if statement is for jumping to address in the byte code. This information is unimportant to the script programmer, they just need ot know the sytax of the language!

  1. If Block
    1. if condition statements
    2. elsif condition statements
    3. else statements
    4. end if
  2. while condition statements end while
  3. force while condition statements end while
  4. begin loop statements end loop
  5. begin cinema statements end cinema
  6. begin cinema statements end cinema
  7. begin full screen cinema statements end cinema
  8. begin interactive camera statements end interactive camera
  9. begin dialogue statements end dialogue
  10. begin known dialogue statements end dialogue
  11. begin known cinema statements end dialogue

3.30 Dialogue Statements

Statements dealing with dialogue. Most of these must be made within a dialogue block

  1. Spirit Control
    1. make spirit_type point to object
    2. make spirit_type point at position
    3. make spirit_type play across expression down expression constant
    4. make spirit_type play constant at coord_expression in world
    5. make spirit_type cling across expression down expression
    6. make spirit_type fly across expression down expression
    7. make spirit_type fly across expression down expression
    8. stop spirit_type pointing
    9. make spirit_type look at position
    10. make spirit_type look at object
    11. stop spirit_type looking
    12. eject spirit_type
    13. appear spirit_type
    14. disappear spirit_type
    15. send spirit_type home
  2. Text and Speech
    1. request dialogue constant (DIALOG_EVENT_TYPE in DialogManagerEnum.h) opt_with_constant (DIALOG_MAGNITUDE)
    2. say string
    3. say database string
    4. say random from group string
    5. say opt_single line expression from group string interaction opt_narrator
    6. say string with number expression
    7. say constant with number expression
    8. clear dialogue
    9. close dialogue
    10. close dialogue

3.31 Camera Statements

Cameras can be controlled from within the scripts.

See also:

  1. set camera zones to "filename"
  2. store camera details
  3. restore camera details
  4. reset camera lens time expression
  5. enable_disable clipping distance
  6. set camera lens expression time expression
  7. move camera position to position time expression
  8. set camera position to position
  9. move camera focus to position time expression
  10. set camera focus to position
  11. move camera to face object distance expression time expression
  12. set camera to face object distance expression
  13. set camera focus follow object opt_offset
  14. set camera position follow object opt_offset
  15. move follow camera position offset coord_expression time expression
  16. move follow camera foucs offset coord_expression time expression
  17. move camera focus follow object
  18. move camera position follow object
  19. set camera to camera_enum
  20. move camera to camera_enum time expression
  21. camera path camera_enum
  22. enable/disable camera fixed rotation at coord_expression
  23. start hand demo string
  24. set camera position coord_expression focus coord_expression lens expression
  25. move camera position coord_expression focus coord_expression lens expression time expression
  26. shake camera strength expression
  27. stop camera shake
  28. set camera position relative to object T_AT coord_expression
  29. set camera focus relative to object T_AT coord_expression
  30. move camera position to coord_expression time expression easein expression easeout expression
  31. set camera lens expression time expression easein expression easeout expression
  32. move camera focus to coord_expression time expression easein expression easeout expression
  33. move camera position to coord_expression time expression catmullrom bias expression tension expression
  34. move camera focus to coord_expression time expression catmullrom bias expression tension expression
  35. set camera lens to coord_expression time expression catmullrom expression bias tension expression
  36. set camera roll expression time expression
  37. set camera roll expression time expression easein expression easeout expression
  38. set camera roll to possition time expression catmullrom bias expression tension expression
  39. play camera path with easein expression easeout expression
  40. queue camera move with position coord_expression focus coord_expression time expression
  41. reset camera path

3.1.1 move object position to position

This makes the object move between the two positions.

move Sister position to {SoapBox}
move SleepingLion position to {ThePeacefullValley} using NAV_FAILURE_MODE_GO_TO_CLOSEST_POINT navigation

3.1.2 set object position to position

This make the object position change.

set Sister position to {SoapBox}

3.1.3 set object resource constant to expression

sets the amount of resource in an object to the amount specified

set OreRock resource ORE to 10000

3.1.4 set object focus to position

Makes the object turn to face the position passed, or just look at the position passed depending on how flexable an object is.

set Sister focus to {LostBrother}

3.1.5 set object focus on object

For the case of a creature the creature will look at the moving object, but for other things they will turn to face the current position of the passed object.

set MyCreature focus on Rock

3.1.6 play anim string on object opt_loop opt_stand

Set an object to play an animation for a number of times using a string.

play anim "M_CRY" on Sister loop 5 disable stand 
play anim on Sister "M_CRY" disable stand
play anim on Sister "M_CRY" loop 5

3.1.7 set object anim constant

Very useful if you wish to change the walk animation of a character eg. Pied piper walks with a dance.

set Piper anim ANM_PIPERDANCE

3.1.8 set object physics balance expression

Sets an objects physics proerties (spreadhseet value)

set lamb physics balance 17

3.1.9 override object anim constant

Very useful if you wish to change the walk animation of a character eg. Pied piper walks with a dance.

override Piper anim "M_PIPERDANCE"

3.1.10 cancel object anim override

Cancels any overriding animation set on an actor

cancel MyActor anim override

3.1.11 delete object

This deletes an object from the game. If you wish something to die before being deleted you should set it's health to 0.0. NB. Deleting an object which is a container will dispand the members of the container, not delete them.

delete PiedPiperFlock

3.1.12 set object in player expression hand

Places an object into the player hand

set MyFish in player 1 hand

3.1.13 set object velocity heading position speed expression

If an object is something with Physics in the game it applies a velocity to it towards a position.

set Rock velocity heading {PiedPiper} speed 10

3.1.14 set object target coord_expression time expression

Applies physics to an object so that it lands at the defined position in a given time

set Rock1 target {House} time 5

3.1.15 set object temperature expression

Sets the temperature of an object. Range is -1 to 1.

set rock temperature 1

3.1.16 set object player expression

Sets the player an object belongs to

set Villager player 3

3.1.17 release object

This releases a game object from the script, and sets it into the game without deleting.

3.1.18 release object focus

Game creatures can be in the sim with there focus being set to an object or position. This functions free's up the creatures head behaviour.

3.1.19 enable_disable object can be leashed to

Sets if a creature can leash to this object or not. This object or course can also be a creature.

disable FriendlyCreature can be leashed to

3.1.20 set object colour red expression green expression blue expression

Set an objects colour if possible. RGB 0->255

set MyEffect colour red 230 green 100 blue 10

3.1.21 reset object colour

Reset an objects colour if possible

reset MyCreature colour

3.1.22 set object secondary colour red expression green expression blue expression

Set an objects secondary colour if possible. RGB 0->255

set MyEffect secondary colour red 230 green 100 blue 10

3.1.23 stop object moving

stops a given object from moving

stop Sister moving

3.1.24 move object to limbo

moves an object to limbo

move MyRock to limbo

3.1.25 release object from limbo

releases an object from limbo

release MyRock from limbo

3.1.26 set object angular velocity x expression y expression z expression

sets the angular velocity for the given object

set MyObject angular velocity x 20.2 y 18.6 z 2.0

3.1.27 override mesh for object with string

overrides the given objects default mesh with the given string

override mesh for MyObject with "New_Mesh_String"

3.1.28 enable/disable object indestructible

sets the object as indestructible or not.

enable MyVillager indestructible

3.1.29 enable/disable object hurt by fire.

sets the object as hurt by fire or not, normal behaviour is hurt by fire ;)

disable MyVillager hurt by fire

3.1.30 enable/disable object set on fire

sets the object as possible to be lit by fires. Generally objects can burn, but in some scripts villagers must not be burnt.

disable MyVillager set on fire

3.1.31 enable/disable object on fire expression

sets an object or container to all being on fire or not A value on how on fierce the blaze is. 0->1 1 will obviously burn faster

enable object on fire 0.5

3.1.32 enable_disable fire system

Enables or Disables the games fire system

disable fire system

3.1.33 enable_disable floaty icons

Sets floaty icon draw in widescreen

disable floaty icons

3.1.34 enable/disable object moveable

sets an object to moveable, that is, is moveable by hand, creature and physics or not. If enabled it has its default behaviour.

disable SingingStone moveable

3.1.35 enable/disable object pickup

sets an object to pickupable, that is, is pickupable by hand, or creature. If enabled it has its default behaviour.

disable SingingStone pickup

3.1.36 enable/disable pickup type constant

sets if a certian pickup interface action is available

enable pickup type PICKUP_BALANCE_TYPE_ROAD

3.1.37 set object alpha expression

sets an objects alpha

set MyVillager alpha 0.2

3.1.38 set lava running at coord_expression heading coord_expression radius expression

sets a lava river off, heading in the specified RELATIVE direction

set lava running at {LavaPos} heading {1, 0, 4}

3.1.39 set object shake expression

makes an object shake; the last value defines intensity of shake

set MyBoulder shake 0.4

3.1.40 enable_disable object reactable

sets an actor object to a reactable state. Only works on villagers and the creature.

enable object reactable

3.1.41 enable_disable object can be fisted

sets whether an object can be fisted

enable object can be fisted

3.1.42 enable_disable object interactable

sets whether the hand can interact with an object

enable Stone interactable

3.1.43 enable_disable object cylindar override

sets whether an object is super easy for the hand to interact with

enable SignPost cylindar override

3.1.44 enable_disable object physics tracking

Starts or stops tracking of physics on an object

enable MyRock physics tracking

3.1.45 clear object hit object

Clears the memory of the last thing hit by the object. Must have physics tracking enabled.

clear MyRock hit thing

3.1.46 clear object hit land

Clears the memory of the the object hitting the ground. Must have physics tracking enabled.

clear MyRock hit thing

3.1.47 enable/disable force object renderable

enables/disables forcing an object to be rendered

enable force Sheep renderable

3.2.1 enable_disable anim events on object

sets whether or not the object (statedriven) cares about animation events

enable anim events on MyDude

3.2.2 set object anim event probability

sets the probability of an animation event being played on a villager

set MyStalker anim event probability

3.2.3 Controlling Villagers

Statements that can only be used on Villagers

3.2.3.1 move villager object focus to coord_expression

makes the villager turn to look at the location

move villager AshMatheson focus to {TheBasement}

3.2.3.2 set object disciple constant opt_sound

This allows you to make a villager a disciple in the game. The with sound is optional.

set Sister disciple VILLAGER_DISCIPLE_BUILDER with sound

3.2.3.3 set housewife object pregnant by object

sets a female villager to pregnant

set housewife MyMissus pregnant by TheMilkman

3.2.3.4 set object to follow object at distance expression

sets a villager object to follow another object at the given distance

set MyStalker to follow MyFreakedOutVillager at distance 10.3

3.2.3.5 enable/disable object skeleton

sets the object as a skeleton true or false.

enable MyLittleFella skeleton

3.2.3.6 set object carrying constant

Using the CARRIED_OBJECT enum, you can set a villager to carrying an object (eg. Fishing rod) like they usually do in the game. Using the enum CARRIED_OBJECT_NONE as the carried object stops an object from being carried.

set MyVillager carrying CARRIED_OBJECT_FISHING_ROD

3.2.3.7 enable_disable villager object can be imprisoned

sets the given villager as a actor that can be imprisoned

enable villager object can be imprisoned

3.2.3.8 set villager object default speed to constant

makes a villager start moving at thier normal speed again

set villager GreekDude default speed to SCRIPT_VILLAGER_DEFAULT_SPEED_WALKING

3.2.3.9 enable_disable villagers ignore object resource

sets whether or not villagers ignore the fact that an object has a resource

enable villagers ignore MyTree resource

3.2.3.10 enable_disable object alternative mesh

sets a villagers mesh to it's alternative version (this is temp for B&W2 villager mesh choices.)

enable MyVillager alternative mesh

3.2.3.11 play paired anim constant on object with object (snap to position)

Plays a paired animation using two villagers. The first object passed is the leader.
Only the leader is valid for the 'wait until played' call. See VillagerPairedActionEnum.h

play paired anim VILLAGER_PAIRED_ACTION_BREED using Man1 with Man2 snap to position

3.2.3.12 set anim speed of object to expression

sets an objects animation speed

set anim speed of MyLittleVillager to 0.5

3.2.3.13 reset object anim speed

resets the objects animation speed

reset object MyLittleVillager anim speed

3.2.3.14 reset object speed

Resets an objects walk speed

reset Bobs speed

3.3.1 enable_disable object visible

sets whether or not the visual effect is visible

disable Glow visible

3.3.2 enable_disable object pulse (speed expression) (with fadetime expression)

makes an object pulse, or stops it pulsing

enable ScaryMan pulse speed 0.5
disable Sausage pulse with fadetime 2

3.3.3 enable_disable object additive

enable_disable object additive. Used by some visual effects

enable MyPlasmaVisual additive

3.3.4 enable_disable object secondary additive

enable_disable object secondary additive. Used by some visual effects

enable MyPlasmaVisual secondary additive

3.3.5 stop visual effect object

Shuts down the playing of a visual effect

stop visual effect object

3.3.6 remove visual effect object target at coord_expression

Removes visual effect targets for instanced visuals.

remove visual effect target at {100, 100, 100}

3.3.7 add object target at coord_expression

Adds a target to the objects target list (Currently only used by spot visuals)

add VFX target at {LostBrother}

3.3.8 set visual effect target object

sets whether a mine is the monster mine

set visual effect MyEffect target {MyTarget}

3.3.9 enable_disable object pulse (speed expression) (with fadetime expression)

makes an object pulse, or stops it pulsing

enable ScaryMan pulse speed 0.5
disable Sausage pulse with fadetime 2

3.4.1 start migration from town object to town object

start a migration

start migration from JapaneseTown to AztecTown

3.4.2 enable_disable migration from object to object

enables or disables migration from the source town to the target town

disable migration from JapaneseTown to AztecTown

3.4.3 enable_disable migration object can be declined

Sets whether a migration cna be declined

disable migration MyMigration can be declined

3.4.4 enable_disable migration from town object to all other towns

enables or disables migration from the source town to all other towns

disable migration from JapaneseTown to AztecTown

3.4.5 set migration threshold between town object and town object

sets the migration threshold from the source town to target town

set migration threshold from Japanesetown to AztecTown 0.4

3.4.6 enable_disable player town migration

sets whether player towns can migrate

disable player town migration

3.4.7 enable_disable town object impressiveness override opt_amount

sets the overriding of a town's impressiveness value

enable town MyTown impressiveness override with 175000

3.4.8 accept pilgrims object

makes the pilgrims automatically accpeted.

accept pilgrims MyPilgrims

3.4.9 decline pilgrims object

makes the pilgrims automatically rejected.

decline pilgrims MyPilgrims

3.5.1 set player expression mana expression

Sets the mana of a player

set player 0 mana 10000

3.5.2 set player expression alignment expression

Sets the players alignment

set player 1 alignment 0.9

3.5.3 set player expression town object capture reason constant

sets the reason that a town has been captured

set player 0 town JapTown capture reason LAST_CAPTURE_AGGRESSIVE

3.5.4 enable_disable spell constant for player expression

enables/disables a spell for a specific player

enable spell HEAL_LEVEL_1 for player 1

3.5.5 clear player expression spell charging

Stops a player spells from charging

clear player 3 spell charging

3.5.6 set object player expression relative belief

The town specified becomes owned by the player specified. This is an aggressive take over. The belief value does nothing.

set Town player 1 relative belief 2.0

3.5.7 enable_disable player expression virtual influence

enables/disables the players virtual influence.

enable player 1 virtual influence

3.6.1 enable_disable abode object

enables or disables the given abode

disable abode MyMonsterMine

3.6.2 enable/disable villagers can build object

toggles the ability of villagers to build the given object

disable villagers can build MyHouse

3.6.3 set field object height to expression

sets how grown a field is (between 0 and 1)

set field CropPlace height to 0.8

3.6.4 enable_disable monster mine object

sets whether a mine is the monster mine

enable monster mine MyMine

3.7.1 stop spell object

stops a given spell

stop spell MySpell

3.7.2 invoke spell stage

calls the given stage of an epic spell

invoke MySpell STAGE1

3.7.3 create expression worshippers at object

Creates some worshippers at an object e.g. Wonder

create 20 worshippers at MyWonder

3.7.4 create epic constant at coord_expression

triggers an epic wonder, but you need a wonder building and that building set to the town

create epic EPIC_WONDER_NUMBER_SIREN at {CastPos}

3.7.5 enable_disable predefined sky string time expression

sets the sky to one of the predefined types

enable predefined sky "EpicHurricaneSky" time 15

3.8.1 play video string >

plays the given video, starting at the given time

play video "Land1HandTutorial" time 23

3.8.2 play video string with sound string >

plays the given video, starting at the given time

play video "Land1HandTutorial" with sound "HelloWorld" time 23

3.8.3 set object clipping window left expression top expression width expression height expression

sets the clipping window of a video window

set MyVid clipping window left 0 top 0 width 1 height 1

3.8.4 stop video

stops a playing video

stop video

3.9.1 set physics from hand with strength position radius expression

sets a physics force from the hand - the position determines the strength in the given axis

set physics from hand with strength position radius expression

3.9.2 set capture radius for physics objects to expression

Sets the capture radius multiplier for objects in physics

set capture radius multiplier 1.5

3.9.3 set physics at position position with strength position radius expression random expression

sets a physics force from a location - the 2nd position determines the strength in the given axis

set physics at position {BoomPos} with strength {0,80,0} radius 20 random 1

3.9.4 remove all objects in physics

Any objects which are in physics, become not-in-physics

remove all objects in physics

3.9.5 delete all objects in physics

Any objects which are in physics are deleted

delete all objects in physics

3.10.1 add effect EFFECT_TYPE at position strength expression radius expression

adds an effect at to location

add effect EFFECT_TYPE_BURN at {MyBadPlace} strength 0.9 radius 10.0

3.10.2 set ground alignment to expression at coord_expression radius expression amount expression

changes the alignment on the ground

set ground alignment to -1 at {BadGuy} radius 20 amount 1

3.10.3 set lava puddle at coord_expression radius expression temperate expression

adds a puddle of lava to the ground (tempearture from 0 to 1)

set lava puddle at hand position radius 10 temperature 1

3.11.1 set gate object open

opens a given gatehouse

set gate MyGateHouse open

3.11.2 set gate object close

closes a given gatehouse

set gate MyGateHouse close

3.11.3 enable_disable gate can open for platoons

sets whether a gatehouse can open its gates for platoons to pass through

disable gate can open for platoons

3.12.1 process land end objectives

triggers processing of fallible objectives

process land end objectives

3.12.2 set player expression objective TRIBUTE_OBJECTIVE_TYPE status to TRIBUTE_OBJECTIVE_STATE

sets the status of the given objective

set player 0 objective TRIBUTE_OBJECTIVE_FAILABLE_CRATURE_BUILD_ALL_ABODES status to TRIBUTE_OBJECTIVE_STATE_FAILED

3.12.3 set player expression objective class constant amount expression

sets the number of objectives in the given category

set player 0 objective class TRIBUTE_OBJECTIVE_CLASS_EVIL amount 4

3.12.4 reset all objectives for player expression

resets all game objectives

reset all objectives for player 0

3.12.5 set player expression objective constant with LOTS OF PARAMETERS

Here is an explanation of all available parameters to this function:

amount expression - this is the number of triggers associated (eg 'collect 500 food' would use 'amount 5000')
text string - this is the name of the objective as appears in the objective window
amount expression - this is the number to be inserted into the objective name
description string - this is the description of the task as appears in the objective menu
parent constant (optional) - sets the parent objective
icon constant (optional) - set the icon that appears in the objective menu
class constant (optional) - sets the type of objective
start value expression (optional) - sets the inital amount of the objective
reward expression - sets the amount of tribute awarded for completing the objective
alignment expression - sets the alignment change for passing the goal
force open - forces the tribute window to open
dont show player (optional) - does not show the objective in the menu with object - some objectives require an object (town) to act on. pass it in here.

set player 0 objective TRIBUTE_OBJECTIVE_COLLECT_WOOD with amount 5000 text "BW2T_SCRIPT_01FINAL_OBJECTIVE_ELOI_10" amount 5000 description "BW2T_SCRIPT_01FINAL_OBJECTIVE_ELOI_10" parent TRIBUTE_OBJECTIVE_COLLECT_FOOD icon TRIBUTE_OBJECTIVE_ICON_OBJECTIVE_L1_FOLLOWCREATURE class TRIBUTE_OBJECTIVE_CLASS_SKILL start value 200 reward 250 force open dont show player

3.12.6 set player expression objective constant icon constant

set the icon for the objective

set player 0 objective TRIBUTE_OBJECTIVE_COLLECT_WOOD icon TRIBUTE_OBJECTIVE_ICON_OBJECTIVE_L3_WOODSTORAGEPIT

3.12.7 set player expression objective constant amount expression

sets an objective for a specific player

set player 0 objective TRIBUTE_OBJECTIVE_COLLECT_WOOD amount 10

3.12.8 set player expression objective constant parent objective constant

sets the parent objective of an objective

set player 0 objective TRIBUTE_OBJECTIVE_BUILT_ABODE parent objective TRIBUTE_OBJECTIVE_BUILD_IMPRESSIVE_BUILDINGS

3.12.9 set player expression objective text string opt_amount

sets the text for this objective

set player 0 objective TRIBUTE_OBJECTIVE_COLLECT_WOOD text "BW2T_SCRIPT_01FINAL_ADVISORS_ARRIVENEW_10"

3.12.10 set player expression objective description string

sets the description for this objective

set player 0 objective TRIBUTE_OBJECTIVE_COLLECT_WOOD description "BW2T_SCRIPT_01FINAL_ADVISORS_ARRIVENEW_20"

3.12.11 disable player expression objective constant

disable this objective for the given player

disable player 0 objective TRIBUTE_OBJECTIVE_COLLECT_WOOD

3.12.12 reset player expression objective constant

rset this objective

reset player 0 objective TRIBUTE_OBJECTIVE_COLLECT_WOOD

3.12.13 set player expression objective constant value expression

Sets the current value of this objective. e.g if you set the current to 10, it makes it look like the player has done 10 of whatever objective)

set player 0 objective TRIBUTE_OBJECTIVE_COLLECT_WOOD value 100

3.13.1 enable_disable game can be lost

sets whether the player will lose when he has no towns and no villagers. This defaults to off, as there may be lands on which the player has neither of these (the tutorial land).

enable game can be lost

3.13.2 enable_disable global influence

sets whether the player has influence over the whole land or not.

enable global influence

3.13.3 set min height camera experssion focus expression

sets the minimum height the camera can be above the land

set min height camera experssion focus expression

3.13.4 enable_disable text skip

set text skip

disable text skip

3.13.5 enable_disable villager interaction manager

set villager interaction manager

enable villager interaction manager

3.13.6 enable_disable can use destruction tool

sets whether the player can use the destruction tool

disable can use destruction tool

3.13.7 enable_disable tribute visual

sets whether gaining tribute displays visual and plays audio

disable tribute visual

3.13.8 enable_disable disciple placedown speech

sets whether placing a disciple triggers any speech

disable disciple placedown speech

3.13.9 enable_disable single active speech

sets whether advisors interupt each other. when this is disabled, advisors can talk at the same time as each other.

disable single active speech

3.13.10 force save load

quick saves the game then quick loads the game. Used to test the save load.

force save load

3.13.11 play credits

shows the end credits

play credits

3.13.12 force save goto menu

quick saves and then goes to the main menu. For use at the end of the game.

force save goto menu

3.13.13 enable_disable dialogue manager

Enables or disables the dialogue manager. This is the enemy generals and adviosrs commenting on your actions. Only disable works, as it is re-enabled on level change

disable dialogue manager

3.13.14 enable_disable heartbeat sound

sets whether the hearbeat audio is played

disable heartbeat sound

3.13.15 enable_disable constant menu

enables the given menu, or disables the active menu

enable SCRIPT_MENU_TYPE_PAUSE menu

3.13.16 enable_disable pause menu in widescreen

enables or disables the pause menu being accessed in cutscenes

enable pause menu in widescreen

3.13.17 enable_disable interface action