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:
These statements can be used (generally) to control any object.
Statements controlling state driven objects. These are objects such as villagers and animals (but not the creature)
Statements controlling visual effects
Statements controlling the migration of villagers betwene towns
Statements that change values for players.
Statements controlling houses and other buildings.
Statements that allow scripts to control epics. These are used for dynamic epic cutscences and the like.
Statements that allow scripts to play videos and fine tune their display.
Statements that controll the physics system, as well as create phyics forces.
Statements that create spread effects, like heat, and statements that change the displayed alignment of an area.
Statements that controll gates.
These statements control the game objectives. e.g. mine a x amount of ore
These statements control what is happening in the game such as changing game settings or the level
These statements control the dynamic music system of the game.
These statements control objects which are specifically towns, as well as adjusting the ways in which the player can interact with their towns.
Allows you to the toolbar, the interface, floaty icons, and whatever appears in wide screen.
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)
Controlling Armies
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.
These statements allow for fine control of the depth of field.
See also:
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.
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.
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.
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:
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'.
Sound and music can be played with the scripts to the same quality as in the game.
Creates weather conditions.
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
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!
Statements dealing with dialogue. Most of these must be made within a dialogue block
Cameras can be controlled from within the scripts.
See also:
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
This make the object position change.
set Sister position to {SoapBox}
sets the amount of resource in an object to the amount specified
set OreRock resource ORE to 10000
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}
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
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
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
Sets an objects physics proerties (spreadhseet value)
set lamb physics balance 17
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"
Cancels any overriding animation set on an actor
cancel MyActor anim override
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
Places an object into the player hand
set MyFish in player 1 hand
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
Applies physics to an object so that it lands at the defined position in a given time
set Rock1 target {House} time 5
Sets the temperature of an object. Range is -1 to 1.
set rock temperature 1
Sets the player an object belongs to
set Villager player 3
This releases a game object from the script, and sets it into the game without deleting.
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.
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
Set an objects colour if possible. RGB 0->255
set MyEffect colour red 230 green 100 blue 10
Reset an objects colour if possible
reset MyCreature colour
Set an objects secondary colour if possible. RGB 0->255
set MyEffect secondary colour red 230 green 100 blue 10
stops a given object from moving
stop Sister moving
moves an object to limbo
move MyRock to limbo
releases an object from limbo
release MyRock from limbo
sets the angular velocity for the given object
set MyObject angular velocity x 20.2 y 18.6 z 2.0
overrides the given objects default mesh with the given string
override mesh for MyObject with "New_Mesh_String"
sets the object as indestructible or not.
enable MyVillager indestructible
sets the object as hurt by fire or not, normal behaviour is hurt by fire ;)
disable MyVillager hurt by 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
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
Enables or Disables the games fire system
disable fire system
Sets floaty icon draw in widescreen
disable floaty icons
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
sets an object to pickupable, that is, is pickupable by hand, or creature. If enabled it has its default behaviour.
disable SingingStone pickup
sets if a certian pickup interface action is available
enable pickup type PICKUP_BALANCE_TYPE_ROAD
sets an objects alpha
set MyVillager alpha 0.2
sets a lava river off, heading in the specified RELATIVE direction
set lava running at {LavaPos} heading {1, 0, 4}
makes an object shake; the last value defines intensity of shake
set MyBoulder shake 0.4
sets an actor object to a reactable state. Only works on villagers and the creature.
enable object reactable
sets whether an object can be fisted
enable object can be fisted
sets whether the hand can interact with an object
enable Stone interactable
sets whether an object is super easy for the hand to interact with
enable SignPost cylindar override
Starts or stops tracking of physics on an object
enable MyRock physics tracking
Clears the memory of the last thing hit by the object. Must have physics tracking enabled.
clear MyRock hit thing
Clears the memory of the the object hitting the ground. Must have physics tracking enabled.
clear MyRock hit thing
enables/disables forcing an object to be rendered
enable force Sheep renderable
sets whether or not the object (statedriven) cares about animation events
enable anim events on MyDude
sets the probability of an animation event being played on a villager
set MyStalker anim event probability
Statements that can only be used on Villagers
makes the villager turn to look at the location
move villager AshMatheson focus to {TheBasement}
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
sets a female villager to pregnant
set housewife MyMissus pregnant by TheMilkman
sets a villager object to follow another object at the given distance
set MyStalker to follow MyFreakedOutVillager at distance 10.3
sets the object as a skeleton true or false.
enable MyLittleFella skeleton
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
sets the given villager as a actor that can be imprisoned
enable villager object can be imprisoned
makes a villager start moving at thier normal speed again
set villager GreekDude default speed to SCRIPT_VILLAGER_DEFAULT_SPEED_WALKING
sets whether or not villagers ignore the fact that an object has a resource
enable villagers ignore MyTree resource
sets a villagers mesh to it's alternative version (this is temp for B&W2 villager mesh choices.)
enable MyVillager alternative mesh
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
sets an objects animation speed
set anim speed of MyLittleVillager to 0.5
resets the objects animation speed
reset object MyLittleVillager anim speed
Resets an objects walk speed
reset Bobs speed
sets whether or not the visual effect is visible
disable Glow visible
makes an object pulse, or stops it pulsing
enable ScaryMan pulse speed 0.5
disable Sausage pulse with fadetime 2
enable_disable object additive. Used by some visual effects
enable MyPlasmaVisual additive
enable_disable object secondary additive. Used by some visual effects
enable MyPlasmaVisual secondary additive
Shuts down the playing of a visual effect
stop visual effect object
Removes visual effect targets for instanced visuals.
remove visual effect target at {100, 100, 100}
Adds a target to the objects target list (Currently only used by spot visuals)
add VFX target at {LostBrother}
sets whether a mine is the monster mine
set visual effect MyEffect target {MyTarget}
makes an object pulse, or stops it pulsing
enable ScaryMan pulse speed 0.5
disable Sausage pulse with fadetime 2
start a migration
start migration from JapaneseTown to AztecTown
enables or disables migration from the source town to the target town
disable migration from JapaneseTown to AztecTown
Sets whether a migration cna be declined
disable migration MyMigration can be declined
enables or disables migration from the source town to all other towns
disable migration from JapaneseTown to AztecTown
sets the migration threshold from the source town to target town
set migration threshold from Japanesetown to AztecTown 0.4
sets whether player towns can migrate
disable player town migration
sets the overriding of a town's impressiveness value
enable town MyTown impressiveness override with 175000
makes the pilgrims automatically accpeted.
accept pilgrims MyPilgrims
makes the pilgrims automatically rejected.
decline pilgrims MyPilgrims
Sets the mana of a player
set player 0 mana 10000
Sets the players alignment
set player 1 alignment 0.9
sets the reason that a town has been captured
set player 0 town JapTown capture reason LAST_CAPTURE_AGGRESSIVE
enables/disables a spell for a specific player
enable spell HEAL_LEVEL_1 for player 1
Stops a player spells from charging
clear player 3 spell charging
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
enables/disables the players virtual influence.
enable player 1 virtual influence
enables or disables the given abode
disable abode MyMonsterMine
toggles the ability of villagers to build the given object
disable villagers can build MyHouse
sets how grown a field is (between 0 and 1)
set field CropPlace height to 0.8
sets whether a mine is the monster mine
enable monster mine MyMine
stops a given spell
stop spell MySpell
calls the given stage of an epic spell
invoke MySpell STAGE1
Creates some worshippers at an object e.g. Wonder
create 20 worshippers at MyWonder
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}
sets the sky to one of the predefined types
enable predefined sky "EpicHurricaneSky" time 15
plays the given video, starting at the given time
play video "Land1HandTutorial" time 23
plays the given video, starting at the given time
play video "Land1HandTutorial" with sound "HelloWorld" time 23
sets the clipping window of a video window
set MyVid clipping window left 0 top 0 width 1 height 1
stops a playing video
stop video
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
Sets the capture radius multiplier for objects in physics
set capture radius multiplier 1.5
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
Any objects which are in physics, become not-in-physics
remove all objects in physics
Any objects which are in physics are deleted
delete all objects in physics
adds an effect at to location
add effect EFFECT_TYPE_BURN at {MyBadPlace} strength 0.9 radius 10.0
changes the alignment on the ground
set ground alignment to -1 at {BadGuy} radius 20 amount 1
adds a puddle of lava to the ground (tempearture from 0 to 1)
set lava puddle at hand position radius 10 temperature 1
opens a given gatehouse
set gate MyGateHouse open
closes a given gatehouse
set gate MyGateHouse close
sets whether a gatehouse can open its gates for platoons to pass through
disable gate can open for platoons
triggers processing of fallible objectives
process land end objectives
sets the status of the given objective
set player 0 objective TRIBUTE_OBJECTIVE_FAILABLE_CRATURE_BUILD_ALL_ABODES status to TRIBUTE_OBJECTIVE_STATE_FAILED
sets the number of objectives in the given category
set player 0 objective class TRIBUTE_OBJECTIVE_CLASS_EVIL amount 4
resets all game objectives
reset all objectives for player 0
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
set the icon for the objective
set player 0 objective TRIBUTE_OBJECTIVE_COLLECT_WOOD icon TRIBUTE_OBJECTIVE_ICON_OBJECTIVE_L3_WOODSTORAGEPIT
sets an objective for a specific player
set player 0 objective TRIBUTE_OBJECTIVE_COLLECT_WOOD amount 10
sets the parent objective of an objective
set player 0 objective TRIBUTE_OBJECTIVE_BUILT_ABODE parent objective TRIBUTE_OBJECTIVE_BUILD_IMPRESSIVE_BUILDINGS
sets the text for this objective
set player 0 objective TRIBUTE_OBJECTIVE_COLLECT_WOOD text "BW2T_SCRIPT_01FINAL_ADVISORS_ARRIVENEW_10"
sets the description for this objective
set player 0 objective TRIBUTE_OBJECTIVE_COLLECT_WOOD description "BW2T_SCRIPT_01FINAL_ADVISORS_ARRIVENEW_20"
disable this objective for the given player
disable player 0 objective TRIBUTE_OBJECTIVE_COLLECT_WOOD
rset this objective
reset player 0 objective TRIBUTE_OBJECTIVE_COLLECT_WOOD
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
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
sets whether the player has influence over the whole land or not.
enable global influence
sets the minimum height the camera can be above the land
set min height camera experssion focus expression
set text skip
disable text skip
set villager interaction manager
enable villager interaction manager
sets whether the player can use the destruction tool
disable can use destruction tool
sets whether gaining tribute displays visual and plays audio
disable tribute visual
sets whether placing a disciple triggers any speech
disable disciple placedown 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
quick saves the game then quick loads the game. Used to test the save load.
force save load
shows the end credits
play credits
quick saves and then goes to the main menu. For use at the end of the game.
force save goto menu
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
sets whether the hearbeat audio is played
disable heartbeat sound
enables the given menu, or disables the active menu
enable SCRIPT_MENU_TYPE_PAUSE menu
enables or disables the pause menu being accessed in cutscenes
enable pause menu in widescreen
enable or disable the given interface action. Actions are listed in GameBalanceGeneral.h (MANACOST_BALANCE_TYPE)
disable interface action MANACOST_BALANCE_TYPE_ENTERTIMECHANGE
enables or disables the drawing of the creature icon
disable creature icon visible
enables or disables the drawing of army flags in widescreen
disable army flag in widescreen
enables or disables the drawing of the objective list in widescreen
disable objective list in widescreen
enables or disables the drawing of the toolbar in fullscreen cutscenes
enable toolbar in cutscene
allows the player to build anywhere they have influence
enable build out of town within influence
See also:
starts or stops performance checking
enable performance checking
adds a perfomance stat
sets the value of persistent data, created by scripters. Hasn't been used in a long time. May not work.
set persistent data PERSISTANT_VALUE_EXAMPLE to 10.67
toggles the player influence being on
disable influence
toggles the player influence visual effect being on
disable influence visual effect
toggles the blooming
enable blooming
exits the game, no save, do not pass go - no 200 pounds...
exit game
sets the help system on/off
enable help system
Allows the scripter to enable/disable certain features of the interface. This is most useful when the game is at the beginning.
set interaction SCRIPT_INTERACTION_LEVEL_1
This function is useful for simualting slow motion in the game. Setting the game speed to a value 0.0->1.0 means a percentage of the normal game speed ie. 0.5=half game speed. setting the value to more than 1 is a multiple of the normal game speed. ie. 2=twice normal game speed.
set game speed to 0.5
See also:
Removes all the current map data, and then loads the map defined. All scripts are still held, but you are going to need to stop all scripts from the previous file which are running!
load map "./Data/Scripts/Land2.txt"
See also:
Enables/Disables the laoding screen, instead of engine draw
enable load screen
Saves the game into a specific slot inside the citadel. No. is 14 reserved for on leaving a land for purposes of the saving design, using other numbers will override specific windows inside the citadel. Jeremy who wrote this advisors just to use no 14!
save game in slot 14
Fades the screen in a given time to a given colour
set fade red 255 green 255 blue 255 time 4
Fades the screen back in a given time
set fade in time expression
sets if the leash is drawn or not in a widescreen section
enable leash draw
sets if the highlights (scrolls) are drawn or not in a widescreen section
enable highlight draw
sets whether the spell icons (icons in bottom right with their gestures) are drawn or not in a widescreen section
enable spell icon draw
enables/disables flag drawing in widescreen
disable force flag draw
enables/disables tooltips drawing in widescreen
disable force tooltip draw
sets the game shadows on or off by passing a bool
disable shadows
turns the script markers on/off. used for debuging a script.
enable markers
sets the object that the camera tool is looking at. Used for debuging.
set cameratool object to Sister
gives the player the specified amount of reward
increment tribute by 5
removes from the player the specified amount of reward
decrement tribute by PunishAmount
forecs a quick save
force auto save
skips current cutscene if it is skipable
skip current cutscene
removes anything in the player hand from the hand
empty player hand
starts the dynamic music system
start dynamic music
stops the dynamic music system
stop dynamic music
plays another section of the music, the specified number of times.
set dynamic music "section_name" loop 2
sets whether or not the player can research something, as well as whether or not they have allready researched it.
set research ARTEFACT_ABODE_NUMBER_ALTAR available to RESEARCH_AVAILABILITY_NOT_AVAILABLE
sets whether a town can be taken by force
disable town MyTown can be taken by force
extends the towns influence ring by the given amount in meters. Reset when town changes hands.
extend town MyTown influence by 10
caps the towns population
set town L21_MongolCapital maximum population to 200
Starts the building of all planned buildings in the group
build all town MyTown buildings in group 1
This sends everyone scuttling into their homes, and then slams the town gates shut. They will stay there unntil the timer runs out.
set JapaneseTown emergency for 20 seconds
If the given town is currently in the emergency state it will leave that state
stop JapaneseTown emergency
sets a weight value for a given desire. Weights act as modifiers to the desire - they are not a final figure
set town NorseTown desire for GET_WOOD to 0.2
enable/disable the allocation of the given job in a town
disable town MyTown job VILLAGER_JOB_LUMBER_MILL_WORKER
toggles whether or not the towns' personalisation managers are active
disable personalisations
sets the magic available within a town
enable spell MIRACLE_TYPE_WATER in MyTown
sets whether villagers speak their desires in a town
enable town CrazyMeTown desire speech
Moves a building (ABODE_NUMBER) to the front of the build menu list
enable build menu override with ABODE_NUMBER_OLD_PERSONS_HOME
Sets the current menu pane on the toolbar
set toolbar menu to MENU_TOOLBAR_TRIBUTES
Enables or disables the game toolbar
disable toolbar
Enables or disables the objectives widnows. This will show or hide the objectives window
enable objective window
Enables or disables the game toolbar pausing
disable toolbar pause
Enables or disables the game toolbar being locked
disable toolbar locked
Highlights the menu item you specify
highlight toolbar item 1
Clears a highlighted menu item
clear toolbar highlight
Removes a world icon
remove world icon 1
enables or disables drawing of the hand icons
disable hand icon draw
Makes the hand icons mirror what the mouse is actually doing during a hand demo
disable hand demo icon
enables or disables drawing of the hand text
disable hand text draw
Sets the hand icon type
set hand icon constant
Sets the mouse position
set mouse position x 100 y 100
Sets how much the hand should raise when over objects (0 - 1)
set hand height multiplier expression
Sets the maximum distance the hand can travel from the camera (-1 to cancel limit)
set maximum hand distance to 5
Sets the hand icon type - based on key bindings. This will work on the keyboard too! With optional arrow
set bindable hand icon BINDABLE_ACTION_TYPE_MOVE with arrow ARROW_TYPE_NONE
Sets the hand icon type - based on key bindings. This will work on the keyboard too!
set hand icon text "BW2T_SCRIPT_01FINAL_OBJECTIVE_ELOI_50"
sets whether the toolbar is currently up or not
set toolbar state to MENU_TOOLBAR_STATE_CLOSED
enables or disables scrolling through the tribute menu
disable tribute menu scroll
centeres the tribute menu on the given artefact
set tribute menu selection to ARTEFACT_ABODE_NUMBER_ALTAR
triggers a floaty number at the given position
trigger floaty number FLOATY_SKULL at SkullPos importance 2 icon FLOATY_HEART value 17
enable/disable the drawing of floaty numbers in widescreen
enable floaty number draw in widescreen
Clears the memory of the last interface clicked object.
clear left clicked object
Clears the memory of the last interface clicked position.
clear left clicked position
See also:
Clears the flag for mouse buttons pressed.
clear left buttonclicked
enables/disables tooltips drawing in widescreen
disable force tooltip draw
sets whether the TC sitt of a player shows the next town to take over, or the list
enable script controlled migration player 0
Sets the creature's ability to do an action (CreatureLearningMatrix.h - LEARN_ACTION)
enable MyCreature action availability LA_POO with LO_OPPONENT_BUILDING
Sets the current value of one of the creature's desires (between 0 and 1 where 1 is full)
set Creature desire CREATURE_DESIRE_HUNGER to 0.0 set Creature desire CREATURE_DESIRE_ANGER to 1.0
Sets the creature desire to the only focus, until you turn it off.
set MyCreature only desire CREATURE_DESIRE_ANGER
Sets the only creature desire off, returning the creature back to normal behaviour.
set MyCreature disable only desire
turn on or off a desire
set Creature desire CREATURE_DESIRE_HUNGER 0 (TODO: enable) (still TODO?)
Sets the creatures development (See creatureenum.h)
set Creature DEVELOPMENT_PHASE_FIRST development
sets a creatures role and forces them to carry it out in the given area
set creature AztecCreature role to CR_SOLDIER radius 20
sets the objects magic type and time duration (Spell dispensers)
set MyDisp magic properties MAGIC_TYPE_FIREBALL time 2000
enables/disables a creatures ability to attack their own town
enable MyCreature attack own town
enables/disables a creatures only using it's right hand. This is restored when released from a script.
enable right hand only for MyCreature
enables/disables a creatures can learn a lesson type
disable MyCreature can learn CREATURE_ACTION_KNOWN_ABOUT_BUILD
enables/disables a creature auto scaling to a multiplier of the height of your creature
enable MyCreature reaction
Enable/Disable all the desires
set Creature all desire TRUE (TODO: enable) (still ToDo?)
warning: must be used with knowledge of what desire maximums actually do see richard
set Creature desire maximum CREATURE_DESIRE_HUNGER to 1.0
sets the priority of the current agenda (determines how easily what he is doing can be interrupted) 0 means very low priority (easily interruptable) 1 means max priority (not interruptable) This is useful for when you want to force a creature to do something, but also allow the thing you've forced him to do to be overrideable by other new things that might come along You are in effect setting the autonomy level of the creature: the lower the priority, the more autonomous (and the higher the priority, the less autonomous)
force Creature POINT_AT OtherCreature set Creature priority 0.1
assigns a particular creature to a player (used when choosing a creature for the first time).
set player 1 creature to ChosenCreature (in ChooseYourCreature.txt)
teach creature a specific lesson first argument is type of action: INTELLECTUAL, PHYSICAL or MAGIC second argument is which action, eg: CREATURE_INTELLECTUAL_ACTION_KNOWN_ABOUT_FISH (in Enum.h) third argument is bool (true or false - whether he knows the lesson or unlearns the lesson) optional fourth parameter is how well he knows it (For magic you could say he has 90% knowledge of water)
teach GuardianCreature INTELLECTUAL CREATURE_INTELLECTUAL_ACTION_KNOWN_ABOUT_FISH SCRIPT_FALSE
teach Gorilla MAGICAL MAGIC_TYPE_FIREBALL SCRIPT_TRUE percentage 50
teaches the creature every lesson
teach GuardianCreature all
teaches the creature every lesson exluding the type defined
teach GuardianCreature all excluding CREATURE_ACTION_LEARNING_TYPE_MAGIC
forces the creature to stop what he is doing and do a particular action second argument is which action to perform, eg: POINT_AT (see CREATURE_ACTION in CreatureEnum.h) third argument is the object the action is applied to fourth argument is the object that is used for the action
force GuardianCreature THROW_AT LostBrother with Stone
forces the creature to stop what he is doing and do a particular action second argument is which action to perform, eg: POINT_AT (see CREATURE_ACTION in CreatureEnum.h)
force GuardianCreature POINT_AT LostBrother
forces the creature to stop what he is doing and do a particular action second argument is which action to perform, eg: POINT_AT (see CREATURE_ACTION in CreatureEnum.h) third argument is the object the action is applied to fourth argument is the position that is used for the action
force GuardianCreature FOOTBALL Ball at {Goal}
clears the number of times the creature has eaten anything / attacked anything / etc (see SCRIPT_PERFORMED_ACTION enum in CreatureEnum.h)
initialise number of SCRIPT_PERFORMED_ACTION_EAT for MyCreature
Force creature to stop whatever he is doing
force GuardianCreature finish
Confines an object at a position within a radius. This hasn't been used in a long time and may not work.
enable Creature confined to {LostHouse} radius 30
Stops an object being confined. This hasn't been used in a long time and may not work.
disable Creature confined
clears the last known object dropped by the creature from its memory (used in CreatureSavingPeople.txt)
attaches a creatures leash to the passed object
attach MyCreature leash to House
attaches a creatures leash to the hand
attach MyCreature leash to hand
sets if the creature pays attention to the leash
enable/disable leash on Creature
toggles the players leash on/off
toggle player 1 leash
detaches the objects leash
detach MyCreature leash
loads a midi file in to the specified player
load midi file "MyFile.mid" on MyPlayer
adds a note (0..127) on a game object using the given player
add note 16 on MyCow using MyPlayer with sound "Milk" anim "Moo"
triggers the midi player to play
play midi MyMidi
sets the creatures home position
set Creature home position {House}
clears the codes memory of what the last gesture drawn by a player was.
clear last gesture
sets the creatures name
set Creature name HELP_TEXT_CREATURE_NAME_01
sets the creatures using navigation or not. Be careful this must be enabled back after widescreen.
disable MyCreature Navigation
Stops an object dropping what it is holding
disable MyCreature can drop
asks a creature to move to a position though may be overriden by more important tasks
request creature MyCreature move to {MyPos} distance 5
asks a creature plays an individual animation though may be overriden by more important tasks
request creature MyCreature play individual anim "MyAnim"
asks a creature plays an static animation though may be overriden by more important tasks
request creature MyCreature play static anim "MyAnim" 5 seconds
requests that a creature performs an action with two given objects (object to act on, object to use)
request creature MyCreature action CREATURE_ACTION ObjectToActOn ObjectToUse
sets the creatures hair length (with an optional time)
set creature MyCreature hair length 1.0 time 3.0
lets the game set the hair length instead of the script
release creature MyCreature hair length time 3.0
forces the creature to look somwhere without any tweening. Used by PJ.
snap creature RedHairyDude focus to {ThatFlowerOverThere}
Sets the creatures transitional attribute type over time. All are from 0 to 1, except alignment, which is -1 to 1.
CREATURE_SCRIPT_TRANSITIONAL_ATTRIBUTE_TYPE_ALIGNMENT
CREATURE_SCRIPT_TRANSITIONAL_ATTRIBUTE_TYPE_FATNESS
CREATURE_SCRIPT_TRANSITIONAL_ATTRIBUTE_TYPE_STRENGTH
CREATURE_SCRIPT_TRANSITIONAL_ATTRIBUTE_TYPE_SIZE
set creature MyCreature CREATURE_SCRIPT_TRANSITIONAL_ATTRIBUTE_TYPE_ALIGNMENT -0.5 time 2
See also:
Makes all animations played by this creature flipped
enable creature MyCreature flip animation
Sets whether or not the creature and army flags should be drawn
enable drawing of all flags
Makes all animations played by this creature flipped
enable creature MyCreature flip animation
Makes the creature always run. Or at least always try to run (creature holding objects won't run). Also, once the creature is released from script it will decide by itself)
enable script creature MyCreatureInScript run
Sets this creatures walk anim to injured. Remember to cancel the override once you're finished!
set creature MyCreature walk override injured
Sets this creatures walk anim to sad. Remember to cancel the override once you're finished!
set creature MyCreature walk override sad
Sets this creatures walk anim to angry. Remember to cancel the override once you're finished!
set creature MyCreature walk override angry
Sets this creatures walk anim to scared. Remember to cancel the override once you're finished!
set creature MyCreature walk override scared
Cancels any walk anim override aplied to the creature
cancel creature MyCreature walk override
Makes this creature happy
set creatures object hapiness to maximum
turns the scripted thought tooltip on the creature on using the specified text string
set creature object script thought text "BW2T_SCRIPT_LAND15_CREATUREDREAMS_TOOLTIP_IAMONION"
turns the scripted thought tooltip on the creature off
clear creature MyCreature script thought
Sets the creatures energy
set creature MyCreature energy to 0.1
enables the player to punish/reward the creature, even while they are in script.
enable script creature MyCreatureInScript interaction
Asks the creature to leave scripted learning mode
ask creature MyCreature to leave scripted learning
enables or disables tooltips on a script controlled creature
disable tooltips on creature MyCreature
Creature animations.
play anim ANM_CRY on MyCreature loop 5
Loads your creature into the game at a specific position.
load my_creature at {House}
Saves the players creature
save my_creature
Loads a computer creature according to a file name for a player without creature into the game at a specific position.
load creature CREATURE_TYPE_COW "vicious" player 3 at [House]
Forces the given platoon to attack this object
add MyVillager to platoon MyPlatoon attack list
Removes this object form the platoon attack list
remove MyVillager to platoon MyPlatoon attack list
add a position to a waypoint list
add {MyPos} to waypoint list MyWaypoints
moves an army along a waypoint list using the provided patrol type (WaypointRouteTraversalTypeEnum.h)
move MyArmy along MyWaypoints with patrol WAYPOINTROUTE_TRAVERSAL_TYPE_CIRCULAR
makes one object attack another with a specified severity. If the second object is a town, there is an optional takeover parameter.
set MyArmy attack EnemyArmy with severity 1
makes an army/platoon attack buildings in the specified area
set MyArmy attack buildings near {TheirTown} radius 50
makes an army/platoon attack everything in the specified area
set MyArmy attack everything near {TheirTown} radius 50
Merges the first platoon into the other. The first platoon will no longer be available.
merge platoon NorseAxemen2 into platoon NorseAxemen1
takes a platoon and enables/disables merging using that platoon
disable platoon MyPlatoon merge
takes a platoon and enables/disables splitting using that platoon
disable platoon MyPlatoon split
takes a platoon and enables/disables it from going into the camp state
disable platoon MyPlatoon camp
threads one platoon to another
thread platoon Platoon1 to platoon PlatoonLeader
removes one platoon from another - (throw wobbler if given platoons not linked)
remove platoon Platoon1 from platoon PlatoonLeader
disbands an army container and unthreads the platoons within
disband army NorseArmy1
disbands a platoon container and sends the villagers within back home
disband platoon MyPlatoon
takes an army container and changes the formation within the that specified by the given enum
set army NorseArmy formation to FORMATION_TYPE_WEDGE
sets a platoons experience to a given value. This doesn't seem to work anymore. Use the following function instead.
set platoon BigEvilPlatoon experience to 1.0
increments the platoons experience by one level
increment platoon BigEvilPlatoon experience
enables or disables the Town's ability to control army ratios
enable MyTown town manager
sets a towns conscript rate to a given value and troop type
set town MyTown platoon type ARMY_UNIT_TYPE_MELEE at ratio 0.2
sets a town's percentage of ranged platoons on wall to value
set town MyTown army type ARMY_UNIT_TYPE_RANGED_1 platoon ratio on wall to 0.5
sets a platoon attempting to take over town by attacking town centre
set platoon GreekPlatoon take over town NorseTown
removes a villager from their platoon
remove villager MyVillager from platoon
Attempts to add a villager to a platoon
add villager MyVillager to platoon MyPlatoon
Creates a platoon formation by passing values for width and depth
set platoon NorsePlatoon formation to 4 wide by 3 deep
Sets the value of a platoons stat
set platoon stat PLATOON_STAT_MOVE_TO_ATTACK_DIST of MyPlatoon to 1.0
Sets the value of a platoons movement stat
set platoon movement value FORMATION_MOVEMENT_STAT_AGENT_SPEED_MAX of MyPlatoon to 1.0
adds an action to the given platoons action queue
add action PLATOON_AGENDA_ACTION_MELEE_ATTACK_THING using EnemyMine to MyPlatoon action queue
adds an action to front of the given platoons action queue
add action PLATOON_AGENDA_ACTION_MELEE_ATTACK_THING using EnemyMine to front of MyPlatoon action queue
adds an action to be done after current action to the given platoons action queue
add action PLATOON_AGENDA_ACTION_MELEE_ATTACK_THING using EnemyMine to next in MyPlatoon action queue
adds an action to the given platoons action queue
add action PLATOON_AGENDA_ACTION_MELEE_ATTACK_THING using {MyPos} to MyPlatoon action queue
adds an action to front of the given platoons action queue
add action PLATOON_AGENDA_ACTION_MELEE_ATTACK_THING using {MyPos} to front of MyPlatoon action queue
adds an action to be done after current action to the given platoons action queue
add action PLATOON_AGENDA_ACTION_MELEE_ATTACK_THING using {MyPos} next in platoon MyPlatoon action queue
clears the action queue of the given platoon
clear MyPlatoon action queue
Removes the current action from the given platoons action queue
remove current action from MyPlatoon action queue
removes a platoon action from the queue at the given index number
remove action 4 from MyPlatoon action queue
resets a given platoons movement stats
reset platoon Platoon1 movement stats
forces a platoon into the camp state
force platoon Platoon1 camp
sets how many siege weapons a town should have as a minimum
set town MyTown siege weapon type SIEGE_BALANCE_TYPE_CATAPULT to 2
adds an action to the given siege weapons action queue
add action SIEGEWEAPON_AGENDA_ACTION_ATTACK_THING using EnemyMine to siege weapon MySiegeWeapon action queue
adds an action to front of the given siege weapons action queue
add action SIEGEWEAPON_AGENDA_ACTION_ATTACK_THING using EnemyMine to front of siege weapon MySiegeWeapon action queue
adds an action to be done after current action to the given siege weapons action queue
add action SIEGEWEAPON_AGENDA_ACTION_ATTACK_THING using EnemyMine to next in siege weapon MySiegeWeapon action queue
adds an action to the given siege weapons action queue
add action SIEGEWEAPON_AGENDA_ACTION_ATTACK_THING using {MyPos} to siege weapon MySiegeWeapon action queue
adds an action to front of the given siege weapons action queue
add action SIEGEWEAPON_AGENDA_ACTION_ATTACK_THING using {MyPos} to front of siege weapon MySiegeWeapon action queue
adds an action to be done after current action to the given siege weapons action queue
add action SIEGEWEAPON_AGENDA_ACTION_ATTACK_THING using {MyPos} next in platoon siege weapon MySiegeWeapon action queue
clears the action queue of the given siege weapon
clear siege weapon MySiegeWeapon action queue
Removes the current action from the given siege weapons action queue
remove current action from siege weapon MySiegeWeapon action queue
removes a siege weapon action from the queue at the given index number
remove action 6 from siege weapon MySiegeWeapon action queue
enables/disables a platoon responding to a attack on a specific town
enable platoon MyPlatoon response to MyTown attack
enables/disables a platoon responding to a attack on local friendly platoons
enable platoon MyPlatoon response to local platoon attack
enables/disables a platoon responding to nearby unfreindly units
enable platoon MyPlatoon respond to player army
enables/disables a platoon eating food
enable platoon MyPlatoon eating
causes a flock to look like a migration
set flock MyFlock to migration
disbands all enemy platoons and causes all people to migrate to you
town GreekTown capture all enemy towns
auto attack
enable siege weapon Catapult[2] auto attack
sets the platoon being able to get on an enemies walls
enable scripted platoon get on enemy wall
sets the level of newly recruited player platoons
set initial level of player melee platoon to ARMY_UNIT_TYPE_MELEE_3
sets the level of newly recruited player platoons
set initial level of player ranged platoon to ARMY_UNIT_TYPE_RANGED_5
sets the level of newly recruited player siege weapon
set initial level of player siege weapon to SIEGE_BALANCE_TYPE_CATAPULT_LEVEL_3
sets whether the army bubbles are displayed
disable show army bubbles
switches the ownership of all platoons belonging to one town to be owned by another town
set all platoon of town BlueTown to town RedTown
sets whether the army placement effects are displayed
disable show army set effect
sets whether the platoon can be disbanded by the player
disable platoon TheLongNamedPlatoonOfDoom can disband
enables or disables the ability to leash the given platoon
disable leashing on platoon GhostLegion
This function sets the countdown time to the value, and the count up time to 0.
set MyTimer time to 6 seconds
sets the strength of the depth of field (0 is min. 1 is average. above 2 is silly.)
set depth of field strength multiplier to 0.5
See also:
sets the distance of the depth of field (0 is min. 1 is average. above 2 is silly.)
set depth of field distance multiplier to 0.5
See also:
Removes all objects from the contaner, which if there are no references left to script things will release them into the game.
Populates a container like a flock with a number of things.
populate CattleFlock with 20 SCRIPT_OBJECT_TYPE_ANIMAL ANIMAL_INFO_COW
If an object is a flock the properties are changed to the values defined, where the outer is the size of the area the flock occupies, and the inner is the radius of the whole area the flock can roam around relative to the flock position.
defines the bounds within which the flock can move
set flock MyFlock to {MyFlockPos} with radius 100.5
defines the given flocks altitude
set flock MyFlock altitude to 228.42
nominates a leader for the flock object
nominate MyLeader as leader for flock MyFlock
adds an object to a flock object
add MyCow to flock MyFlockOfCows
The visual time of day can be set, the value is 0->24. Setting the game time to 21.99 sets the time to 9pm plus 99 percent of the hour. ie. 1% of an hour before 10pm
set game time 21.99
move the time of day in black and white over a period of time.
move game time 21.99 time 3
sets if the game visual time changes
disable game time
creates a reaction centred around an object which moves with the object the reaction information is stored in the spreadsheet (Misc section) and the enum for which reaction to use is enum.h
attach reaction ScaryCreature REACTION_FLEE_FROM_OBJECT
removes *every* reaction associated with this object
detach reaction ScaryCreature
removes all reactions of the type associated with this object
detach REACTION_FLEE_FROM_OBJECT reaction ScaryCreature
runs a script, and does not return control to the script which calls this statement until the called script is finished.
run script PiedPiper
Runs a script as a background task, and continues running the script which called it.
run background script SingingStones
Stops the script running.
stop script "LostBrother"
Stops all the scripts running excluding the list passed. The list is a list of scripts, and sub scripts. If you want to exclude a whole file, then see Stop All Script Files Exclusing. Stopping scripts just stops them, they can be run again as they will remain in memory.
stop all scripts "ControlScriptLand1, ControlScriptLand2, ControlScriptLand3"
See also:
Stops all the scripts in the file list .
stop script files "LostBrother.txt, PiedPiper.txt"
Stops all the scripts in the file list passed excluding the list passed.
stop scripts in files "Missionaries.txt" excluding "CheckSailors"
Stops all the scripts except ones in the file list passed.
stop all scripts excluding files "Control1.txt, Control2.txt"
runs a map script line
run map script line "CREATE_MOBILE_STATIC("2030,2354.30", 25, 10.324, 0.232123, 0.566464, 0,0006, 1,198000)"
Self-explainatory.
wait until Sister clicked
Same as above but without need for the word until.
wait 2 seconds
Only one script tune can play at once, this function starts a script tune which has no 3d position in the world. You may specify an optional fade time and/or an optional loop. The loop can have a number or 'forever'
start music "MUSIC_TYPE_SCRIPT_LOST_BROTHER" with fadetime 3
start music "creaturefightmain_01" loop forever
Stops the script music that is playing. NB. Only one tune can be played at one time.
stop music with fadetime 3
Attaches a tune to a game object, such that when the object is near the camera the tune is played and can be heard in the 3d direction of the object.
attach music "Tune" to PiedPiper range 100
If an object has music attached to it, this function stops the music from playing for the object.
detach music from PiedPiper
If an object has music attached to it, it moves it to the another defined object
move music from Rock7 to Rock8
If an object has music attached to it, it enables to music playing or sets the object to not playing music but setting silence in the area.
disable music on SingingStone1
restarts the music on a game music thing.
restart music on SingingStone1
sets the objects music play position to one different to the object position.
set LastRock music position to [Rock1]
Sets a flag in the game to allow alignment music to play or not.
disable alignment music
takes an object, chooses the channel ID and how much time it takes to fade to the new channel
set MyBigSkull atmos group 1 time 3 seconds
takes the camera, chooses the channel ID and how much time it takes to fade to the new channel
set camera atmos group 1 time 3 seconds id 0
attaches an atmospheric sound to the camera, with optional parameters for distance and volume
attach atmos "SpookySounds" to camera volume 1
attaches an atmospheric sound to an object, with an optional parameter for distance
attach atmos "SpookySounds" to MyBigSkull range 100
detaches an atmospheric sound from an object
detach atmos from MyBigSkull
detaches an atmospheric sound from the camera
detach atmos from camera
sets the fade on or off an atmos sound
enable atmos sound "SpookySounds" fade
sets simulation sound on/off
enable simulation sound with fadetime 3
sets atmos sound on/off, but will not affect scripted atmos
enable atmos sound
sets the volume level of the atmos sound
set atmos volume 0.3
destroys a script mixer
destroy mixer 1 with fadetime 3
sets a mixer channel's gain
set mixer MyMixer channel AUDIO_MIXER_CHANNEL_GLOBAL to 0.0 with fadetime 3
sets a mixer profile to a preset
set mixer MyMixer to "CUTSCENE_A" with fadetime 3
sets auto mixer override on any one object. Using it again switches what object it is used on.
set auto mixer override on BigThing channel AUDIO_MIXER_CHANNEL_SCRIPT_SFX min 10 max 80
resets the auto mixer override
reset auto mixer override
Releases the loop.
release loop
This function plays a sound effect not in 3d space, reference from the text database. Does not display text.
play string sound "HELP_TEXT_LOST_BRO_1"
This function plays a sound effect in 3d space, reference from the text database. Does not display text.
play sound "HELP_TEXT_LOST_BRO_1" at {Brother} with volume 0.8 pitch 0.5
This function plays a random sound effect in 3d space, reference from the text database. Does not display text.
say random sound from group "HELP_TEXT_LOST" at {Brother} with volume 0.8
This function stops a sound effect using text database reference or direct sound reference string.
stop sound "LH_LOSTBROTHER_SAMPLE_BROTHER_HELP"
This function stops a sound effect using text database reference or direct sound reference string when it's loop is ended.
release sound "MY_LOOPING_FIRE_SAMPLE_FOR_EXAMPLE!"
This function creates a 3d sound which triggers the sound effect when the player scrolls near the object. The optional 3d parameter states if the sound should be played in 3d.
attach 3d sound "LH_LOSTBROTHER_SAMPLE_BROTHER_HELP" to Brother
attach sound "LH_LOSTBROTHER_SAMPLE_BROTHER_HELP" to Brother with volume 0.4
This function romoves the above mentioned sound from the object.
detach sound "LH_LOSTBROTHER_SAMPLE_BROTHER_HELP" from Brother
sets the precipitation at a given position
set precipitaion at {SnowPos} radius 10 disable rainfall enable snowfall disable overcast
You are going to have to experiment with the results to be honest, but here is a guide: rainfall 0=no rain 1=rain snowfall 0=no snow 1=snow overcast (0->1 Visability)
set Weather properties rainfall 1 snowfall 0 overcast 0.6
sets the altitude of the given weather object
set cloud MyRainyCloud altitude 55.7
sets the speed at which clouds generate
set cloud generation 3
sets the number of points a cloud has - more points, bigger cloud
set cloud MyCloud points to 4
sets the number of points a cloud has - more points, bigger cloud
set cloud MyCloud size to x 3.2 y 2.8 z 7.1
creates a bolt of lightning that strikes at the given pos
set lightning strike at {MyLightningPos} from MyWeatherObject
sets a cloud above the given position
set cloud for MyWeatherObject above {MyCloudPos}
sets the values for a sandstorm visual effect
set sandstorm object {SandStormPos} moving to {MoveToPos} strength 0.8 radius 20.8
changes the alignment of the clouds
set cloud alignment to 1 at {GoodGuy} radius 20
sets object to be moved by the wind or not in the game. Note that strong winds move storms etc pretty fast so be careful!
enable Storm affected by wind
A check of the condition of something, which if succeeds processes a number of statements.
A check of the condition of something, which upon success processes a number of statements.
when the above if/elsif statement fails this acts as another if, which if successful runs the following statements.
when the proceeding if/elsif fails the code in this block is run.
All if blocks must end in an end if. This is so the parser can work more easily.
this block is used to run code while a condition is still true.
this block is used to run code while a condition is still true. Unlike a normal while, there is no waiting. Also, exceptions will not work within a force while (e.g until)
Statements in this block loop forever unless an exception is true.
See also:
Takes control of the camera, the dialogue, the game speed feature, and sets the screen to widescreen mode. Statements after this will not be run until control is successful. At the end of a cinema sequence the game is returned to non widescreen, the spirits are sent home, and the game speed is set to normal. If you don't want the spririts to go home and wish to keep dialogue control then you can do "end cinema with spirits".
begin cinema
some code...
end cinema
Takes control of the camera, the dialogue, the game speed feature, and sets the screen to widescreen mode. Statements after this will not be run until control is successful. At the end of a cinema sequence the game is returned to non widescreen, the spirits are sent home, and the game speed is set to normal. If you don't want the spririts to go home and wish to keep dialogue control then you can do "end cinema with spirits".
begin cinema
some code...
end cinema
Takes control of the camera, the dialogue, the game speed feature. Statements after this will not be run until control is successful. At the end of a cinema sequence the spirits are sent home, and the game speed is set to normal. If you don't want the spririts to go home and wish to keep dialogue control then you can do "end cinema with spirits".
begin cinema
some code...
end cinema
Takes control of the camera, the dialogue, the game speed feature. Statements after this will not be run until control is successful. At the end of a camera sequence, the spirits are sent home, and the game speed is set to normal. If you don't want the spririts to go home and wish to keep dialogue control then you can do "end camera with spirits".
begin interactive camera
some code...
end interactive camera
To send text to the game or control the spirits, you must be in this block. Statements after this will not be run until control is successful. At the end of a dialogue sequence the the spirits are sent home.
Occassionally you need to be able to be in a function which is already in Dialogue control from the calling function Using this block means you can use the dialogue control you already have.
Occassionally you need to be able to be in a function which is already in Dialogue control from the calling function Using this block means you can use the cinema control you already have.
You can cause the good and evil help spirits to do various things from within the challenge language.
When dealing with spirits, it is often not desirable to create objects to refer to them. You can refer to a spirit directly by using its spirit_type. This command makes the specified spirit appear, if necessary, and then point to the target object.
make good spirit point to Sister
Occasionally you might want to make an object (usually a help spirit) point to another object. You can do this via the make command.
make good spirit point at {Sister}
The specified spirit type will play an animation at the set position, (percentage x across the screen, and percentage y down the screen) at an optionally defined speed percentage
make good spirit play across 0.4 down 0.8 ANIM_HOVERexpression>
The specified spirit type will play an animation at the set position, (in the world) at an optionally defined speed percentage
make good spirit play ANIM_BLOW at {MyPos} in world expression>
The specified spirit type will cling to the edge of the screen, closest to the (percentage x across the screen, and percentage y down the screen) position given. This works when they have not been ejected, so they can cling from the start. To stop them clinging either eject or send home. They can still look around and point while clinging.
make good spirit cling across 0.5 down 1
The specified spirit type will fly to the position on the screen, (percentage x across the screen, and percentage y down the screen)
make good spirit fly across 0.5 down 1
The specified spirit type will fly to the position on the screen, (percentage x across the screen, and percentage y down the screen)
make good spirit fly across 0.5 down 1
Stops the spirit pointing, irrespective of if it is.
stop good spirit pointing
The specified spirit type will look to the set position.
make good spirit look at {12, 34, 54}
The specified spirit type will look at the target object.
make good spirit look at Sister
Stops the spirit looking, irrespective of if it is.
stop good spirit looking
If the script is a help script the spirit will appear in front of the player in a puff of smoke, otherwise the spirit will zoom around on to the screen.
eject evil spirit
Make the spirit type Appear in front of the player in a puff of smoke. Irrespective of the script type.
make evil spirit appear
Make the spirit type disappear in front of the player in a puff of smoke. Irrespective of the script type.
make evil spirit disappear
The specified spirit type will move off the screen.
send random spirit home
Text within the game may or may not have sound attached to it, however this is no concern to the scripter. Some text functions can end with (with interaction, which forces the player to have to click through the text, without interaction which means no amount of clicking will skip the text, or nothing which will mean that text will end when read, or skipped by clicking.
Request that the relevant dialogue gets said
request dialogue EVENT_TYPE_TAKE_TOWN with MAGNITUDE_HI
When developing a script it is useful to have a text out function to debug or put in temp text until the script has been scripted.
say "This is a temp string"
say single line "HELP_TEXT_BLAH" by MyVillager
say single line "HELP_TEXT_BLAH" with interaction by MyVillager
Say a string from the database id.
say database id MyId
say single line database id 201
say single line database id 233 by MyVillager
Say a random string from the group.
say random from group "HELP_TEXT"
say random single line from group "HELP_TEXT" by MyVillager
say random single line from group "HELP_TEXT" with interaction by MyVillager
say the given line from the text group
say line 4 from group GroupID
When developing a script it is useful to have a text out function to debug or put in temp text until the script has been scripted. This version places a value at the
$d-decimal
$p-percentage (Gets the number follwed by a '%' drawn
say "This is $p of a temp string" with number 40
This displays text predefined which may have sound attached to it which will be automatically played. This version places a value at the
$d-decimal
$p-percentage (Gets the number follwed by a '%' drawn
say HELP_TEXT_WITH_NUMBER_SPECIAL with number 30
Clears the text in the dialogue window (Dark Bar)
clear dialogue
Closes the dialogue window (Dark Bar)
close dialogue
Closes the dialogue window (Dark Bar)
close dialogue
Sets the camera zones to the one defined in a file
stores the camera details, (foc, pos)
store camera details
restores the camera details, (foc, pos) from the last ones sent by the store function
restore camera details
resets the camera lens.
reset camera lens time 1
sets the clipping distance
disable clipping distance
Sets the camera lens in an optional amount of time.
set camera lens 132.1 time 5
Moves the camera position smoothly from where it is to the stated position in an amount of time.
move camera position to [LostBrother] time 5
Sets the camera position instantly.
set camera position to [LostBrother]
Moves the camera focus smoothly from where it is to the stated position in an amount of time.
move camera focus to [LostBrother] time 5
Sets the camera focus instantly.
set camera focus to [LostBrother]
moves the camera to face an object, with a distance from the object and a time to get to the said position.
move camera to face LostBrother distance 10 time 5
sets the camera to face an object, with a distance from the object.
set camera to face LostBrother distance 10
This sets the camera focus to follow on an object with an optional offset.
set camera focus follow LostBrother offset {10,0,10}
set camera focus follow LostBrother offset {10,0,10}
This sets the camera position to follow an object with an optional offset.
set camera position follow LostBrother offset {10,0,10}
set camera position follow LostBrother offset {10,0,10}
This moves the follow cameras offset position over time.
move follow camera position offset {MyPos} time 5
This moves the follow cameras offset focus over time.
move follow camera focus offset {MyPos} time 5
This moves the camera focus to follow on an object.
move camera focus follow LostBrother
This moves the camera position to follow an object with the current heading.
move camera position follow LostBrother
Instantly sets the camera to a camera position and focus defined in the camera editor.
set camera to ZOOM_TO_CREATURE TRACK01
Moves the camera to a camera position and focus defined in the camera editor in a define time.
move camera to ZOOM_TO_CREATURE TRACK01
In the camera editor you can create camera paths. An enum in cameraposenum.h
camera path ZOOM_TO_CREATURE TRACK01
DANGEROUS - fixes the camera roration point. Used in learning script
enable fixed camera rotation at {DanceGroup}
play hand demo of a prerecorded hand movement
start hand demo "HandLand1"
Sets the camera position, focus and lens instantly.
set camera position {LostBrother} focus {LostSis} lens 132.2
Moves the camera position, focus and lens in a given time.
move camera position {LostBrother} focus {LostSis} lens 132.2 time 4
Shakes the camera using swave and pwave
shake camera strength 8.0
Stops the camera shaking
stop camera shake
Sets the camera position instantly. Sets the camera position relative to an objects 3d space.
set camera position relative to LostBrother at {offset}
Sets the camera focus instantly. Sets the camera focus relative to an objects 3d space.
set camera focus relative to LostBrother at {offset}
Moves the camera position from the initial position to the given position over the given time and with the various speed expressions
move camera position to {MyPos} time 5 easein 1.5 easeout 1.5
Sets the camera lens in an optional amount of time, with easein and easeout parameters.
set camera lens 132.1 time 5 easein 2.2 easeout 1.6
Moves the camera focus from the initial position to the given position over the given time and with the various speed expressions
move camera focus to {MyPos} time 5 easein 1.5 easeout 1.5
Moves the camera position from the initial position to the given position over the given time and with the various spline expressions
move camera position to {MyPos} time 5 catmullrom bias 1.0 tension 2.0
Moves the focus position from the initial position to the given position over the given time and with the various spline expressions
move camera focus to {MyPos} time 5 catmullrom bias 1.0 tension 2.0
Sets the camera lens from the initial position to the given position over the given time and with the various spline expressions
set camera lens to {MyPos} time 5 catmullrom bias 1.0 tension 2.0
rolls the camera roll through the given number of degrees
set camera roll 45 time 10
Sets the camera roll in an optional amount of time, with easein and easeout parameters.
set camera roll 132.1 time 5 easein 2.2 easeout 1.6
Sets the camera roll from the initial position to the given position over the given time and with the various spline expressions
set camera roll to {MyPos} time 5 catmullrom bias 1.0 tension 2.0
Plays the camera path that has been set up
play camera path with easein 1 easeout 1 play camera path with easein 1 easeout 1 method SCRIPT_CAMERAPATH_EQUALDISTANCE
Sets the camera roll from the initial position to the given position over the given time and with the various spline expressions
set camera roll to {MyPos} time 5 catmullrom bias 1.0 tension 2.0
Resets the camera path
reset camera path
This documentation generated by LHDOC, © Lionhead Studios 2000