These functions allways return an object in the game. They mostly deal with either creating an object or finding an object in the world.
See also:
Getting and creating miscalaneous object types.
Creating and getting objects of any kind *
Creating or getting Miracle related objects *
Creating or getting Dance objects *
Creating or getting Flock objects *
Creating or getting Town objects *
Creating Marker objects *
Creating Influence objects *
Creating and getting Creature related objects *
Getting Villager related objects *
Creating and getting Building related objects *
Creating and getting Army related objects *
Creating and getting spell objects *
These allow you to create tooltips in various ways
Adam Langridge has created a number of spot visuals in Black and White.
Gets a MicroClimate object near the given position
MyClimate = get WEATHER_INFO_LARGE_CLOUD climate at {MyPos} radius 4
creates a video window at the given position with the given dimensions. Note that when your video stops playing, your video window pointers are no longer valid (use 'is video playing' to check for this)
MyVid = create video window with left 0 top 0 width 1 height 1
Creates a highlight/scoreboard at a position.
create highlight SCRIPT_HIGHLIGHT_INFO_SCRIPT_SILVER for "Lost Brother script name" at {FlockPos}
create highlight SCRIPT_HIGHLIGHT_INFO_SCRIPT_SILVER for "Lost Brother script name" at {FlockPos} tribute 100
create highlight SCRIPT_HIGHLIGHT_INFO_SCRIPT_SILVER for "Lost Brother script name" at {FlockPos} tribute 100 impressiveness tribute 200
creates a did you know sign at a position with given title and description
Sign = create dyk at {SignPios} title "BW2T_blah" description "BW2T_blah"
This timer is not displayed. Use it for triggers dependant on time, or optimising doing searches it is often worth starting a timer object within the script.
create timer for 2.4 seconds
makes a given object (which must be a container) pay a form of pilgrimage to another town
YourTown pilgrimage PILGRIMAGE_TYPE_HOMAGE to town MyTown with 4 pilgrims
creates a terminal object at at given position for a given time
create terminal object at {MyPos} with duration of 5 seconds
creates rubble at a given position
MyRubble = create rubble type 1 scale 1.2 at {MyRubblePos} velocity {0, 10, 0}
creates a script mixer
MyMixer = create mixer
passes a pointer to the variable.
address of MyVillager
references an existing variable from an array.
pushes the address of an existing variable from an array.
Gets an object of type at a position from the game, and an optional sub_type.
MyHouse = get HOUSE HOUSE_A at {MyBuildingSite}
Gets an object with the given name
MyHouse = get object called "MyHouse"
Gets an object of type within a radius of a position.
MyHouse = get HOUSE at {MyEstate} radius 20
Looks in a conatiner for an object not near the defined position.
get ANIMAL COW in Flock not near [LostBrother] radius 10
gets objects of type in a container.
get ANIMAL COW in Flock
gets a poisoned object from a container.
get poisoned ANIMAL in MyFlock
gets a non-poisoned object from a container.
get non-poisoned ANIMAL in MyFlock
Gets an object of type in a container within a redius from a position.
get ANIMAL in MyFlock at {MyField} radius 20
Gets an object flying of type within a radius of a position.
returns the object, converted to the type specified (ScriptEnums.h)
MyDodgyHouse = convert MyHouse using SCRIPT_CONVERT_ROCK
Creates a game object at a position.
create ANIMAL BOVINE at {FlockPos}
Creates a game object at a position.
create ANIMAL BOVINE at {FlockPos}
creates a game object at a position with an angle and scale
create with angle 0 and scale 2.5 ANIMAL BOVINE at {FlockPos}
Gets the currently held object by an object (A creature only currently).
Gets the last object dropped by an object (A creature only currently).
Gets the object the interface hand is over.
Object=get object hand is over
get what an object is leashed to.
get object MyCreature leashed to
Gets the object clicked
Object=get object left clicked
Gets the object held by the hand.
Object=get object held
gets the object the creature is interacting with or thinking about. Has not been used in a long time and may not work.
Gets the first object in a container (Eg. Flock).
FlockMember=get first in Flock
Gets the next object in a container after the one passed. If it doesn't find the one passed it returns the first one. This function is very slow for towns.
FlockMember=get next in Flock after FlockMember
gets the object the creature is currently holding
CreatureHolding = get object in MyCreature hand
gets a flocks leader
LeaderManTid = get flock TidsFriends leader
Checks what the object. Must have physics tracking enabled on the object.
gets the spell icon from the temple object using a magic_type.
get spell icon MAGIC_TYPE_WOOD in MyTemple
Gets the objects creator if it has one.
Wonder=get MySpell creator
creates a volcano to the landscape without any spell being cast
create volcano at hand position player 1
creates a volcano to the landscape without any spell being cast
create hurricane at hand position player 1 direction {0, 0, 25}
create earthquake from a start position to an end position
create earthquake start {QuakeStartPos} end {QuakeEndPos} player 1
create a siren without a wonder
create siren at {SirenPos} player 1
Makes an object perform a specific dance at a position for a time.
Gets the object dance if it has one.
MyDance=get MyEpicWonder dance
Creates a flock at the position.
Gets the object flock if it has one.
Flock=get Sheep2 flock
creates a flock container at the given pos, with the given radius. NB: The radius is an angle for some flock types
MyFlockContainer = create flock PROTEST_VIGILANT at {ProtestPos} radius 10
creates a flock container
MyFlockContainer = create flock container
creates a town. NB. Script created towns are uninhabitable by default. Hasn't been used in a long time and may not work.
create player 0 town at {TownPos} type TRIBE_TYPE_CELTIC
Gets the nearest town of a players near a position within a radius.
get nearest town at {LostBorther} for player 1 radius 20
Gets the town which has a particular id.
get town with id 24
Gets the town, the given town is migrating too
Town = get town MyTown is migrating to
Gets the town which is migrating to the given player
get town migrating to player 0
Gets the last town which migrated to a player
get last town migrated to player 0
Gets the town, the given town is migrating too
Town = get town MyTown has migrated to
finds the next town to migrate
NextTown = get next town object to migrate to town MyTown
See also:
creates a position marker.
marker at {LostBrother}
Get a marker at a camera? This hasn't been used for a long time, and may not work.
creates an influence on an object.
create influence on Rock radius 10
creates an influence at a position.
create influence at {House} radius 10
Creates a void of influence an on object with a radius.
Creates a void of influence at a position with a radius.
Gets the players creature.
get player 2 creature
creates a creature at a position using only certain alignment textures. Will not work on things that are not creatures. Any of the optional keywords 'good', 'neutral', 'evil' must appear in that order.
CreatureArray[CLION] = create DUMB_CREATURE CREATURE_TYPE_LION at {1575.928, 111.473, 838.692} using only alignment good neutral
Gets an adult excluding a disciple type
MyVillager = get adult at hand position radius 100 excluding disciple VILLAGER_DISCIPLE_FARMER OtherVillager = get adult at hand position radius 100 excluding disciple VILLAGER_DISCIPLE_NONE
Gets an object of type that is in a specified state, within a radius of a position.
MyCorpse = get VILLAGER in state DEAD at {MyGraveyard} radius 20
gets a disciple of that type near the position
get disciple VILLAGER_DISCIPLE_BREEDER at {MyHouse} radius 10.0 excluding scripted
creates a random villager type of the selected tribe at young adult age
Child = create random villager of tribe TRIBE_TYPE_NORSE at [CaveFlock]
Gets the first game living (Animal or Villager) which is dead within the radius.
get dead at {StoneCircle} radius 20
gets a villager of the specified type living in the specified abode
get SCRIPT_VILLAGER_TYPE_CHILD living in abode ThatHouseWithTheHair
Gets a planned building near the given position
MyBuilding = get planned building near {MyPos} radius 10
Starts the building of planned buildings of the given type in the group
build town MyTown buildings of type CRECHE in group 0
Gets a planned building near the given position in the given town
MyBuilding = get planned building in MyTown near {MyPos} radius 10
Starts the building of planned epic wonders of the given type in the group
build town MyTown epic wonders of type CRECHE in group 0
Starts the building of planned embellishments of the given type in the group
build town MyTown embellishments of type CRECHE in group 0
if a building is planned in the landscape you can trigger the associated town to have a desire to build the planned building. Be careful with putting the desire (0->1) too high, as it will look strange having the town building a building. Also the number of buildings per building is defined in the spreadsheet.
Building = build building at {BuildingSite} desire 0.6
gets a building of a certain type in a town.
get building ABODE_NUMBER_WORKSHOP in Town min built 1.0 excluding scripted
gets a building of a certain type in a town.
get building ABODE_NUMBER_WORKSHOP in Town max built 1.0 excluding scripted
get the specified resource at a given buildings building site
Woodpile = get building resource RESOURCE_TYPE_WOOD in MyHouse
gets the storage pit with the most of a given resource
get town NorseTown storage pit with most RESOURCE_TYPE_FOOD
returns a random abode in a given town
MyAbode = get random abode in town MyTown
returns a random home in a given town
MyHouse = get random home in town MyTown excluding scripted
returns a random abode of a particular type in a given town
MyHouse = get random abode of type GREEK_ABODE_A in town MyTown
gets the wall segment nearest the given position and within the given radius
get wall segment nearest {MyWallPos} radius 5
returns a pointer to the prison the given villager is within
get prison of MyLittleThief
Creates a platoon from PlatoonInfoEnum.h. It will be filled with given a number of men and women
create platoon PLATOON_INFO_GREEK_RANGED_SHORT at {MyPos} with 6 men and 6 women
Splits a number of soldiers from their platoon into the new platoon
MyNewPlatoon = split 4 soldiers from platoon GreekArchers1
Gets the platoon nearest to the given position and within a radius in metres
get platoon nearest {MyTownCentre} radius 10
Gets the platoon of a particular player nearest to the given position and within a radius in metres
get platoon of player CompPlayer nearest {MyTownCentre} radius 10
Gets the siege weapon of a particular player nearest to the given position and within a radius in metres
get siege weapon of player CompPlayer nearest {MyTownCentre} radius 10
Gets the platoon of a particular tribe nearest to the given position and within a radius in metres
get platoon of tribe GREEK nearest {MyTownCentre} radius 10
Gets the idle platoon of a particular player nearest to the given position and within a radius in metres
get idle platoon of player CompPlayer nearest {MyTownCentre} radius 10
Gets the idle platoon nearest to the given position and within a radius in metres
get idle platoon nearest {MyTownCentre} radius 10
Gets the idle platoon of a particular tribe nearest to the given position and within a radius in metres
get idle platoon of tribe TRIBE_TYPE_NORSE nearest {MyTownCentre} radius 10
Gets the platoon of type ARMY_UNIT_TYPE nearest to the given position and within a radius in metres
get platoon of type ARMY_UNIT_TYPE_RANGED_1 nearest {MyTownCentre} radius 10
Gets the platoon of type ARMY_UNINT_TYPE of a particular tribe nearest to the given position and within a radius in metres
get platoon of tribe TRIBE_TYPE_NORSE of type ARMY_UNIT_TYPE_RANGED_1 nearest {MyTownCentre} radius 10
Gets the platoon of a type ARMY_UNIT_TYPE of a particular player nearest to the given position and within a radius in metres
get platoon of type ARMY_UNIT_TYPE_RANGED_1 of player CompPlayer nearest {MyTownCentre} radius 10
Gets the idle platoon of type ARMY_UNIT_TYPE nearest to the given position and within a radius in metres
get idle platoon of type ARMY_UNIT_TYPE_RANGED_1 nearest {MyTownCentre} radius 10
Gets the idle platoon of type ARMY_UNINT_TYPE of a particular tribe nearest to the given position and within a radius in metres
get idle platoon of type ARMY_UNIT_TYPE_RANGED_1 of tribe TRIBE_TYPE_NORSE nearest {MyTownCentre} radius 10
Gets the idle platoon of a type ARMY_UNIT_TYPE of a particular player nearest to the given position and within a radius in metres
get idle platoon of type ARMY_UNIT_TYPE_RANGED_1 of player CompPlayer nearest {MyTownCentre} radius 10
Gets the platoon of type ARMY_UNIT_TYPE nearest to the given position and within a radius in metres
get platoon on wall of type ARMY_UNIT_TYPE_RANGED_1 nearest {MyTownCentre} radius 10
Gets the platoon of type ARMY_UNINT_TYPE of a particular tribe nearest to the given position and within a radius in metres
get platoon on wall of type ARMY_UNIT_TYPE_RANGED_1 of tribe TRIBE_TYPE_NORSE nearest {MyTownCentre} radius 10
Gets the platoon of a type ARMY_UNIT_TYPE of a particular player nearest to the given position and within a radius in metres
get platoon on wall of type ARMY_UNIT_TYPE_RANGED_1 of player CompPlayer nearest {MyTownCentre} radius 10
Gets the platoon nearest to the given position and within a radius in metres
get platoon on wall nearest {MyTownCentre} radius 10
Gets the platoon of a particular player nearest to the given position and within a radius in metres
get platoon on wall of player CompPlayer nearest {MyTownCentre} radius 10
gets a ramdom platoon of a type attached to a town
get platoon of type ARMY_UNIT_TYPE_RANGED_1 of town GreekTown excluding scripted
gets a ramdom idle platoon of a type attached to a town
get idle platoon of type ARMY_UNIT_TYPE_RANGED_1 town GreekTown
Gets the army a platoon belongs to
get army from platoon NorsePlatoon
Gets the army nearest to coord in radius
get army nearest {HandPos} radius 10
Gets the army of player nearest to coord in radius
get army of player CompPlayer nearest {HandPos} radius 10
gets a random villager from a platoon
MyVillager = get random villager from platoon MyPlatoon
gets a villager from a platoon nearest to a position
MyVillager = get villager from platoon MyPlatoon nearest {ClickedPos}
gets a villager who is not dead (living/ alive/ breathing)
MyVillager = get living villager at {MyPosition} radius 15
creates a siege weapon at the given position and assigns it to the given town (NOTE: There is no longer a distinction between a manned and unmanned seige weapon)
create siege weapon SIEGE_BALANCE_TYPE_CATAPULT_LEVEL_1 belonging to GreekTown at {MyNewPos}
Gets a siege weapon of type at a position, belonging to a town
TheirWeapon = get siege weapon SIEGEWEAPON_TYPE_CATAPULT_LEVEL_1 of town TheirTown at {TheirPos} radius 10
Gets a siege weapon of type at a position, belonging to a player
TheirWeapon = get siege weapon SIEGEWEAPON_TYPE_CATAPULT_LEVEL_1 of player 1 at {TheirPos} excluding scripted
Creates a missile group of type (MissileTypeEnum.h) with launch type (MissileLauchEnum.h).
create missiles MISSILE_ARROW_FLAMING launch MISSILE_LAUNCH_FORTY_FIVE size 5 from MyArcherBloke to {PoorLittleHouse} speed 1.5
Makes a town recruit expression soldiers of type constant
MyPlatoon = recruit ARMY_UNIT_TYPE_MELEE_1 town MyTown platoon of size 100
Makes a town recruit a siege weapon
MyCatapult = recruit SIEGE_BALANCE_TYPE_CATAPULT_LEVEL_1 town MyTown siege weapon
Pours a miracle of the given type at the position specified (MiracleTypeEnum.h)
make player 0 pour spell MIRACLE_TYPE_DEATH at {MyPos}
Throws a miracle of the given type from the position specified, with a heading (MiracleTypeEnum.h)
make player 0 throw miracle MIRACLE_TYPE_DEATH from {MyPos} heading {OverThere}
Returns if a spell was cast at a position within a radois, if it was a shield then returns if a position is protected by spells NOT USING THE RADIUS.
get spell SPELL_HEAL_LEVEL_1 at {LostBrother} radius 5
create tooltip on an object
BigManTT = create tooltip on MyBigMan with text "BW2T_SCRIPTS_LAND15_BIGMANSCRIPT_TOOLTIP_10"
create tooltip at a location
TurtleLookTT = create tooltip on {TurtleLookSpot} with text "BW2T_SCRIPTS_LAND15_TURTLERACE_TOOLTIP_30"
create tooltip on the hand
NotHereTT = create tooltip on hand with text "BW2T_SCRIPTS_LAND15_HANDMAZE_TOOLTIP_80"
Creates an in game visual effect at a position with a duration. See visualeffecttypeenum.h
create visual effect VISUAL_EFFECT_PLASMA_RAY at {MyPos} time 10 direction {Dir} target {Targ}
Creates an in game visual effect on an object with a duration.
create visual effect VISUAL_EFFECT_PLASMA_RAY on ARock time 0.5
Creates an in game visual effect at a position with a duration. Takes a string
FX = create visual effect "TestEffect" strength 0.1 scale 0.4 at {MyPos} time -1 direction {Dir} target {Targ}
Creates an in game visual effect on an object with a duration. Takes a string
create visual effect "TestEffect" strength 0.2 scale 0.7 on BertieBig time -1
Creates an in game visual effect on the creatures hand with a duration. Takes a string
create visual effect "TestEffect" strength 0.2 scale 0.7 on creature MyCreature left hand time -1
This documentation generated by LHDOC, © Lionhead Studios 2000