(1.2)VOID SetString(index, stringid)
Set string.<index> to the string (from the string database) stringid. For Example, if you these strings in the database:
SCENARIO_AUTHOR_MESSAGE "This scenario was written by [string.1.name]"
SCENARIO_AUTHOR "Joe Rumsey"
And you put this in a SLIC messagebox:
SetString(1, ID_SCENARIO_AUTHOR);
Text(ID_SCENARIO_AUTHOR_MESSAGE);
The resulting text in the message will be:
This scenario was written by Joe Rumsey
(1.2)VOID SetStringByDBIndex(index, stringindex)
Set string.<index> from the integer string id stringindex. See also GetStringDBIndex and SetString
VOID SetTimerGranularity(gran)
Set SLIC's timer mechanism to check timers every gran seconds. 1 second is the best granularity possible. The default is 5 seconds.
(1.1) VOID SetUnit(index, unit)
Set unit.index to unit. Useful to access the attributes of a unit stored in a TypeUnit variable. E.G. SetUnit(1, myUnitVariable) will cause unit.1 to be the unit stored in myUnitVariable.
(1.1) VOID SetUnitByIndex(index, player, unitindex)
Set unit.index to player's unitindexth unit. Useful for looping through all of a player's units for example.
VOID Show()
Open this message immediately instead of showing just an icon.
INT SpaceRank(player)
The rank of this player in terms of space ownership.
(1.2)INT Stacked(location)
Are all of the units at the given location in a single group?
VOID StartTimer(index, duration)
Start timer index, set to expire in duration seconds. trigger 'foo' when (timer.<index>) {...} to tell when this timer has expired.
VOID StopTimer(int)
Stop the given timer.
VOID Surrender(player)
Unimplemented.
VOID Terraform(location, terrain)
Change location into a different terrain type.
0 TERRAIN_TYPE_FOREST
1 TERRAIN_TYPE_PLAINS
2 TERRAIN_TYPE_TUNDRA
3 TERRAIN_TYPE_GLACIER
4 TERRAIN_TYPE_GRASSLAND
5 TERRAIN_TYPE_DESERT
6 TERRAIN_TYPE_SWAMP
7 TERRAIN_TYPE_JUNGLE
8 TERRAIN_TYPE_MOUNTAIN
9 TERRAIN_TYPE_HILL
10 TERRAIN_TYPE_WATER_SHALLOW
11 TERRAIN_TYPE_WATER_DEEP
12 TERRAIN_TYPE_WATER_VOLCANO
13 TERRAIN_TYPE_SPACE
14 TERRAIN_TYPE_WATER_BEACH
15 TERRAIN_TYPE_WATER_SHELF
16 TERRAIN_TYPE_WATER_TRENCH
17 TERRAIN_TYPE_WATER_RIFT
18 TERRAIN_TYPE_DEAD
19 TERRAIN_TYPE_BROWN_HILL
20 TERRAIN_TYPE_BROWN_MOUNTAIN
21 TERRAIN_TYPE_WHITE_HILL
22 TERRAIN_TYPE_WHITE_MOUNTAIN
23 TERRAIN_TYPE_DEAD_HILL
INT TerrainType(location)
Return the terrain type of the location.
VOID Title(stringid)(Messages only)
Set the title of a message.
INT TradePoints(player)
Return how many caravans the player has.
INT TradeRank(player)
The player's rank in terms of number of trade routes.
INT TradeRoutes(player)
Return how many trade routes the player has.
INT UnderseaRank(player)
The player's rank in terms of undersea cities.
(1.2)INT UnitHasUserFlag(unit, flag)
Returns true if the given unit has a "SET_USER_FLAG <flag>" in it's database record. <flag> is a number from 1 to 32. They are completely unused by the code, this is the only place they mean anything at all.
INT UnitType(unitname)
Return the DB index of the named unit. The name must be in quotes. E.G. UnitType("UNIT_SETTLER")
INT UnitCount(player, type)
Return a count of how many units of a given type the player has.
INT UnitHasFlag(unit, (ID)flag)
Return true if the given unit has the specified flag (flags are the same as in units.txt. NOTE: a few flags may not work with this function.)
INT UnitsInCell(location)
Return the number of units in the cell.
VOID UseDirector()(Messages only)
Queue this message up via the animation system instead of displaying it immediately. Useful to synchronize messages with other things happening on screen.