Player Functions *
String Sound Animation Functions *
Object - File Functions *
Miscellaneous Functions *
CALL BACK FUNCTIONS *
CLIENT FUNCTIONS *
CLIENT ONLY FUNCTIONS *
COMMAND FUNCTIONS *
Gamebase Functions *
Group and Set Functions *
Item Functions *
Math and Vector Functions *
Moveable Functions *
Network Server Functions *
Team Functions *
Vehicle Functions *
Object - File Functions *
From some web page I found on operators: *
Scripting Commands and Variables for Starsiege Tribes *
Info: *
Variables *
Tribes Scripting *
Contents *
Introduction *
Summary of System Namespaces *
Details of System Namespaces *
Details of System Global Namespace Functions *
Summary of Types *
Details of Types *
Player Functions |
Updated 04/16/99 |
Player::getClient(PlayerId) |
PlayerId: The
players object Id. Example: 8361 USED IN: BaseProjData.cs, Game.cs, Item.cs, Objectives.cs, ... RETURN: Client Id. Example: 2049. If failed then -1. |
Used to get the Clients Id from the Players Id. |
Player::setDetectParameters(Player, MinSize, HazeFac) |
Player: The object
Id. Example: 8361. MinSize: The minimum size that the enemy object must appear before there will be a direct LOS on that object. HazeFac: Haze factor. USED IN: Currently not used in any script files. RETURN: True if succeed or False if failed. |
Used to set what the size and haze factor must be before a sensor or player can have a direct LOS on the enemy object. |
Player::setAnimation(Player or Client, AnimIndx) |
Player: The object
Id. Example: 8361. Client: The Client Id. Example: 2049. AnimIndx: The index of the animation number to play. Players Animations are setup in the Players data block (PlayerData). Look in the ArmorData.cs file for examples of the PlayerData blocks. USED IN: Player.cs RETURN: True if succeed or False if failed. |
Used to play an animation on a Player. |
Player::getArmor(Player or Client) |
Player: The object
Id. Example: 8361. Client: The Client Id. Example: 2049. USED IN: Item.cs, Player.cs, Station.cs, Vehicle.cs RETURN: Armor Type. There are five armor types: larmor, marmor, harmor, lfemale, mfemale. |
Used to get what armor type the Player or Client is using. |
Player::incItemCount(Player or Client, Item, <Amount>) |
Player: The object
Id. Example: 8361. Client: The Client Id. Example: 2049. Item: The data block name of the item. Example: Chaingun Amount: Amount to increment the Item count by. USED IN: Item.cs, Station.cs RETURN: New Item total. If failed then 0. |
Used to increment the players Item count by Amount. If no Amount argument is passed in then the Item count is incremented by one. |
Player::decItemCount(Player or Client, Item, <Amount>) |
Player: The object
Id. Example: 8361. Client: The Client Id. Example: 2049. Item: The data block name of the item. Example: Chaingun Amount: Amount to decrement the Item count by. USED IN: Item.cs, Player.cs RETURN: New Item total. If failed then 0. |
Used to decrement the players Item count by Amount. If no Amount argument is passed in then the Item count is decremented by one. |
Player::setItemCount(Player or Client, Item, Amount) |
Player: The object
Id. Example: 8361. Client: The Client Id. Example: 2049. Item: The data block name of the item. Example: Chaingun Amount: Amount to set the Item count to. USED IN: Ai.cs, Dm.cs, Item.cs, Objectives.cs RETURN: New Item total. If failed then 0. |
Used to set the players Item count to Amount. |
Player::getItemClassCount(Player or Client, ClassName) |
Player: The object
Id. Example: 8361. Client: The Client Id. Example: 2049. ClassName: The name of the class. Example: Weapon USED IN: Item.cs, Station.cs RETURN: Number. The number of Items of type ClassName found. If failed then 0 |
Used to find the number of Items of that ClassName the Player or Client currently has. |
Player::mountItem(Player or Client, Item, ImageSlot) |
Player: The object
Id. Example: 8361. Client: The Client Id. Example: 2049. Item: The data block name of the item. Example: Chaingun ImageSlot: There are four slots: $WeaponSlot==0, $BackpackSlot==1, $FlagSlot==2, $DefaultSlot==3. USED IN: Item.cs, Objectives.cs RETURN: True if succeed or False if failed. |
Used to mount an Item to the defined slot. Example: When you press a number key to switch weapons you are mounting that new weapon in the WeaponSlo. |
Player::unmountItem(Player or Client, ImageSlott) |
Player: The object
Id. Example: 8361. Client: The Client Id. Example: 2049. ImageSlot: There are four slots: $WeaponSlot==0, $BackpackSlot==1, $FlagSlot==2, $DefaultSlot==3. USED IN: Item.cs, Vehicle.cs RETURN: True if succeed or False if failed. |
Used to unmount an Item from the ImageSlot. Example: When you pilot a vehicle your weapon is unmounted. |
Player::getMountedItem(Player or Client, ImageSlot) |
Player: The object
Id. Example: 8361. Client: The Client Id. Example: 2049. ImageSlot: There are four slots: $WeaponSlot==0, $BackpackSlot==1, $FlagSlot==2, $DefaultSlot==3. USED IN: BaseProjData.cs, Item.cs, Objectives.cs, Player.cs, ... RETURN: Item. The data block name of the item. Example: Chaingun. If failed then -1. |
Used to find out what Item is mounted in the ImageSlot. |
Player::getNextMountedItem(Player or Client, ImageSlot) |
Player: The object
Id. Example: 8361. Client: The Client Id. Example: 2049. ImageSlot: There are four slots: $WeaponSlot==0, $BackpackSlot==1, $FlagSlot==2, $DefaultSlot==3. USED IN: Item.cs RETURN: Item. The data block name of the item. Example: Chaingun. If failed then -1. |
Used to get the next available Item to be mounted in the ImageSlot. The Items are only once that the Player has in there inventory. |
Player::useItem(Player or Client, Item) |
Player: The object
Id. Example: 8361. Client: The Client Id. Example: 2049. Item: The data block name of the item. Example: Chaingun USED IN: Dm.cs, Game.cs, Item.cs, Vehicle.cs RETURN: True if succeed or False if failed. |
Used to mount the Item in it proper ImageSlot. |
Player::dropItem(Player or Client, Item) |
Player: The object
Id. Example: 8361. Client: The Client Id. Example: 2049. Item: The data block name of the item. Example: Chaingun USED IN: Item.cs, Objectives.cs, Player.cs RETURN: True if succeed or False if failed. |
Used to drop the Player or Clients Item. |
Player::deployItem(Player or Client, Item) |
Player: The object
Id. Example: 8361. Client: The Client Id. Example: 2049. Item: The data block name of the item. Example: Chaingun USED IN: Item.cs RETURN: True if succeed or False if failed |
Used to deploy the Player or Clients Item. |
Player::setMountObject(Player or Client, Object, MPoint) |
Player: The object
Id. Example: 8361. Client: The Client Id. Example: 2049. Object: The object Id. Example: 8643. MPoint: Mount Point. Where on the object to mount. USED IN: Player.cs, Turret.cs, Vehicle.cs RETURN: True if succeed or False if failed. |
Used to mount a
Player on an Object at the MPoint. Example: Mounting Players to vehicles. The 0 MPoint on a vehicle is the pilot mount point. The HPC and LPC have additional MPoints for each passenger. |
Player::getMountObject(Player or Client) |
Player: The object
Id. Example: 8361. Client: The Client Id. Example: 2049. USED IN: Player.cs RETURN: Object. The object id that the Player is mounted to. If failed then -1 or False. |
Used to get the Object that the Player or Client is mounted to. |
Player::trigger(Player or Client, ImageSlot, <Bool>) |
Player: The object
Id. Example: 8361. Client: The Client Id. Example: 2049. ImageSlot: There are four slots: $WeaponSlot==0, $BackpackSlot==1, $FlagSlot==2, $DefaultSlot==3. Bool: True if it is triggered. False if not. If no Bool is passed in then it is set to triggered. USED IN: BaseProjData.cs, Item.cs, RETURN: True if succeed or False if failed. |
Used to set Items as triggered. This will allow you to call the function isTriggered() to see if the Item is triggered. |
Player::isTriggered(Player or Client, ImageSlot) |
Player: The object
Id. Example: 8361. Client: The Client Id. Example: 2049. ImageSlot: There are four slots: $WeaponSlot==0, $BackpackSlot==1, $FlagSlot==2, $DefaultSlot==3. USED IN: BaseProjData.cs, Player.cs RETURN: True if the Item is triggered or False if failed or not triggered. |
Used to see if the Item in the ImageSlot is triggered. Firing a weapon is one way to trigger an Item or in the case of the energy pack when mounted is always triggered. |
Player::setSensorSupression(Player or Client, Value) |
Player: The object
Id. Example: 8361. Client: The Client Id. Example: 2049. Value: The radius to suppress in meters. USED IN: Item.cs RETURN: True if succeed or False if failed. |
Used to associate a radius with an Player so that nothing with in that radius will appear on an enemies sensor network. |
Player::getSensorSupression(Player or Client) |
Player: The object
Id. Example: 8361. Client: The Client Id. Example: 2049. USED IN: Item.cs RETURN: Number. The radius. If failed then 0. |
Used to get the
radius previously defined by Player::setSensorSupression. |
Player::isDead(Player or Client) |
Player: The object
Id. Example: 8361. Client: The Client Id. Example: 2049. USED IN: Admin.cs, Dm.cs, Moveable.cs, Player.cs, Item.cs, ... RETURN: True if player is dead else False. |
Used to determine if the Player or Client is dead. |
Player::applyImpulse(Player or Client, Vector) |
Player: The object
Id. Example: 8361. Client: The Client Id. Example: 2049. Vector: The direction and force. USED IN: Player.cs, Vehicle.cs RETURN: False. |
Used to apply the Vector to the Player object. This will cause the player to be forced in the direction defined by Vector. |
Player::kill(Player or Client) |
Player: The object
Id. Example: 8361. Client: The Client Id. Example: 2049. USED IN: Admin.cs, Player.cs, Observer.cs RETURN: True if succeed or False if failed. |
Used to set the
player as killed and will also call the Player::onKilled function. |
Player::getDamageFlash(Player or Client) |
Player: The object
Id. Example: 8361. Client: The Client Id. Example: 2049. USED IN: Player.cs RETURN: Flash. The flash is a value in the range 0-1. If failed then 0. |
Used to get the current degree of flash. The flash is used to give the screen a reddish tint when a Player or Client is harmed. |
Player::setDamageFlash(Player or Client, Value) |
Player: The object
Id. Example: 8361. Client: The Client Id. Example: 2049. Value: The value of the flash in the range 0-1. USED IN: Dm.cs, Player.cs RETURN: True if succeed or False if failed |
Used to set the current degree of flash. The flash is used to give the screen a reddish tint when a Player or Client is harmed. |
Player::setArmor(Player or Client, Armor) |
Player: The object
Id. Example: 8361. Client: The Client Id. Example: 2049. Armor: Type of armor. There are five armor types: larmor, marmor, harmor, lfemale, mfemale. USED IN: Game.cs, Item.cs RETURN: True if succeed or False if failed. |
Used to set the Player or Clients armor type. |
Player::isExposed(Player or Client) |
Player: The object
Id. Example: 8361. Client: The Client Id. Example: 2049 USED IN: Player.cs RETURN: True if Exposed otherwise False if not Exposed or failed. |
Used to see if a player can be damaged by a projectile. Was written for vehicles that once a Player was inside they where protected and couldn't be harmed. This is not supported and will always return True. |
Player::isJetting(Player or Client) |
Player: The object
Id. Example: 8361. Client: The Client Id. Example: 2049. USED IN: Ai.cs RETURN: True if jetting otherwise False if not jetting or failed. |
Used to see if a Player or Client is jetting. |
Player::lastJetTime(Player or Client) |
Player: The object
Id. Example: 8361. Client: The Client Id. Example: 2049. USED IN: Player.cs RETURN: Ticks. The Current number of ticks. These Ticks are incremented 1024 times per second until you exit Tribes. So shifting your value to the right 10 times will give you seconds. If failed then 0. |
Used to get what time the player jetted last. |
Player::blowUp(Player or Client) |
Player: The object
Id. Example: 8361. Client: The Client Id. Example: 2049. USED IN: Player.cs RETURN: True. |
Used to blowUp the Player or Client when he dies. Blowing up animation will only be played when the player dies. |
Player::getLastContactCount(Player or Client) |
Player: The object
Id. Example: 8361. Client: The Client Id. Example: 2049. USED IN: Player.cs RETURN: Number. Ticks the player was in the air. |
Used to find out the number of ticks the Player or Client has been in the air. |
Player::isCrouching(Player or Client) |
Player: The object
Id. Example: 8361. Client: The Client Id. Example: 2049. USED IN: Player.cs RETURN: True if Crouching, False if not Crouching, or -1 if failed. |
Used to see if the Player or Client is crouching. |
Player::isAiControlled(Player or Client) |
Player: The object
Id. Example: 8361. Client: The Client Id. Example: 2049. USED IN: Objectives.cs, Station.cs, Vehicle.cs RETURN: True if succeed or False if failed. |
Used to find out if a Player or Client is an AI. |
ListPlayers() |
USED IN: Console
screen command. RETURN: Displays it to the console screen. |
Will list all players name and Id currently on the server. |
String Sound Animation Functions |
Updated 04/15/99 |
sprintf(String,[Arg1,Arg2....Arg9]) |
String: Is a string
with %1,%2..%9 embedded through out it. Arg1: Will replace the %1. Arg2: Will replace the %2. USED IN: Game.cs RETURN: String. The desired string. If failed then False. |
Create a string for
example: String = "My %2 is %1.". Set Arg1 = "hurt" and Arg2 = "foot". outString = sprintf(String,Arg1,Arg2); outString will be equal to: "My foot is hurt." |
getWord(String, Num) |
String: Is a string
of words or numbers separated by spaces. Num: A number ranging from 0 to number of words in string minus 1. USED IN: Vehicle.cs, Staticshape.cs, Objectives.cs, ... RETURN: String. The extracted word. If failed then -1. |
The function is used
to extract certain words out of a string. For example: I want to extract the word foot from the following string. String = "My foot is hurt"; Num = 1; answer = getWord(String, Num); answer is equal to "foot". |
escapeString(String) |
String: Is a string
of text. USED IN: Comchat.cs, Server.cs RETURN: String. Formated to print properly. If failed then "". |
Takes a string that might have unprintable characters and convert them to printable characters. |
RemotePlayAnim(Client, Anim) |
Client: The Client
Id. Example: 2049. Anim: Animation to play. The animations are setup in the ArmorData.cs file. In the PlayerData block there is an array called animData. Those are the animations to be played for each armor type. Playable animations for this function is 38 through 50. If Anim is 0 then it will play animation 38 in the PlayerData block. USED IN: Client.cs RETURN: 0. |
Used to play an animation on a client. |
playVoice(ClientId, Wav) |
ClientId: The
player who is playing the voice. Wav: The voice sound to be played. The voice sounds are in the base\voice directory. The volume used depends on the voice set and the gender you selected when creating your player. For example female1.vol is used when voice set 1 is selected and the players gender is female. USED IN: Client.cs, Player.cs RETURN: True if succeed or False if failed. |
This will cause the
Client to play the desired voice sound. For example: You want to play the voice "Move out of the way". When creating your player you selected voice set 3 and your gender to be male. playVoice(MyClientId, "outway"); The player MyClientId is a male and the voice set is 3 so it will go to the volume marked male3.vol and extract the male3.woutway.wav file to be played. |
playSound(Sound, Position) |
Sound: The name of
the sound to play. Look in Nsound.cs for an example of setting up a SoundData block. Position: The position on the map that the sound will be played. USED IN: Item.cs, Moveable.cs, Player.cs, Vehicle.cs RETURN: True if succeed or False if failed. |
Will play a sound at a given location on the map. |
Object - File Functions |
Updated 04/14/99 |
isFile(FileName) |
FileName: The full
path name and file name. USED IN: GUI.cs, Menu.cs, Registervolume.cs RETURN: True if it does exist. False if failed or doesnt exist. |
Used to see if the FileName exists. |
which(Script) |
Script: Name of a
script file. Example: "Item.cs", "Game.cs". USED IN: Currently not used in any script files. RETURN: Path. The directory path that the Script is being ran from. |
Used to find out what directory the Script is currently being ran from. |
getBoxCenter(Object) |
Object: The object
Id. Example: 8361. USED IN: Player.cs, Staticshape.cs RETURN: String "X Y Z" coordinates. If failed then "0 0 0". |
Used to find the
center point of an object. For example: Object = 8489; (8489 is the Id of a turret) answer = getBoxCenter(Object); answer is equal to "100 230 50". Which is the X Y Z value of the center point of the Object. |
getObjectType(Object) |
Object: The object
Id. Example: 8361 USED IN: Player.cs, Item.cs, Mine.cs, Moveable.cs, Objectives.cs... RETURN: Type. Returns the name of the class the object was derived from. Example: Player or Flier.. etc. |
Is used to find the
type of the Object. For Example: Type = getObjectType(Object); Type is equal to "Player" because the Object Id passed in was created from the player class. |
getObjectByTargetIndex(ObjectIdx) |
ObjectIdx: Index
into a visible object array. USED IN: Player.cs RETURN: Object Id. The Id of the object at that index location. If failed then -1. |
Used to return the visible object at the index. All objects that are visible because of sensor or player LOS gets added to a visable object array. |
loadObject(Name, Object) |
Name: Name to be
assigned to the object. Object: The object and it full path name to be loaded. USED IN: Client.cs RETURN: Object Id of the new loaded object. If failed then 0. |
Used to load the Object and assign it the Name. |
storeObject(Object, Name) |
Object: The object
to be stored. Name: The full path name and file name to be store under. USED IN: GUI.cs RETURN: True if succeed or False if failed. |
Used to store the Object and all child objects that are associated with that object. |
deleteObject(Object) |
Object: The object
Id. Example: 8361. USED IN: Game.cs, Item.cs, Menu.cs, Station.cs, Server.cs, ... RETURN: True if succeed or False if failed. |
Used to delete the specified Object from the managers object list. |
isObject(Object) |
Object: The object
Id. Example: 8361. USED IN: Client.cs, Editor.cs, GUI.cs, Menu.cs, ... RETURN: True if it is a valid object. False if failed or not. |
Used to see if the Object Id passed in is a valid object. |
listObjects() |
USED IN: Most
common use is in the Console screen. RETURN: Objects. All objects in the mission. |
Used to list all the objects currently used in the mission. |
newObject(ObjName, Class, <ExtraArg>) |
Object: The name of
the object. Class: Type of object to create. ExtraArg: Some Classes require extra arguments. USED IN: Chatmenu.cs, Editor.cs, Game.cs, GUI.cs, Item.cs, ... RETURN: True if succeed or False if failed. |
Used to create an
object. Different types of class take different extra arguments. The list below is the
most common Classes used. Item: StaticBase: Flier: ChatMenu: |
Miscellaneous Functions |
Updated 04/09/99 |
schedule(Statement, Time, <Object>) |
Statement: Action
to perform. Could be a function call or a simple x=y statement. Time: In seconds. Object: If object is deleted then cancel the schedule. USED IN: Client.cs, Dm.cs, Game.cs, Item.cs, Moveable.cs, Server.cs, ... RETURN: Time. The time when the statement will get called. False if failed. |
Used to perform the Statement Time seconds in the future. |
remoteEval(Client, Function, <Arg>) |
Client: The Id of
the Client to run the function. Function: The function name. Arg: Any arguments that need to be passed to the function. USED IN: Admin.cs, Client.cs, Game.cs, GUI.cs, Menu.cs, Server.cs RETURN: True. |
Used to call a function on a specific client. The function must be defined like so: function remoteNextWeapon();. When you the function you will pass in only NextWeapon for the name not remoteNextWeapon. |
WaypointToWorld(Waypoint) |
Waypoint: Is an
(x,y) location on the map. USED IN: Ai.cs RETURN: World location. Example: "342 345 0". The Z is always 0. If failed then "0 0 0". |
Converts a waypoint location into a world location. World locations are given in the range (0-1023, 0-1023); |
RenderCanvas(Canvas) |
Canvas: The desired
canvas to render. Example: MainWindow USED IN: Client.cs, GUI.cs, Server.cs RETURN: 0 |
Used to force a redraw of the entire canvas. |
rebuildCommandMap() |
USED IN: Client.cs RETURN: True if succeed or False if failed |
Used to take a picture of the mission area for the command map and then retile the command map. |
Projectile::spawnProjectile(Object, Trans, ShootId, ShootVel, <TargetObj>) |
Object: The
projectile data block name to be spawned. Look in BaseProjData.cs for projectile names. Trans: The transform of the shooters weapon. ShootId: The Id of the shooter. Example: 8361. ShootVel: The velocity of the shooter. TargetObj: An object for the projectile lock-on and target. USED IN: Currently not used in any script files. RETURN: True if succeed or -1 if failed. |
Used to spawn a
projectile. For Example: Trans = GameBase::getMuzzleTransform(Player Id); ShootVel = Item::getVelocity(Player Id); Projectile::spawnProjectile("DiscShell", Trans, ShootId, ShootVel); |
GUI::isIn8BitMode() |
USED IN: Options.cs
RETURN: True if it is in 8 bit mode. False if not 8 bit or if it failed |
Used to check if windows is in 8 bit mode. |
GUI::issue8BitWarning() |
USED IN: Options.cs
RETURN: True. |
Used to send a
warning to the user that the game can't be run in 256 color mode. The warning message: "Your display is in 8-Bit (256 color) Mode. Tribes may not display correctly in Windowed mode unless the display resolution is changed to 16-bit (65536 color) mode or above. Fullscreen display will display properly however." |
GUI::issueInternetWarning() |
USED IN: Currently
not used in any script files. RETURN: True. |
Used to warn the
user of possible problems because an active internet connection could not be detected. The warning message: "Starsiege TRIBES requires an active internet connection to function properly. If you are not connected to your Internet Service Provider, you may experience pauses when Windows attempts to automatically connect your computer to the Internet." |
postAction(Object, Action, Value) |
Object: Object to
have the Action performed on. Action: The action. Value: Value of the Action. USED IN: EditMission.cs, Editor.cs RETURN: True if succeed or False if failed. |
Used to push an Action on to the stack. |
focus(Object) |
Object: Object that
will receive a message that it has gained focus. USED IN: EditMission.cs, Editor.cs, NewMission.cs RETURN: True if succeed or False if failed. |
Used to set that Object to receive all input from devices. Example of devices are mouse and keyboard. |
unfocus(Object) |
Object: Object that
will receive a message that it has lost focus. USED IN: EditMission.cs, Editor.cs RETURN: True if succeed or False if failed. |
Used to stop sending input data to the object and clear any remaining input information for that object. |
. | CALL BACK FUNCTIONS |
GameBase | DERIVED FROM: SimMovement |
onAdd(This) |
This: The object being added. |
When an object gets created and placed in the mission. Example: When you buy a flier or drop ammo those create an object and onAdd is then called. |
onInit(This) |
This: The object that is being initialized. |
EXPLAIN: When objects are being read in from the mission script. |
onRemove(This) |
This: The object that was removed. |
When an object is removed from the mission. |
onCollision(This, Object) |
This: The object
being hit. Object: The object doing the colliding. |
When a collision occurs with another object. |
Moveable | DERIVED FROM: StaticBase |
onFirst(This) |
This: The object on the first waypoint. |
When the object reaches the first waypoint in the waypoint list. |
onLast(This) |
This: The object on the last waypoint. |
When the object reaches the last waypoint in the waypoint list. |
onWaypoint(This) |
This: The object on the waypoint. |
When the object hits each waypoint in the waypoint list. |
onBlocker(This, Object) |
This: The object
being blocked. Object: The object doing the blocking. |
When an object is blocking the moveable object. |
onNewPath(This) |
This: The object. |
When the waypoint list gets created. |
Player | DERIVED FROM: ShapeBase |
onKilled(This) |
This: The player object that died |
When the player dies. |
onUse(Player, Item) |
Player: The Player
object using the Item. Item: The Item to be used. |
When a Player uses an Item. |
onDrop(Player, Item) |
Player: The Player
object dropping the Item. Item: The Item to be dropped |
When a Player drops an Item. |
onDeploy(Player, Item, Pos) |
Player: The Player
object deploying the Item. Item: The Item to be deployed. Pos: This position is invalid and should not be used. |
When a Player deploys an Item. |
onMount(Player, Item) |
Player: The Player
mounting the Item. Item: The Item being mounted. |
When a Player mounts an Item to one of it slots. |
onUnmount(Player, Item) |
Player: The Player
unMounting the Item. Item: The Item being unMounted. |
When a Player unMounts an Item from one of its slots. |
onNoAmmo(Player, ImageSlot, ItemType) |
Player: The Player
out of ammo. ImageSlot: The slot the out ammo weapon is located. ItemType: The Item Type that is out of ammo. Example: 13 |
When a Player runs out of ammo for the weapon currently being used. |
onActivate(This) |
This: The object that was activated. |
When an object becomes active. Example: A Player turns on a Sensor Jammer pack or Shield pack. |
onDeactivate(This) |
This: The object that was deactivated. |
When an object becomes deactivated. Example: A Player turns off a Sensor Jammer pack or Shield pack. |
onFire(This, Slot) |
This: The object
that fired the projectile. Slot: The slot that the weapon that fired was in. |
When a projectile is unknown it will allow the scripts to handle the firing of the projectile. Example: if the disc for the disc launcher is unknown then it will call the function DiscLauncherImage::onFire();. |
Shapebase | DERIVED FROM: GameBase |
onEndSequence(This, Thread) |
This: The object
that the sequence was run on. Thread: The thread the sequence was setup on. |
When a sequence is finished running on an object. |
StaticBase | DERIVED FROM: ShapeBase |
onActivate(This) |
This: The object that is now active. |
When an object becomes active. GameBase::setActive(obj, True) will set an object to be active. |
onDeactivate(This) |
This: The object that is now deactivated. |
When an object becomes inactive. GameBase::setActive(obj, False) will set an object to be inactive. |
onNone(This) |
This: The object whose state is unknown. |
When an object is not Enabled, Disabled, or Destroyed then its state is set to None. |
onEnabled(This) |
This: The object that is enabled. |
When the object's state has changed to Enabled. |
onDisabled(This) |
This: The object that is disabled. |
When the object's state has changed to Disabled. |
onDestroyed(This) |
This: The object that is destroyed. |
When the object's state has changed to Destroyed. |
onPower(This, State, Generator) |
This: The object
whose power state has changed. State: The new state of the power. Generator: The generator that caused the state change. |
When the object's power state has changed because the Generators state has changed to Enabled, Disabled, or Destroyed. |
Trigger | DERIVED FROM: GameBase |
onEnter(This, Object) |
This: The trigger
object. Object: The object that hit the trigger. |
When an object collides with a trigger. |
onContact(This, Object) |
This: The trigger
object. Object: The object that is contacting the trigger. |
When an object is standing on a trigger. Will get called every second until the object is no longer in contact with the trigger. |
onLeave(This, Object) |
This: The trigger
object. Object: The object that is no longer contacting the trigger. |
When an object is no longer in contact with the trigger. |
onActivate(This) |
This: The object that is now active. |
When an object becomes active. GameBase::setActive(obj, True) will set an object to be active. |
onDeactivate(This) |
This: The object that is now deactivated. |
When an object becomes inactive. GameBase::setActive(obj, False) will set an object to be inactive. |
Vehicle | DERIVED FROM: StaticBase |
onFire(This, Slot) |
This: The object
that fired the projectile. Slot: The slot that the weapon that fired was in. |
When a projectile is unknown it will allow the scripts to handle the firing of the projectile. Example: if the disc for the disc launcher is unknown then it will call the function DiscLauncherImage::onFire();. |
CLIENT FUNCTIONS |
. | Updated 04/01/99 |
Client::setDataFinished(Client) |
Client: The Client
Id. Example: 2049. USED IN: Server.cs RETURN: True if succeed and "" if failed. |
Used to tell the server that the Client has finished receiving all the data block information. That must be finished before ghosting can start. |
Client::limitCommandBandwidth(Client, Bool) |
Client: The Client
Id. Example: 2049 Bool: True if want to limit command band width or False if don't. USED IN: Observer.cs RETURN: True if succeed or False if failed. |
Used when a Player is in the command map. This is used to reduce the amount of data sent to the commander. The reason for the reduction is to increase other options like player camera follow. |
Client::setMenuScoreVis(Client, Bool) |
Client: The Client
Id. Example: 2049. Bool: True if want to show screen or False want to hide screen. USED IN: Menu.cs RETURN: 1 if succeed or 0 if failed. |
Used to display the score screen. The score screen is the screen accessed by pressing the TAB key. |
Client::getOwnedObject(Client) |
Client: The Client
Id. Example: 2049. Bool: True if want to show screen or False want to hide screen. USED IN: Admin.cs, Ai.cs, Item.cs, Player.cs, Station.cs, ... RETURN: Object Id. Example: 8361. If failed then -1. |
Used to get the Object Id from the Client Id. |
Client::getControlObject(Client) |
Client: The Client
Id. Example: 2049. Bool: True if want to show screen or False want to hide screen. USED IN: Observer.cs, Player.cs RETURN: Object Id. Example: 8361. If failed then -1. |
Used to find out what object the Client is currently controling. |
Client::setOwnedObject(Client, Object) |
Client: The Client
Id. Example: 2049. Object: The object Id. Example: 8361. USED IN: Game.cs, Observer.cs, Player.cs RETURN: True if succeed or False if failed. |
Sets the Clients owned object to the Object. |
Client::setControlObject(Client, Object) |
Client: The Client
Id. Example: 2049. Object: The object Id. Example: 8361.. USED IN: Vehicle.cs, Game.cs, Observer.cs, Player.cs, ... RETURN: True if succeed or False if failed. |
Sets what object the client is to control. Is used when controling a turret, camera, vehicle, etc.. |
Client::setSkin(Client,Skin) |
Client: The Client
Id. Example: 2049. Skin: Name of the skin to be set. Example:purple, blue. USED IN: Dm.cs, Game.cs RETURN: Client Id. Example: 2049. If failed then -1. |
It will look in the base\skins directory |
Client::getTransportAddress(Client) |
Client: The Client
Id. Example: 2049. USED IN: Admin.cs, Server.cs RETURN: IP address. Example: IP:198.74.33.77:1652. |
IP address. Example: IP:198.74.33.77:1652. |
Client::getFirst() |
USED IN: Admin.cs,
Comchat.cs, Game.cs, Server.cs, ... RETURN: Client Id. The first client in the client list. If failed then -1. |
Used to get the first client in the client list. Most commonly used with the Client::getNext() function. Those two functions will allow you to iterate through all the clients on the server. |
Client::getNext(Client) |
Client: The Client
Id. Example: 2049. USED IN: Admin.cs, Comchat.cs, Game.cs, Item.cs, Server.cs, ... RETURN: Client Id. The next client in the list. If failed or no more clients in the list then -1. |
Used to get the next client in the client list. It will us the Client Id passed in and return you the next client in the list. |
Client::setItemShopping(Client, <Type or Item, ...>) |
Client: The Client
Id. Example: 2049. Type: Each item has an associated integer called a Type. The Item associated with the ItemData block first encountered when loading will receive the integer 0. The next will receive integer 1 and so on. Look in Item.cs for examples of ItemData blocks like flag, ScoutVehicle, and Weapon. Item: The data block name of the item. Example: Chaingun USED IN: Station.cs RETURN: True if succeed or False if failed. |
Used to setup what Items are available to buy from a station. It keeps adding Items to the current shopping list for that Client. |
Client::clearItemShopping(Client, <Type or Item, ...>) |
Client: The Client
Id. Example: 2049. Type: Each item has an associated integer called a Type. The Item associated with the ItemData block first encountered when loading will receive the integer 0. The next will receive integer 1 and so on. Look in Item.cs for examples of ItemData blocks like flag, ScoutVehicle, and Weapon. Item: The data block name of the item. Example: Chaingun USED IN: Admin.cs, Game.cs, Observer.cs, Station.cs RETURN: True if succeed or False if failed. |
Clears the Clients shopping list. Shopping list is created by calling the Client::setItemShopping() function. |
Client::isItemShoppingOn(Client, Type or Item) |
Client: The Client
Id. Example: 2049. Type: Each item has an associated integer called a Type. The Item associated with the ItemData block first encountered when loading will receive the integer 0. The next will receive integer 1 and so on. Look in Item.cs for examples of ItemData blocks like flag, ScoutVehicle, and Weapon. Item: The data block name of the item. Example: Chaingun USED IN: Admin.cs, Game.cs, Observer.cs, Station.cs RETURN: True if succeed or False if failed. |
Clears the Clients shopping list. Shopping list is created by calling the Client::setItemShopping() function. |
Client::setItemBuying(Client, <Type or Item, ...>) |
Client: The Client
Id. Example: 2049. Type: Each item has an associated integer called a Type. The Item associated with the ItemData block first encountered when loading will receive the integer 0. The next will receive integer 1 and so on. Look in Item.cs for examples of ItemData blocks like flag, ScoutVehicle, and Weapon. Item: The data block name of the item. Example: Chaingun USED IN: Station.cs RETURN: True if succeed or False if failed. |
Used to add items to the Buying list. The items on the shopping list that are not on the buy list will show up grayed out. |
Client::clearItemBuying(Client, <Type or Item, ...>) |
Client: The Client
Id. Example: 2049. Type: Each item has an associated integer called a Type. The Item associated with the ItemData block first encountered when loading will receive the integer 0. The next will receive integer 1 and so on. Look in Item.cs for examples of ItemData blocks like flag, ScoutVehicle, and Weapon. Item: The data block name of the item. Example: Chaingun USED IN: Station.cs RETURN: True if succeed or False if failed. |
Clears the Clients buying list. Buying list is created by calling the Client::setItemBuying() function. You also can remove specific items from the list by passing in a Type or Item. |
Client::isItemBuyingOn(Client, Type or Item) |
Client: The Client
Id. Example: 2049. Type: Each item has an associated integer called a Type. The Item associated with the ItemData block first encountered when loading will receive the integer 0. The next will receive integer 1 and so on. Look in Item.cs for examples of ItemData blocks like flag, ScoutVehicle, and Weapon. USED IN: Currently not used in any script files. RETURN: True if on the list or False if not on the list. |
Used to see if the desired Item is on the Clients buying list. |
Client::setInitialTeam(Client, TeamNum) |
Client: The Client
Id. Example: 2049. TeamNum: Team number. Each team is associated with a number range from -1 to 7. Where -1 is the observer team. USED IN: Currently not used in any script files. RETURN: True if succeed or False if failed. |
Used to assign the Client(player) to the TeamNum(Team). |
Client::getName(Client) |
Client: The Client
Id. Example: 2049. USED IN: Admin.cs, Client.cs, Game.cs, Dm.cs, Objectives.cs, ... RETURN: String. Then name of the client. Example: "Sne/|keR". If failed then "" is returned. |
Used to get the name of the client. |
Client::getTeam(Client) |
Client: The Client
Id. Example: 2049. USED IN: Admin.cs, Ai.cs, Comchat.cs, Dm.cs, Game.cs, Item.cs, ... RETURN: Number. The team the client is assigned to. If failed then -1. |
Used to find what team the client is a member of. |
Client::sendMessage(Client,StrType,String) |
Client: The Client
Id. Example: 2049. StrType: There are 5 different message types 0, 1, 2, 3, and 4. 0: Is used for all System messages. 1: Is used for all Game messages. 2: Is used for all Chat messages. 3: Is used for all Team Chat messages. 4: Is used for all Command messages. String: The message to be sent. USED IN: Admin.cs, Ai.cs, Item.cs, Objective.cs, Player.cs, ... RETURN: True if succeed or False if failed. |
Used to send a message to a specific client. The messages show up in the message dialog box on the hud. |
Client::sendMessage(Client,StrType,String) |
Client: The Client
Id. Example: 2049. ScoreString: The string that will be displayed. SortValue: The value ScoreStrings will be sorted by. USED IN: Dm.cs, Objectives.cs RETURN: True if succeed or False if failed. |
Used to set the
clients score value on the TAB screen. I'll explain this function call below: Client::setScore(%cl, "%t\t " @ %cl.Score @ "\t%p\t%l", %cl.Score); %cl is the Client Id. The "%t\t ": %t will print the clients name and the \t will tab over to the next column (which is defined in the setClientScoreHeading function call). The %cl.Score is the Clients score. The "\t%p\t%l": \t will tab over to the next column. %p will display the Clients ping. \t will tab over to the next column. %l will display the Clients packet loss. The last argument %cl.Score will sort the list by the Score. Sorts high to low. |
setClientScoreHeading(HString) |
HString: The
heading for the client scores on the tab screen. USED IN: Dm.cs, Objectives.cs RETURN: True if succeed or False if failed. |
Sets the heading for
the client score section of the tab screen. For Example: setTeamScoreHeading("Player Name\t\x6FTeam\t\xA6Score \t\xCFPing\t\xEFPL"); It will print Player Name and then move 6Fhex units to the right and print Team. After Team it will move over to the A6hex unit and display Score. Ping and PL will be displayed in the same manner. The 6F, A6, CF, FF are all hex values from 0 to FF. |
setClientScoreHeading(HString) |
HString: The
heading for the client scores on the tab screen. USED IN: Dm.cs, Objectives.cs RETURN: True if succeed or False if failed. |
Sets the heading for
the client score section of the tab screen. For Example: setTeamScoreHeading("Player Name\t\x6FTeam\t\xA6Score \t\xCFPing\t\xEFPL"); It will print Player Name and then move 6Fhex units to the right and print Team. After Team it will move over to the A6hex unit and display Score. Ping and PL will be displayed in the same manner. The 6F, A6, CF, FF are all hex values from 0 to FF. |
Client::setGuiMode(Client, GUIMode) |
Client: The Client
Id. Example: 2049. GUIMode: There are 6 predefined Modes. 1: $GuiModePlay = 1. Regular play mode. 2: $GuiModeCommand = 2. Command Screen. 3: $GuiModeVictory = 3. Objective Screen. 4: $GuiModeInventory = 4. Inventory Screen. 5: $GuiModeObjectives = 5. Objective Screen. 6: $GuiModeLobby = 6. Modify hud mode. USED IN: Admin.cs, Game.cs, Player.cs, Server.cs, Station.cs, ... RETURN: True if succeed or False if failed. USED IN: Dm.cs, Objectives.cs |
Used to set the GUI in its different mode/screens. To set the GUI in command map mode you would call the function and pass in $GuiModeCommand for the GuiMode argument. |
Client::getGuiMode(Client) |
Client: The Client
Id. Example: 2049. GUIMode: There are 6 predefined Modes. USED IN: Admin.cs, Game.cs, Observer.cs, Station.cs RETURN: GUIMode. GUIMode will be a value between 1 and 6. If failed then -1. |
Used to get what GUIMode the client is currently in. If the Client is in the Command map screen then 2 will be returned. |
Client::ExitLobbyMode() |
USED IN: GUI.cs RETURN: True. |
Used to bring you back to the game after pressing the ESC key. Pressing the ESC key will bring you to a screen with the following options Disconnect, Return To Game, Options, Play, and IRC/Chat. |
Client::getVoiceBase(Client) |
Client: The Client
Id. Example: 2049. USED IN: Ai.cs RETURN: String. The voice base. Example: Male1, Male2, Female1, ... If failed then "". |
String. The voice base. Example: Male1, Male2, Female1, ... If failed then "". |
Client::getSkinBase(Client) |
Client: The Client
Id. Example: 2049. USED IN: Currently not used in any script files. RETURN: String. Name of the skin. Current names: beagle, dsword, cphoenix, swolf, and base. |
Used to get the what skin the Client(player) is currently wearing. |
Client::getGender(Client) |
Client: The Client
Id. Example: 2049. USED IN: Game.cs, Item.cs RETURN: String. "Male" or "Female". If failed then "". |
Used to get the Clients gender. |
Client::centerPrint(String, Position) |
String: Message to
be displayed. Position: There are 3 predefined positions. 0: Displays the String in the center of the screen. 1: Displays the String on the bottom of the screen. 2: Displays the String on the top of the screen. USED IN: Admin.cs, Client.cs, Game.cs, Server.cs RETURN: True if succeed or False if failed. |
Will display the String at the specified Position. To remove the the centerPrint simply pass in a blank string Example: "". |
Client::getMouseSensitivity(ActionMap) |
ActionMap: Is
dependent on what mode the player is in. Different key inputs are definded for diffent
modes. Example: Playing the game will use playMap.sae as its ActionMap. For this function
actionMap should equal "playMap.sae". USED IN: Options.cs RETURN: Float. Value between 0 and 100. |
Used to find what sensitivity your mouse is set at. |
Client::getMouseXAxisFlip(ActionMap) |
ActionMap: Is
dependent on what mode the player is in. Different key inputs are definded for diffent
modes. Example: Playing the game will use playMap.sae as its ActionMap. For this function
actionMap should equal "playMap.sae". USED IN: Options.cs RETURN: True if succeed or False if failed. |
Used to reverse the mouse X axis. |
Client::getMouseYAxisFlip(ActionMap) |
ActionMap: Is
dependent on what mode the player is in. Different key inputs are definded for diffent
modes. Example: Playing the game will use playMap.sae as its ActionMap. For this function
actionMap should equal "playMap.sae". USED IN: Options.cs RETURN: True if succeed or False if failed. |
Used to reverse the mouse Y axis. |
getClientByName(Name) |
Name: The name of
the player. Example: Sne/|keR. USED IN: Client.cs RETURN: Client Id. The clients Id number. Example: 2049 |
Used to find what the players Client Id is by using the players name. |
CLIENT ONLY FUNCTIONS |
Updated 04/05/99 |
useItem(Type) |
Type: Each item has
an associated integer called a Type. The Item associated with the ItemData block first
encountered when loading will receive the integer 0. The next will receive integer 1 and
so on. Look in Item.cs for examples of ItemData blocks like flag, ScoutVehicle, and
Weapon. USED IN: Client.cs RETURN: True if succeed. False if failed. |
Used to allow the Player to utilized the Item. Example if you want to use a chaingun then you would call useItem(13);. |
getItemType(Item) |
Item: The data
block name of the item. Example: Chaingun USED IN: Client.cs RETURN: Type. All items are associated with a integer called a Type. The Item associated with the ItemData block first encountere when loading will receive the integer 0. The next will receive integer 1 and so on. Look in Item.cs for examples of ItemData blocks like flag, ScoutVehicle, and Weapon. If failed then False. |
All Items are associated with an integer. In some cases you will need to use that integer to reference the Item not the Items data block name. To find the Type(integer) associated with the Item use this function. |
getItemCount(Item) |
Item: The desired
item to count. Example: chaingun. USED IN: Currently not used in any script files. RETURN: Number. The total number of that item the player has. If failed then 0. |
Count the number of Items the player currently has in his personal inventory. |
getMountedItem(MountPoint) |
MountPoint: There
are three mount points. Mount point 0 is the $WeaponSlot, 1 is the $BackpackSlot, and 2 is
the $FlagSlot. USED IN: Currently not used in any script files. RETURN: Item. The item at that mount point. Example: chaingun. If -1 is returned then there is nothing mounted at that MountPoint. If failed then -1. |
Used to find what items are mounted at the desired MountPoint. |
getManagerId() |
USED IN: Client.cs RETURN: Player Id. |
Is used to find the player Id from the client Id. |
COMMAND FUNCTIONS |
Updated 04/05/99 |
addCMCommand(Object, MenuStr, Command,<Arg>) |
Object: The menu
object. MenuStr: Text to be added to the menu. The first letter of this text string determines what key to press to activate this command. Command: Function to call for example "say". <Arg>: Any agruments that need to be passed the the Command. USED IN: Chatmenu.cs, Menu.cs RETURN: 0. |
Used to add commands to the menu Object. |
IssueCommand(Commander, Player, Icon, Msg, MapX, MapY) |
Commander: The
Client Id of the commander. Player: The Client Id of the player receiving the command. Icon: Waypoint Icon to be displayed on the map. 0: No waypoint Icon will be displayed. 1: Attack Icon will be displayed. 2: (Defend, Repair, Deploy) Icon will be displayed. Msg: Message to be displayed. MapX: The X value of the Waypoint location. In Map coordinates where the center of map is at location (0,0). MapY: The Y value of the Waypoint location. In Map coordinates where the center of map is at location (0,0). USED IN: Comchat.cs, Objectives.cs RETURN: 0. |
Used to issue a
command to player which gives them a waypoint at the location (MapX,MapY) on the map.
IssueCommand will convert the Map coordinates to World coordinates. |
IssueCommandI(Commander, Player, Icon, Msg, WorldX, WorldY) |
Commander: The
Client Id of the commander. Player: The Client Id of the player receiving the command. Icon: Waypoint Icon to be displayed on the map. 0: No waypoint Icon will be displayed. 1: Attack Icon will be displayed. 2: (Defend, Repair, Deploy) Icon will be displayed. Msg: Message to be displayed. WorldX: The X value of the Waypoint location. In World coordinates where the X value is in the range 0-1023. WorldY: The Y value of the Waypoint location. In World coordinates where the Y value is in the range 0-1023. USED IN: Comchat.cs RETURN: 0. |
Used to issue a command to player which gives them a waypoint at the location (WorldX,WorldY) on the map. |
IssueTargCommand(Commander, Player, Icon, Msg, Target) |
Commander: The
Client Id of the commander. Player: The Client Id of the player reciveing the command. Icon: Waypoint Icon to be displayed on the map. Msg: Message to be displayed. Target: Is the object to perform the specified action on. USED IN: Comchat.cs RETURN: 0. |
Used to give a Player a command to do an action on the Target. It will use the Targets coordinates to set the Players waypoint. |
SetCommandStatus(Client, Status, Message) |
Client: The Client
Id. Example: 2049. Status: Current status of the command. 0: Set to 0 if failed, declined, or completed. 1: Set to 1 if acknowledged. Message: Command Message. USED IN: Comchat.cs, Objectives.cs RETURN: True if status changed or False if no change or failed. |
Used to set the status for the given command. If no status was changed then it will return False. |
Gamebase Functions |
Updated 04/01/99 |
GameBase::playSound(Object, Sound, Channel) |
Object: The object
Id. Example: 8361. Sound: The name of the sound to play. Look in Nsound.cs for an example of setting up a SoundData block. Channel: The channel to play the sound on. The number of avaiable channels for one Object is four the range is 0 through 3. USED IN: Moveable.cs RETURN: True if succeed or False if failed. |
Used to play the Sound at the location that the Object is currently at. |
GameBase::generatePower(Object, Bool) |
Object: The object
Id. Example: 8361. Bool: True then Object is generating power. False then Object has stoped generating power. USED IN: Staticshape.cs RETURN: True if succeed or False if failed. |
Used to set the generator status either working or not. This is used to inform all objects that depend on that generator for power. |
GameBase::isPowerGenerator(Object) |
Object: The object
Id. Example: 8361. USED IN: Currently not used in any script files. RETURN: True if it is a Generator, False if not, or False if failed. |
Used to see if the Object is a generator. |
GameBase::getPowerCount(Object) |
Object: The object
Id. Example: 8361. USED IN: Currently not used in any script files. RETURN: Number. The number of generators power count. If failed then 0. |
Used to get the number of generators powering the Object. If two generators are powering an object and one gets destroyed then the function would return one. |
GameBase::isPowered(Object) |
Object: The object
Id. Example: 8361. USED IN: Moveable.cs, Sensor.cs, Station.cs, Turret.cs, ... RETURN: True if the object has a working power source or False on all other accounts. |
Used to check if the Object currently has a functioning power source. |
GameBase::getTeam(Object or Client) |
Object: The object
Id. Example: 8361. Client: The Client Id. Example: 2049. USED IN: Admin.cs, Ai.cs, Game.cs, Item.cs, Objectives.cs, ... RETURN: Team number in the range 0-7. If failed then -1. |
Used to get what team the Object or Client is currently assigned to. |
GameBase::setTeam(Object or Client, TeamNum) |
Object: The object
Id. Example: 8361. Client: The Client Id. Example: 2049. TeamNum: Team number. Each team is associated with a number range from -1 to 7. Where -1 is the observer team. USED IN: Ai.cs, Game.cs, Item.cs, Observer.cs, Server.cs, ... RETURN: True if succeed or -1 if failed. |
Used to assign an Object or Client to a particular team defined by the TeamNum value. |
GameBase::getPosition(Object or Client) |
Object: The object
Id. Example: 8361. Client: The Client Id. Example: 2049. USED IN: Ai.cs, Game.cs, Item.cs, Objectives.cs, Player.cs, ... RETURN: If succeed "X Y Z" position of the Object or Client. Example: "351 -234 33". If failed then "0 0 0". |
Used to find the current (X Y Z) position of the Object or Client. The X and Y positions are found from the center of the map at 0,0. The Z is the height of the Object or Client. |
GameBase::getRotation(Object or Client) |
Object: The object
Id. Example: 8361. Client: The Client Id. Example: 2049. USED IN: Ai.cs, Game.cs, Item.cs, Station.cs, Vehicle.cs RETURN: If succeed "X Y Z" rotation of the Object or Client. Example: "0 0 1.45". If failed then "0 0 0". |
Used to find the current (X Y Z) rotation of the Object or Client. X value is the rotation around the X axis, Y value is the rotation around the Y axis, and Z is the rotation around the Z axis. In most cases X and Y will be 0 and Z will be between 3.14 and -3.14. X and Y will be none zero if for example you are in a flyer making a turn or flying up or down. |
GameBase::setPosition(Object or Client, Position) |
Object: The object
Id. Example: 8361. Client: The Client Id. Example: 2049. Position: The "X Y Z" value used to set the position on the map. For Example: Position = "100 -200 40" This will move the Object or Client 100 in the positive X direction(EAST), -200 in the negative Y direction (SOUTH), and 40 in the positive Z direction(UP). The new position is offset from the "0 0 0" location on the map. USED IN: Item.cs, Objectives.cs, Station.cs, Player.cs, Vehicle.cs RETURN: True if succeed or False if failed. |
Used to set the Object or Client to the location specified by the Position argument. |
GameBase::setRotation(Object or Client, Rotation) |
Object: The object
Id. Example: 8361. Client: The Client Id. Example: 2049. Rotation: The "X Y Z" value used to set the position on the map. For Example: Position = "1.3 -3.0 0" This will rotate the Object or Client 1.3 in the positive X direction, -3.0 in the negative Y direction, and 0 in the positive Z direction. USED IN: Item.cs, Station.cs, Vehicle.cs RETURN: True if succeed or False if failed. |
Used to set the Object or Client to the rotation specified by the Rotation argument. |
GameBase::getTransform(Object or Client) |
Object: The object
Id. Example: 8361. Client: The Client Id. Example: 2049. USED IN: Currently not used in any script files. RETURN: Transform. Combining the Position and Rotation is called the Transform. Example:"234 -122 43 0 0 2.3". The Position is equal to "234 -122 43". The Rotation is equal to "0 0 2.3". If failed then "0 0 0 0 0 0". |
Used to get the Position and Rotation of an Object or Client. The position and rotation will be combined together in with the position before the rotation. |
GameBase::getDataName(Object) |
Object: The object
Id. Example: 8361. USED IN: BaseProjData.cs, Item.cs, Mine.cs, Moveable.cs, Player.cs, ... RETURN: Data block name. Example: "Chaingun". If failed then "". |
Used to get the data block name of the object. Look in the file Item.cs for the name ItemData. This is defining an item data block. Examples of Data Names are: Flag or Chaingun. Look in Station.cs file for the name StaticShapeData. This is defining a Static Shape data block. Examples of Data Names are: DeployableAmmoStation or DeployableIncStation. |
GameBase::isAtRest(Object) |
Object: The object
Id. Example: 8361. USED IN: Mine.cs RETURN: True if it is at rest or False if still moving. |
Used to see if an object is still moving. |
GameBase::testPosition(Object, Position) |
Object: The object
Id. Example: 8361. Position: The "X Y Z" value used to set the position on the map. For Example: Position = "100 -200 40" This will move the Object or Client 100 in the positive X direction(EAST), -200 in the negative Y direction (SOUTH), and 40 in the positive Z direction(UP). The new position is offset from the "0 0 0" location on the map. USED IN: Vehicle.cs RETURN: True if the Object can move to the Position. False if a collision occurs with another object |
Used to see if the Object can move to the desired Position. |
ShapeBase object functions. Called GameBase:: to simply out public script interface a little. Functions should behave gracefully if object is not derived from ShapeBase |
GameBase::setSequenceDirection(Object, Thread, Forward) |
Object: The object
Id. Example: 8361. Thread: Each object can be assigned up to 4 sequences to be played 0-3. Forward: If a non zero value is passed in then the sequence will go forward. If zero then it will go backwards. USED IN: Station.cs RETURN: True if succeed or False if failed. |
Used to set the direction of the animation to be played by the object. |
GameBase::playSequence(Object, Thread, <Sequence>) |
Object: The object
Id. Example: 8361. Thread: Each object can be assigned up to 4 sequences to be played 0-3. Sequence: The Objects animation to be played. If the Sequence argument is passed in then that Sequence will be assigned to that Thread. USED IN: Mine.cs, Sensor.cs, Staticshape.cs, Station.cs, Turret.cs RETURN: True if succeed or False if failed. |
Used to start playing a sequence. If no Sequence argument is passed in then it will play the Sequence that Thread is defined to. |
GameBase::pauseSequence(Object, Thread) |
Object: The object
Id. Example: 8361. Thread: Each object can be assigned up to 4 sequences to be played 0-3. USED IN: Sensor.cs, Station.cs RETURN: True if succeed or False if failed. |
Used to pause the sequence that defined by the thread. |
GameBase::setRechargeRate(Object, Rate) |
Object: The object
Id. Example: 8361. Rate: Amount to increase energy every second. USED IN: Player.cs, Sensor.cs, Turret.cs, Vehicle.cs RETURN: True if succeed or False if failed. |
Used to set the Rate at which the Objects energy will recharge every second. |
GameBase::getRechargeRate(Object) |
Object: The object
Id. Example: 8361. USED IN: Currently not used in any script files. RETURN: Rate. The value at which the Objects energy recharges at. If failed then "0". |
Used to get the current rate at which the Objects energy recharges at. |
GameBase::setAutoRepairRate(Object, Rate) |
Object: The object
Id. Example: 8361. Rate: Amount to increase health every second. USED IN: BaseProjData.cs RETURN: True if succeed or False if failed. |
Used to set the Rate at which the Objects health will increase every second. |
GameBase::getAutoRepairRate(Object) |
Object: The object
Id. Example: 8361. USED IN: BaseProjData.cs RETURN: Rate. The value at which the Objects energy recharges at. If failed then "0". |
Used to get the rate that the Object is getting repaired at. |
GameBase::repairDamage(Object, Rate) |
Object: The object
Id. Example: 8361. Rate: Amount to increase health every second. USED IN: Item.cs, Station.cs RETURN: True if succeed or False if failed. |
Used to set the Rate at which the Objects health will increase every second. |
GameBase::throw(Item, Object, Vel, Random) |
Item: The data
block name of the item. Example: Chaingun Object: The object Id. Example: 8361. Vel: Velocity the Item will be thrown at. Random: If True then it will be thrown in a random direction. If False then it will be thrown in the direction the object is facing. USED IN: Item.cs, Objectives.cs RETURN: True if succeed or False if failed. |
Used to throw an object. Example: When you die your pack and weapon is thrown random directions. |
GameBase::setEnergy(Object, Value) |
Object: The object
Id. Example: 8361. Value: The amount of energy to set. USED IN: BaseProjData.cs, Player.cs, Staticshape.cs RETURN: True if succeed or False if failed. |
Set the Objects energy level. Example: When they have a shield on and get hit then the damage value is subtracted from the Objects energy. |
GameBase::getEnergy(Object) |
Object: The object
Id. Example: 8361. USED IN: BaseProjData.cs, Player.cs, Staticshape.cs RETURN: Value. The current energy level of the Object. If failed then "0". |
Used to get the current energy level of the Object. |
GameBase::getDamageLevel(Object) |
Object: The object
Id. Example: 8361. USED IN: BaseProjData.cs, Dm.cs, Item.cs, Mine.cs, ... RETURN: Value. The current health level of the Object. If failed then "0". |
Used to get the Objects current health amount. |
GameBase::setDamageLevel(Object, Value) |
Object: The object
Id. Example: 8361. Value: The amount of health left. USED IN: Dm.cs, Mine.cs, Moveable.cs, Player.cs, Staticshape.cs RETURN: True if succeed or False if failed. |
Used to set the health level of an object. |
GameBase::getDamageState(Object) |
Object: The object
Id. Example: 8361. USED IN: Player.cs, Station.cs RETURN: State. There are three predefined states: Enabled: If Object is fully functional. Disabled: If Object is damaged so it cant function. Destroyed: If Object is destroyed. If failed then "0". |
Used to find what state the Object is in. |
GameBase::applyDamage(Object, Type, Value, Pos, Vec, Mom, SourceObj |
Object: The object
Id of the object getting damaged. Example: 8361. Type: Type of damage: $ImpactDamageType = -1; $LandingDamageType = 0; $BulletDamageType = 1; $EnergyDamageType = 2; $PlasmaDamageType = 3; $ExplosionDamageType = 4; $ShrapnelDamageType = 5; $LaserDamageType = 6; $MortarDamageType = 7; $BlasterDamageType = 8; $ElectricityDamageType = 9; $CrushDamageType = 10; $DebrisDamageType = 11; $MissileDamageType = 12; $MineDamageType = 13; Value: Damage value. Pos: The position where the projectile hit the Object. Vec: The projectiles vector. Mom: Momentum of the projectile. SourceObj: What object is applying the damage or shot the projectile. USED IN: BaseProjData.cs, Moveable.cs RETURN: True if succeed or False if failed. |
Used to apply damage to an Object. Example of use: getting hit by a projectile, a flier hitting an object, ect. |
GameBase::activateShield(Object, Vector, <OffSetZ>) |
Object: The object
Id. Example: 8361. Vector: A vector from the center of the object to the location where the projectile hit the shield. OffsetZ: Allows you to adjust the height of the shield if needed. USED IN: Player.cs, Staticshape.cs RETURN: True if succeed or False if failed. |
Used to display the shield effect on shielded objects |
GameBase::getLOSInfo(Object,Dist,<Rot>) |
Object: The object
Id. Example: 8361. Dist: The max distance this function will look for an object. In meters. Rot: Rotation argument optional. If no rotation is passed in then it will use the objects current line of site. Look in Station.cs for an example of the rotation. Example: "0 0 3.14" this will do the LOS directly behind the Object. USED IN: Ai.cs, Item.cs, Station.cs RETURN: True if succeed or False if failed. |
Does a line of site
projection Dist meters away and returns what object was found. It sets the following
global variables: $los::position: Position the LOS hit the object "X Y Z". $los::normal: LOS vector Normalized. $los::object: The Id of the object that was hit by the LOS |
GameBase::setMapName(Object, Name) |
Object: The object
Id. Example: 8361. Name: The Objects name to be displayed on the command map. USED IN: Item.cs, Station.cs, Turret.cs, Vehicle.cs RETURN: True if succeed or False if failed. |
Used to give Objects a name that will appear on the command map. Also gives a name when LOS is used |
GameBase::getMapName(Object) |
Object: The object
Id. Example: 8361. USED IN: BaseProjData.cs, Station.cs, Turret.cs RETURN: Name. The name used on the command map. If failed then "". |
Used to get the Objects map name. The object map name is the name that is displayed on the command map. |
GameBase::virtual(Object, Function, <Arg1, Arg2, ...>) |
Object: The object
Id. Example: 8361. Function: The name of the function to be called. Arg1: Arguments that need to be passed to the Function. USED IN: BaseProjData.cs, Objectives.cs, Trigger.cs, Turret.cs RETURN: What value Function returns. If failed then "". |
Used to call the Function on the Object . Example: If the object is the Blood Eagle flag that you where carrying. You step out of the mission area and the GameBase::virtual(%obj," playerLeaveMissionArea",%player); is called. %obj is the Blood Eagle flag so Flag::playerLeaveMissionArea is called. |
GameBase::setActive(Object, Bool) |
Object: The object
Id. Example: 8361. Bool: True if Object is active. False if Object is not active. USED IN: Mine.cs, Moveable.cs, Sensor.cs, Staticsshape.cs, ... RETURN: True if succeed or False if failed. |
Used to set if the Object is active or not. Used along with the GameBase::isActive() function. |
GameBase::isActive(Object) |
Object: The object
Id. Example: 8361. USED IN: Mine.cs, Moveable.cs, Station.cs RETURN: True if active or False if not active. |
Used to see if the Object is active. |
GameBase::getMuzzleTransform(Player or Client) |
Player: The object
Id. Example: 8361. Client: The Client Id. Example: 2049. USED IN: Currently not used in any script files. RETURN: Transform of the Players weapon. If failed then "1 0 0 0 1 0 0 0 1 0 0 0". |
Used to get the Transform of the Players weapon. The transform returned is base on world coordinates. |
GameBase::startFadeOut(Object) |
Object: The object
Id. Example: 8361. USED IN: Item.cs, Station.cs, Objectives.cs, Player.cs, ... RETURN: True if succeed or False if failed. |
This will fade out the object. Example: When a player dies after X amount of time the player will slowly fade away. It takes 2.5 seconds to fade out an object. Keep in mind that even though you have faded out the object it is still there until you delete it. |
GameBase::startFadeIn(Object) |
Object: The object
Id. Example: 8361. USED IN: Item.cs, Objectives.cs, Station.cs, Staticshape.cs, ... RETURN: True if succeed or False if failed. |
This will fade in the Object. Example: When a flag gets returned back to a base it fades in. |
GameBase::applyRadiusDamage(Type, Center, Radius, DValue, Force, Object) |
Type: Type of
damage: $ImpactDamageType = -1; $LandingDamageType = 0; $BulletDamageType = 1; $EnergyDamageType = 2; $PlasmaDamageType = 3; $ExplosionDamageType = 4; $ShrapnelDamageType = 5; $LaserDamageType = 6; $MortarDamageType = 7; $BlasterDamageType = 8; $ElectricityDamageType = 9; $CrushDamageType = 10; $DebrisDamageType = 11; $MissileDamageType = 12; $MineDamageType = 13; Center: The center of the Object that is causing the Radius Damage. Radius: The radius is a predefined value that was set when the object was created. Use GameBase::getRadius() to find object radius. DValue: The damage value to apply. Force: The max force to apply to surrounding objects. Object: The Id of the object causing the Radius Damage. Example: 8361. USED IN: Staticshape.cs RETURN: True if succeed or False if failed. |
Used to apply damage to Objects when an Objects explodes. If an object was at the center of the explosion then that object would be damaged by a value of DValue and a force would be applied to it defined by Force. The further away from the center of the explosion the less DValue and Force will be applied the those objects. |
GameBase::getRadius(Object) |
Object: The object
Id. Example: 8361. USED IN: Staticshape.cs RETURN: Float. The radius of the Object. If failed then "False" |
Used to get the radius of the Object. The radius is a predefined value that was set when the object was created. |
GameBase::getDisabledDamage(Object) |
Object: The object
Id. Example: 8361. USED IN: Staticshape.cs RETURN: Float. The disable level. |
Used to get the level at which the Object becomes disabled |
StaticBase object functions, called GameBase:: |
GameBase::setIsTarget(Object, Bool) |
Object: The object
Id. Example: 8361. Bool: True then set it up to be a target. False no target info. USED IN: Beacon.cs RETURN: True if succeed or False if failed. |
Used to set the Object up with target information. The beacon is an example of target information. It has the Triangle and meters away information. |
GameBase::getOwnerClient(Object) |
Object: The object
Id. Example: 8361. USED IN: Player.cs RETURN: Client Id. Example: 2049. If failed then -1. |
Used to get the Client Id from the Object Id. |
GameBase::getControlClient(Object) |
Object: The object
Id. Example: 8361. USED IN: Turret.cs, Player.cs, Station.cs, Vehicle.cs, ... RETURN: Client Id. Example: 2049. If failed then -1. |
Used to get the Client Id from the Object Id. |
Group and Set Functions |
Updated 04/09/99 |
containerBoxFillSet(Set, Mask, Position, Length, Width, Height, SHeight) |
Set: Block of room
setup to hold objects. Mask: Defines what object or objects to search for. Mask Values: $SimTerrainObjectType, $SimInteriorObjectType, $SimPlayerObjectType, $MineObjectType, $MoveableObjectType, $VehicleObjectType, $StaticObjectType, $ItemObjectType Position: Center position of the area to search. Length: Length of the area to search. Width: Width of the area to search. Height: Height of the area to search. Sheight: Allows the height area to start at the Positions Z value and go up a distance of SHeight.. USED IN: Game.cs, Item.cs, Mine.cs, Objectives.cs, and Station.cs RETURN: Number. Number of Objects added to the Set. If failed then "False". |
Creates a box of
size Length, Width, and Height around the point specified by Position. Position is now the
center of our box. It will then search all objects with in that box area and with the
given type(s) specified by Mask and store them in the Set. Set now holds all the objects
that you where looking for. Use functions like Group::getObject to iterate through the
Set. Make sure you delete the Set when you are finished. For example: We want a box of size L=100, W=100, H=100 with the center of the box being at location P=(30,50,60). Set = newObject("set",SimSet); Pos = "30 50 60"; Mask = $VehicleObjectType | $MineObjectType; num =containerBoxFillSet(Set, Mask, Pos, 100, 100, 100,0); Set now holds all vehicles and mines found in that area. Finished with set so.. deleteObject(Set); |
Group::iterateRecursive(Group or Set, Function, [Arg1, ...]) |
Group or Set: Block
of space setup to hold objects. Function: The function to be performed on all the objects in the Group or Set. Arg1: Arguments that need to be passed to the Function. If Function takes no arguments then only pass Group or Set and Function. USED IN: Objective.cs RETURN: 0. |
Used to perform the Function on all objects in the Group or Set. |
Group::objectCount(Group or Set) |
Group or Set: Block
of room setup to hold objects. USED IN: AI.cs, Game.cs, Objectives.cs, Station.cs, ... RETURN: Number. Objects in the Group or Set. If failed then 0. |
Used to count the number of objects in a Group or Set. |
Group::getObject(Group or Set, Index) |
Group or Set: Block
of room setup to hold objects. Index: The object to be extracted from the Group or Set. USED IN: AI.cs, Game.cs, Item.cs, Objectives.cs, Station.cs, ... RETURN: The desired object extracted from the Group or Set. If failed then -1. |
Used to get a
specific object out of the Group or Set. For example: Set holds these objects 8439, 8449, 8663. Where 8439 is Index 0, 8449 is Index 1, and so on... We want object 8449 so we set Index = 1; Object = Group::getObject(Set, Index); Object now holds the object Id(8449). |
removeFromSet(Group or Set, Index) |
Set or Group: Block
of space setup to hold objects. Index: The object to be extracted from the Group or Set. USED IN: Objectives.cs RETURN: True if succeed. False if failed. |
Used to remove an object from a Group or Set. Look at the Group::getObject function for an example. |
addToSet(Set or Group, Object) |
Set or Group: The
area to add the Object to. Object: The object wanted to be add to the Set or Group. USED IN: Item.cs, Missiontypes.cs, NewMission.cs, Player.cs, ... RETURN: True if succeed or False if failed. |
Used to add an Object to a Set or Group. |
getGroup(Object) |
Object: The object
Id. Example: 8361. USED IN: Objectives.cs, Station.cs, Trigger.cs RETURN: Group Id. |
Used to get what Group the object is currently in. |
activateGroup(Group or Set) |
Group or Set: Block
of room setup to hold objects. USED IN: Currently not used in any script files. RETURN: True if succeed or False if failed. |
Used to trigger all objects in the Group or Set. |
nameToID(Name) |
Name: The name of a
Group or Set. USED IN: Ai.cs, Game.cs, Objectives.cs RETURN: Id. Id of the Group or Set. Example: 8632. If failed then -1. |
This will convert a
Group or Set Name into its Id. For example: Look at the function Game::pickRandomSpawn in the game.cs file. Also look at the raindance.mis file. In the mis file you will find a directory tree like this MissionGroup/Teams/team0/DropPoints/Random. Under the Random group are a bunch of waypoints. So when the nameToId(NAME) is called it returns the location where all the waypoint can be found. So Game::pickRandomSpawn randomly picks one of the waypoints in the Random group. |
Item Functions |
Updated 04/09/99 |
Item::getItemData(ItemObj) |
ItemObj: The object
Id of the Item. Example: 8361. USED IN: Item.cs, Objectives.cs RETURN: Items data block name. |
Used to get the ItemObj data block name. Example: If you pickup a spinning repairpack that repairpack is an object. That object is an Item object. So to get the Items data block name you call this function. |
Item::setVelocity(ItemObj, Vec) |
ItemObj: The object
Id of the Item. Example: 8361. Vec: The velocity vector. Example: "0 45 44". USED IN: Objectives.cs RETURN: True if succeed or False if failed. |
Used to set the velocity of an ItemObj. |
Item::getVelocity(ItemObj) |
ItemObj: The object
Id of the Item. Example: 8361. USED IN: Currently not used in any script files. RETURN: Velocity Vector. Example: "33 2 8". If failed then "0 0 0". |
Used to get the velocity of an ItemObj. |
Item::getCount(ItemObj) |
ItemObj: The object
Id of the Item. Example: 8361. USED IN: Item.cs RETURN: Number. The number of Items associated with the ItemObj. |
Used to get the number of Items associated with that ItemObj. Example: Player picks up a box of chaingun ammo, then the function would return 25(which is the number of bullets in the box). |
Item::isRotating(ItemObj) |
ItemObj:
The object Id of the Item. Example: 8361. USED IN: Item.cs RETURN: True if rotating and False if not rotating or failed. |
Used to see if the ItemObj is Rotating or is set to rotate. |
Item::hide(ItemObj, Bool) |
ItemObj:
The object Id of the Item. Example: 8361. Bool: If True then hide ItemObj if False then unhide ItemObj. USED IN: Item.cs, Objectives.cs RETURN: True if succeed or False if failed. |
Used to make on ItemObj hidden if True is passed in or visible if False is passed in. |
Math and Vector Functions |
Updated 04/09/99 |
Vector::dot(Vector1, Vector2) |
Vector1: Is a
Vector that has an X, Y and Z value."100 32 3" Vector2: Is a Vector that has an X, Y and Z value."34 77 45" USED IN: Item.cs RETURN: Float. The dot product. If failed then 0. |
Will perform the dot product on the two vectors. |
Vector::add(Vector1, Vector2) |
Vector1: Is a
Vector that has an X, Y and Z value."100 32 3" Vector2: Is a Vector that has an X, Y and Z value."34 77 45" USED IN: Currently not used in any script files. RETURN: Vector. Example: "134 169 48". If failed then "0 0 0". |
Will add the two vectors together. |
Vector::sub(Vector1, Vector2) |
Vector1: Is a
Vector that has an X, Y and Z value."100 32 3" Vector2: Is a Vector that has an X, Y and Z value."34 77 45" USED IN: Currently not used in any script files. RETURN: Vector. Example: "66 -45 -42". If failed then "0 0 0". |
Will subtract the two vectors. |
Vector::neg(Vector) |
Vector: Is a Vector
that has an X, Y and Z value."100 32 3" USED IN: Currently not used in any script files. RETURN: Vector. Example: "-56 -34 -23". If failed then "0 0 0" |
Will make the Vector
values all negative. For example: Vector = "56 34 23"; Answer = Vector::neg(Vector); Answer is equal to "-56 -34 -23". |
Vector::getFromRot(Rotation, [Length, Zvalue]) |
Rotation: Rotation
of an object. Length: Length of desired vector. Zvalue: Will increase the vector in the Z direction. USED IN: Ai.cs, Item.cs, Vehicle.cs RETURN: Vector. Example: "394 44 43". If failed then "0 0 0". |
Is used to create a
vector in the direction of the rotation passed in. If no length is passed then the vector
will be the unit length. This is most commonly used to get a vector in the direction an
object is facing. For example: Rotation = GameBase::GetRotation(Player); Length = 50; Zvalue = 60; Vector = Vector::getFromRot(Rotation, Length, Zvalue); Vector is equal to a vector facing in the direction the player was at an upward angle. The upward angle is due to the Zvalue passed in. Now you can us a function called Player::applyImpulse(Player, Vector); This will force the player forward at a force of Length and up in the air a force of Zvalue . |
Vector::getDistance(Vector1 or Pos, Vector2 or Pos) |
Vector1: Is a
Vector that has an X, Y and Z value."100 32 3" Vector2: Is a Vector that has an X, Y and Z value."34 77 45" Pos: Position. Is an X, Y, Z point. "28 25 99". USED IN: Ai.cs, Objectives.cs RETURN: Float. Distance. If failed then 0. |
Is used to find the distance between two vectors or points . |
Vector::getRotation(NVector) |
NVector: Normalized
vector. Example: "1 0 -1" USED IN: Item.cs RETURN: Rotation in radians. Example: "-1.5 0 3.14". |
Used to get a rotation from a normalized vector . |
Vector::normalize(Vector) |
Vector: Is a Vector
that has an X, Y and Z value."100 32 3" USED IN: Staticshape.cs RETURN: Vector. Normalized Vector. If failed then "0 0 0". |
Will normalize the vector passed in . |
sqrt(Value) |
Value is a non
negative number. USED IN: Vehicle.cs RETURN: Float. The square root of the input value. If failed then -1. |
Used to take the square root of the value passed in . |
pow(Value, Power) |
Value: Integer. Power: Integer. USED IN: Currently not used in any script files. RETURN: Float. If failed then -1. |
Will raise the Value to the given Power. |
Moveable Functions |
Updated 04/09/99 |
HOW TO SET UP MOVEABLES: |
<Example taken from the Broadside.MIS file.>
instant SimGroup "LowerElevator" { // Sim Group.
instant SimPath "Path1" { // Sim Path. Markers go inside.
instant Marker "Marker1" { // Marker 0.
dataBlock = "PathMarker";
};
instant Marker "Marker1" { // Marker 1
dataBlock = "PathMarker";
};
};
instant Moveable "elevator_8x41" { // Object to move. MoveObj.
};
};
If MoveObj is an elevator then the MoveObj will be set to Marker0
position. The elevator Starts at Marker0 and moves to Marker1 then
Marker2 and so on till hit its the top. After hitting the top it
moves back to Marker0 passing through all other Markers. There are
Flags you can set in the instant Moveable data block area. If power
is lost then the elevator will return to Marker0.
Must set the following to 1 for it work:
loop The elevator will move without being triggered.
stopWayUp - Will stop at all Markers on the way up.
stopWayDown - Will stop at all Markers on the way down.
noTeam - Any team can trigger the elevator.
triggerHit - Elevator must be triggered by an external object.
Moveable::moveToWaypoint(MoveObj, Waypoint) |
MoveObj: Moveable
object Id defined by the Moveable data block. Waypoint: Waypoints define what path the object will follow. USED IN: Moveable.cs RETURN: True if succeed or False if failed. |
Used to move the MoveObj to the desired Waypoint. NOTE: If MoveObj is at Waypoint four and you want it to go to Waypoint zero. To get to zero it will go to Waypoint three, two, one, and then to zero. |
Moveable::moveForward(MoveObj) |
MoveObj: Moveable
object Id defined by the Moveable data block. USED IN: Currently not used in any script files. RETURN: True if succeed or False if failed. d. |
Used to move the MoveObj to the next Waypoint. |
Moveable::moveBackward(MoveObj) |
MoveObj: Moveable
object Id defined by the Moveable data block. USED IN: Currently not used in any script files. RETURN: True if succeed or False if failed. |
Used to move the MoveObj back one Waypoint. |
Moveable::stop(MoveObj) |
MoveObj: Moveable
object Id defined by the Moveable data block.. USED IN: Moveable.cs RETURN: True if succeed or False if failed. |
Used to stop the MoveObj. |
Moveable::getState(MoveObj) |
MoveObj: Moveable
object Id defined by the Moveable data block. USED IN: Currently not used in any script files. RETURN: State. String defining the state of the object. |
Used to get the current state of the MoveObj. There are four states: Undefined, MoveForward, MoveBackward, and Stop. |
Moveable::getWaypointCount(MoveObj) |
MoveObj: Moveable
object Id defined by the Moveable data block. USED IN: Moveable.cs RETURN: Number. The total number of waypoints associated with the Moveobj. If failed then 0. |
Used to get the total number of waypoints associated with the MoveObj. |
Moveable::getPosition(MoveObj) |
MoveObj: Moveable
object Id defined by the Moveable data block. USED IN: Moveable.cs RETURN: Number. The waypoint. If failed then 0. |
Used to get the waypoint the MoveObj is currently at or going to. |
Moveable::setWaypoint(MoveObj, Waypoint) |
MoveObj: Moveable
object Id defined by the Moveable data block. Waypoint: Waypoints define what path the object will follow.. USED IN: Moveable.cs RETURN: True if succeed or False if failed. |
Used to set what Waypoint the MoveObj is currently at. |
Network Server Functions |
Updated 04/09/99 |
addGameServer(Address, Name, Version, Ping, Favorite<TRUE OR FALSE>) |
Address: IP address
of server. Name: Name of the server. Version: The version number the server is running. Ping: The ping from the server. Favorite: Do you want it marked as a favorite <TRUE OR FALSE>. USED IN: GUI.cs RETURN: TRUE if succeed or FALSE if failed. |
Used to manually add a server to your server list. |
DNet::resolveMasters(SName0,<SName1, ..., SName9) |
SName0: Name of the
first server. Example: tlm1.master.dynamix.com:28000 SName1: Name of the second server. and so on... USED IN: GUI.cs RETURN: Number. The number of master servers. |
Used to convert the server names into IP address. The IP address are stored and can be accessed by using the DNet::getResolvedMaster function. |
DNet::getResolvedMaster(Index) |
Index: Refers to a
location in the IP address list. USED IN: GUI.cs RETURN: IP address. Example: IP:209.67.28.148:28000. If failed then "". |
Used to get the IP address at the location pointed to by Index from the master server list. |
StartGhosting(Client) |
Client: The Client
Id. Example: 2049. USED IN: Server.cs RETURN: True if succeed False if failed. |
Used to start sending object data to the clients. Ghosting is used to send the objects from the server over to the clients computer. |
ResetPlayerManager() |
USED IN: Server.cs RETURN: True. |
Used to clear out all players and reset the Player Manager. |
ResetGhostManagers() |
USED IN: Server.cs RETURN: True. |
Used to clear out all object and reset the Ghost Manager. |
focusClient() |
USED IN: Editor.cs,
NewMission.cs, registerVolume.cs, Server.cs, Trees.cs RETURN: True. |
Used to make all the function calls on the Client side. Also uses the Client manager when adding or removing an object. |
focusServer() |
USED IN: Editor.cs,
NewMission.cs, RegisterVolume.cs, Server.cs, Trees.cs RETURN: True if succeed or False if failed. |
Used to make all the function calls on the Server side. Also uses the Server manager when adding or removing an object. |
newServer() |
USED IN:
NewMission.cs, Server.cs RETURN: True. |
Used to create a new server and add it to the server list. |
deleteServer() |
USED IN: Editor.cs,
GUI.cs, NewMission.cs, Server.cs RETURN: True. |
Used to remove the current server from the server list. |
preloadServerDataBlocks() |
USED IN:
NewMission.cs, Server.cs RETURN: True if succeed False if failed. |
Used to load all the Data Blocks that are defined in the scripts. Must be called after the scripts have been loaded in. |
purgeResources() |
USED IN: Client.cs,
Editor.cs, GUI.cs, Server.cs, NewMission.cs, ... RETURN: True. |
Used to clear out files or other resources that are not needed in memory anymore. |
Team Functions |
Updated 04/09/99 |
Team::setScore(TeamId, ScoreString, SortValue) |
TeamId: Team
number. Each team is associated with a number range from -1 to 7. Where -1 is the observer team. ScoreString: The string that will be displayed. SortValue: The value ScoreStrings will be sorted by. USED IN: Objectives.cs RETURN: True if succeed or False if failed. |
Used to set the team
score values on the TAB screen. Look at the function ObjectiveMission::refreshTeamScores()
in the Objectives.cs file. I'll explain this function below: Team::setScore(%i, "%t\t " @ $teamScore[%i], $teamScore[%i]); %i is the TeamNumber. The "%t\t ": %t will print the teams name and the \t will tab over to the next column (which is defined in the setTeamScoreHeading function call). The $teamScore[%i] is the %i teams score and the last $teamScore[%i] says that you want it to be sorted by team score. Sorts highest value on top lowest on the bottom. |
setTeamScoreHeading(HString) |
HString: The
heading for the team scores on the tab screen. USED IN: Dm.cs, Objectives.cs RETURN: True if succeed or False if failed. |
Sets the heading for
the team score section of the tab screen. For Example: setTeamScoreHeading("Team Name\t\xD6Score"); It will print Team Name and then move D6hex units to the right and print Score. The D6 is a hex value from 0 to FF.. |
Team::setObjective(TeamId, LineNum, String) |
TeamId: Team
number. Each team is associated with a number range from -1 to 7. Where -1 is the observer
team. LineNum: The line number to display the text on. String: The text string to be displayed. USED IN: Dm.cs, Objectives.cs RETURN: 0 |
Used to place text on the objective screen. Each objective screen is team based. This allows you to have a different objective screen for each team. It uses the TeamId to define on which objective screen to place the text. |
Team::clearObjectives(TeamId) |
TeamId: Team
number. Each team is associated with a number range from -1 to 7. Where -1 is the observer
team. USED IN: Currently not used in any script files. RETURN: 0 |
This will clear the objective screen for the team defined by the TeamId. |
Vehicle Functions |
Updated 04/09/99 |
Vehicle::canMount(VObject, Player or Client) |
VObject: The
vehicle object Id. Player: The object Id. Example: 8361. Client: The Client Id. Example: 2049. USED IN: Vehicle.cs RETURN: True if Player or Client can mount the vehicle. False if can't mount or failed. |
Used to see if there is room for the Player or Client to mount the VObject. |
Vehicle::nextPassengerPoint(Vobject) |
VObject: The
vehicle object Id. USED IN: Not currently used in any script files. RETURN: Number. The next available mount point. If failed then -1. |
Used to get the next available mount point on the vehicle. |
Vehicle::incPassengers(Vobject) |
VObject: The
vehicle object Id. USED IN: Not currently used in any script files. RETURN: True if succeed or False or -1 if failed. |
Used to increment the passenger counter for the VObject. |
Vehicle::incPassengers(Vobject) |
VObject: The
vehicle object Id. USED IN: Not currently used in any script files. RETURN: True if succeed or False or -1 if failed. |
Used to decrement the passenger counter for the VObject. |
Vehicle::getMountPoint(Vobj, Mpoint) |
Vobj: The object Id
of the vehicle. Mpoint: The mount point. USED IN: Vehicle.cs RETURN: Position. The X, Y, and Z position of the Mpoint. Example: "X Y Z". |
Used to get the position of the desired Mpoint. There are two Mpoints on a Scout, four on a LPC, and six on an HPC. Mpoint zero is the driver mount position. Mpoint one is the drivers exit point. Mpoints two through six are the passenger Mpoints. |
Object - File Functions |
Updated 04/14/99 |
isFile(FileName) |
FileName: The full
path name and file name. USED IN: GUI.cs, Menu.cs, Registervolume.cs RETURN: True if it does exist. False if failed or doesnt exist. |
Used to see if the FileName exists. |
which(Script) |
Script: Name of a
script file. Example: "Item.cs", "Game.cs". USED IN: Currently not used in any script files. RETURN: Path. The directory path that the Script is being ran from. |
Used to find out what directory the Script is currently being ran from. |
getBoxCenter(Object) |
Object: The object
Id. Example: 8361. USED IN: Player.cs, Staticshape.cs RETURN: String "X Y Z" coordinates. If failed then "0 0 0". |
Used to find the
center point of an object. For example: Object = 8489; (8489 is the Id of a turret) answer = getBoxCenter(Object); answer is equal to "100 230 50". Which is the X Y Z value of the center point of the Object. |
getObjectType(Object) |
Object: The object
Id. Example: 8361 USED IN: Player.cs, Item.cs, Mine.cs, Moveable.cs, Objectives.cs... RETURN: Type. Returns the name of the class the object was derived from. Example: Player or Flier.. etc. |
Is used to find the
type of the Object. For Example: Type = getObjectType(Object); Type is equal to "Player" because the Object Id passed in was created from the player class. |
getObjectByTargetIndex(ObjectIdx) |
ObjectIdx: Index
into a visible object array. USED IN: Player.cs RETURN: Object Id. The Id of the object at that index location. If failed then -1. |
Used to return the visible object at the index. All objects that are visible because of sensor or player LOS gets added to a visable object array. |
loadObject(Name, Object) |
Name: Name to be
assigned to the object. Object: The object and it full path name to be loaded. USED IN: Client.cs RETURN: Object Id of the new loaded object. If failed then 0. |
Used to load the Object and assign it the Name. |
storeObject(Object, Name) |
Object: The object
to be stored. Name: The full path name and file name to be store under. USED IN: GUI.cs RETURN: True if succeed or False if failed. |
Used to store the Object and all child objects that are associated with that object. |
deleteObject(Object) |
Object: The object
Id. Example: 8361. USED IN: Game.cs, Item.cs, Menu.cs, Station.cs, Server.cs, ... RETURN: True if succeed or False if failed. |
Used to delete the specified Object from the managers object list. |
isObject(Object) |
Object: The object
Id. Example: 8361. USED IN: Client.cs, Editor.cs, GUI.cs, Menu.cs, ... RETURN: True if it is a valid object. False if failed or not. |
Used to see if the Object Id passed in is a valid object. |
listObjects() |
USED IN: Most
common use is in the Console screen. RETURN: Objects. All objects in the mission. |
Used to list all the objects currently used in the mission. |
newObject(ObjName, Class, <ExtraArg>) |
Object: The name of
the object. Class: Type of object to create. ExtraArg: Some Classes require extra arguments. USED IN: Chatmenu.cs, Editor.cs, Game.cs, GUI.cs, Item.cs, ... RETURN: True if succeed or False if failed. |
Used to create an
object. Different types of class take different extra arguments. The list below is the
most common Classes used. Item: StaticBase: Flier: ChatMenu: |
The Tribes operators I am aware of are:
Mathematical: | ||
+ |
addition | |
- |
subtraction | |
* |
multiplication | |
/ |
division | |
= |
assignment | |
+= |
additive assignment | |
-= |
subtractive assignment | |
*= |
multiplicative assignment | |
/= |
divisive assignment | |
++ |
increment (pre and post) | |
-- |
decrement (pre and post) | |
Logical: | ||
== |
equal | |
< |
less than | |
> |
greater than | |
<= |
less than or equal | |
>= |
greater than or equal | |
!= |
not equal | |
&& |
boolean AND | |
|| |
boolean OR | |
! |
boolean NOT | |
& |
bitwise AND | |
| |
bitwise OR | |
String: | ||
@ |
string concatenation |
From cyrect@captured.com:
Version 1.1
updated last 1/25/1999
by John "Cryect" Rittenhouse
email: cryect@captured.com
This is a guide to the Starsiege:Tribes scripting. The commands are currently almost all undocumented or not even mentioned in the scripts. Well talking with the Tribes team it looks like it will be a couple of weeks before they release info on Scripting and Map Editing but even then they might not tell all. So I took it upon myself to fill the gap here for a couple weeks and maybe even beyond. This information was retrieved by examing the main exe of the game in Microsoft Visual C++ 5.0 for those who are interested. I guess you would call it a kind of reverse engineering but not quite(I could if I want reverse engineer real fast by looking at it in debug mode but that was not needed plus it would take a hell of a long time to go over 2megs of data since most asm commands use aproximately 3 bytes each).
(Note from Firefly =VGS=: Most of this document has been deleted because it was explained better in the official documentation above. Following are those functions which are not in the official documentation)
addToolButton(windowname,buttonname,bmp,[wrapafter],[togglebutton])- Puts a button on the toolbar with the data given. Toggle buttons are buttons that have an up and down state
addToolGap(windowName,GapName)-Adds a gap
BuyFavorites()-guess what it buys your favorites
Client::setScore
cursorOn(object) - I think this puts the cursor on that object
exec(file)-executes the file
export(searchstring,[filename],[Append]) - This exports all variables that meat the specifications to the filename
File::FindFirst(file) - Finds the first file that meets those specifications
File::FindNext(File) - Finds the next file thats meets those specifications
FindPointOnSphere(playerPos,objectPos,vec,object) Not sure quite yet
GetClientByIndex()
getIntegerTime
GetItemData(type) gives item data wow
GetNumClients() returns number of clients in game
GetNumItems
GetNumTeams() returns the number of teams
getRandom() returns a random number between 0 to 1
GetTeamName(TeamNumber) returns the name of that team number
GuiLoadContentCtrl(canvas,gui file)- This will set the canvas up with the gui file
guiPopDialog(Canvas,int) - Pops up a dialog box of the canvas specified
guiPushDialog(canvas,filename) - Not sure yet
inputActivate(device) - Activates that device
Interior::setLightTime(Interior,light,time) - I guess it sets the time the light will switch on or off
Interior::switchOffLight(interior,light) - Turns the light off
Interior::switchOnLight(interior,light) - Turns the light on
Interior::toggleLight(interior,light) -Toggles it between on/off
ModeresetPlayDelegate
RebuildServerList()-rebuilds the list
remotePlayAnim
RemoteSelectCommander
SetCMMode(menuObject, mode) Sets the mode
setCursor(object,bmp) - Sets what the cursor bmp is when over the object
SetHudTimer(time in seconds) sets the clock on the console to this time
SetIssueCommand
setToolCommand(WindowName, ButtonName, ConsoleCommand,[ConsoleCommandUp])- Sets the command of a button when pressed. Console Command up is when released.
ShapeView::setItem
ShapeView::setShape
ShapeView::setSkin
Turret::setTarget(turret,player) - Sets the turret target to the player whose id is given
Vehicle::canRide(Vehicle, player)-Returns if the player can ride or not
At First I thought these were commands but I determined they actually are variables all. These all do different things I'm not even sure about the variable pref::snipercrosshair since it got set about 12 different times in the exe
FearPlugin
Version
pref::ignoreInternetWarning
pref::IgnoreTargets
pref::NumDecals
pref::TerrainVisibleDistance
pref::TerrainPerspectiveDistance
pref::TerrainDetail
pref::TerrainTextureDetail
pref::InteriorTextureDetailSensorNetworkEnabled
net::predictForwardTime - This is I think if it will predict forward time (maybe how far ahead?)
net::interpolateTime - Not sure but this might be how many packets it uses to try to interpolate time and if is it probably assigns different values with the more recent ones higher values
pref::damageSkinDetail
pref::useCustomSkins
pref::shadowDetailMask
pref::shadowDetailScale
pref::playerShapeDetail
pref::vehicleShapeDetail
pref::staticShapeDetail
pref::skyDetail
pref::starDetail
pref::freeLook(TRUE/FALSE) - if free look is on or off
pref::interiorLightUpdateMS
pref::dynamicLightDistance
pref::maxNumSmokePuffs
pref::weatherPrecipitation
pref::flipFlierY
pref::PlayerFov - The normal FOV set
pref::PlayerZoomFov - The FOV that is set when player zooms in
pref::PlayerZoomSpeed - The speed at which the player zooms in
GameBase::upFov
GameBase::upDistance
GameBase::upVelocity
GameBase::upSkips
GameBase::upOwnership
GameBase::upInterestServer
pref::SniperCrosshair(TRUE/FALSE)
playGui
Keyboard
Mouse
Joystick
Device
make
break
move
X-Axis
Y-Axis
Z-Axis
RX-Aaxis
RY_Axis
RZ-Axis
Slider
POV
X-POV
Y-POV
U-POV
D-POV
L-POV
R-POV
ButtonKey
From <http://alazane.surf-va.com/scripting.html>
by Alazane
Introduction
Summary of System Namespaces
Details of System Namespaces
Summary of Types
Details of Types
This document covers scripting information that I have dug out of Tribes. I make no guarantee of anything contained herein since I had to surmise several things based on my experience of how things usually work. If you have any corrections or comments, feel free to e-mail me.
To introduce some type of structure to a system that otherwise will accept most any values for anything (with varying results), I have created a set of types that define an approximate behavior for a particular variable. For example, if you were retrieve a TLocation value from a function, you would be retrieving a value that would generally be in the form "0 0 0" where the numbers contained in this string are X Y and Z. However, the value could be assigned any value you wish.
This system does not directly support objects in the typical sense. However, objects have been simulated using the basic structures that are available: variables (Tribes variables contain a value and may contain one or more sub-variables) and namespaces. When you see Player::DoSomething(%Player) this is simply calling the DoSomething function that is part of the Player namespace with the %Player varable as the first parameter. Namespaces may also be used to store variables such as $PlayerAnim::DieLegLeft = 31;. Note that in the above example %Player could be used in the form %Player = 2049 or %Player.HasFlag = True (see TPlayer for more on that).
As in all systems that do not directly support objects but need to use them anyhow, an associated variable is usually passed into a function that is part of a similar namespace as the first parameter (similar to a this variable). For Example, Player::applyImpulse requires a TPlayer as its this variable since it cannot directly associate the function with an instance of a player. So you must call it in the form Player::applyImpulse(%Player, %Vec) rather than %Player.applyImpulse(%Vec).
Namespaces are simply groupings of functions that are accessed
through their name and group name. For example, calling:
buyItem(%p, %i);
would be referencing the global namespace function "buyItem" where:
Player::applyImpulse(%p, "0 0 1000");
would be referencing the namespace Player and its function "applyImpulse".
Below are all of the namespaces that are defined in Tribes.exe.
// Gets and sets
TObject getControlObject(TClient);
setControlObject(TClient, TObject);
setDataFinished
TClient getFirst();
TGender getGender(TClient);
getGuiMode
setGuiMode(TClient, $guiModeObjectives);
setInitialTeam
setItemBuying
setItemShopping
setMenuScore
getMouseSensitivity
getMouseXAxisFlip
getMouseYAxisFlip
TString getName(TClient);
TClient getNext(TClient);
TObject getObserverCamera(TClient);
TObject getOwnedObject(TClient);
setOwnedObject(TClient, TObject);
setScore
setSkin(TClient, TSkin);
getSkinBase
TTeam getTeam(TClient);
getTransportAddress
getVoiceBase
// Other
centerPrint
clearItemBuying
clearItemShopping(TClient);
ExitLobbyMode
isItemBuyingOn
isItemShoppingOn
limitCommandBandwidth
sendMessage(TClient, TVal, TString);
takeControl(TClient, TObject);
// Events
onKilled(TClient, TClient Shooter, TDamageType);
resolveMasters
getResolvedMasters
// Gets and sets
TBoolean isActive(TObject this);
setActive(TObject this, TBoolean);
TVal getAutoRepairRate(TObject this);
setAutoRepairRate(TObject this, TVal);
TClient getControlClient(TObject this);
TVal getDamageLevel(TObject this);
setDamageLevel(TObject this, TVal);
TState getDamageState(TObject this);
TString getDataName(TObject this);
TVal getDisabledDamage(TObject this);
TVal getEnergy(TObject this);
setEnergy(TObject this, TVal);
setIsTarget(TObject this, TBoolean);
TBoolean getLOSInfo(TObject this, TVal Distance [, TRotation]);
TString getMapName(TObject this);
setMapName(TObject this, TString);
getMuzzleTransform
TClient getOwnerClient(TObject this);
TLocation getPosition(TObject this);
setPosition(TObject, TLocation);
getPowerCount
TVal getRadius(TObject this);
TVal getRechargeRate(TObject this);
setRechargeRate(TObject this, TVal);
TRotation getRotation(TObject this);
setRotation(TObject this, TRotation);
TTeam getTeam(TObject
this);
gamebase_setteamsetTeam(TObject
this, TTeam);
getTransform
setSequenceDirection(TObject this, TVal, TVal);
// Other
activateShield(TObject this, TVector,
%zOffs);
applyDamage(TObject this, TDamageType,
TVal, TLocation, TVector, TVector, TObject);
applyRadiusDamage(TDamageType, TVal Radius,
TVal Damage, TVal Force, TObject
this);
generatePower(TObject this, TBoolean);
TBoolean isAtRest(TObject this);
TBoolean isPowered(TObject this);
TBoolean isPowerGenerator(TObject this);
pauseSequence
playSequence(TObject this, TVal Sequence, TString Name);
playSound
repairDamage(TObject this, TVal);
startFadeIn(TObject this);
startFadeOut(TObject this);
stopSequence(TObject this, TVal Sequence);
TBoolean testPosition(TObject this, TLocation);
throw(TObject this, TObject Source, TVal, TBoolean);
upDistance
upFov
upInterest
upOwnership
upSkips
upVelocity
virtual(TObject this, TString, TObject, TObject);
getObject
iterateRecursive
objectCount
isIn8BitMode
issue8BitWarning
issueInternetWarning
setLightTime
switchOnLight
switchOffLight
toggleLight
getCount
getItemData
TVelocity getVelocity(TObject);
setVelocity(TObject, TVelocity);
hide(TObject);
TBoolean isRotating(TObject);
getPosition
getState
setWaypoint
getWaypointCount
moveBackward
moveForward
moveToWaypoint
stop
interpolateTime
predictForwardTime
// Gets and sets
isAiControlled
setAnimation(TPlayer, TAnim);
TArmor getArmor(TPlayer);
setArmor
TClient getClient(TPlayer);
TBoolean isCrouching(TPlayer);
TVal getDamageFlash(TPlayer);
setDamageFlash(TPlayer, TVal);
TBoolean isDead(TPlayer);
setDetectParameters
isExposed
getItemClassCount
decItemCount(TPlayer, TObject, TVal Delta);
incItemCount(TPlayer, TObject, TVal Delta);
TVal getItemCount(TPlayer, TObject);
setItemCount(TPlayer, TObject, TVal);
isJetting
TVal getLastContactCount(TPlayer);
TObject getMountedItem(TPlayer, TSlot);
getMountObject
setMountObject
getNextMountedItem
getSensorSupression
setSensorSupression
isTriggered
// Other
applyImpulse(TPlayer, TVector);
blowUp(TPlayer);
dropItem(TPlayer, %weapontype);
kill
lastJetTime
mountItem
unmountItem
trigger(TPlayer, %WeaponSlot, bool);
deployItem
dropItem
useItem(TPlayer, TObject);
// Events
onAdd(TPlayer)
onCollision(TPlayer, TObject)
onDamage(TPlayer, TDamageType, TValue, TLocation,TVector,TMomentum,TLocation Vert, TQuadrant, TObject)
onKilled(TPlayer)
onNoAmmo(TPlayer,%imageSlot,%itemType)
onRemove(TPlayer)
animateWithTransitions
damageSkinDetail
dynamicLightDistance
filterBadWords
flipFlierY
freeLook
IgnoreTargets
interiorLightUpdateMS
InteriorTextureDetail
maxNumSmokePuffs
NumDecals
playerShapeDetail
shadowDetailMask
shadowDetailScale
skyDetail
starDetail
staticShapeDetail
TerrainDetail
TerrainPerspectiveDistance
TerrainTextureDetail
TerrainVisibleDistance
useCustomSkins
vehicleShapeDetail
weatherPrecipitation
spawnProjectile
setItem
setShape
setSkin
clearObjective
setObjective
setScore
setTarget
TVal dot($los::normal, TVector);
TVector add(TVector, TVector);
TVector sub(TVector, TVector);
TVector neg(TVector);
TVector getFromRot(TRotation, TVal Distance);
TVal getDistance(TLocation, TLocation);
TRotation getRotation($los::normal);
TNorm normalize(TVector);
canMount
canRide
nextPassengerPoint
incPassengers
decPassengers
getMountPoint
// Gets and sets
TLocation getBoxCenter(TObject);
TObject getObjectByTargetIndex(TVal
Index)
TString getObjectType(TObject);
TTime getSimTime();
TVal getWord(TString, TVal Offs);
// Other
bottomprint(TClient, TString, TVal);
buyItem(TClient, TObject);
calcRadiusDamage(TObject, TDamageType,
A, B, C, D, E, F, G, H, I);
findPointOnSphere(TLocation, TLocation, TVector, TObject);
issueCommand(TClient, TClient, TVal,
TString, TVal X, TVal Y);
playVoice(TClient, %sound);
remotePlayMode(TClient);
schedule(TString Command, TTime);
spawnPlayer(TArmor, TLocation, TRotation);
TObject Client::getControlObject(TClient this);
This function returns the controlling object for this client. If the client is in the
player's body it will return that object, if s/he is in camera mode it will return the
camera object, etc.
See Also: setControlObject, getObserverCamera
Client::setControlObject(TClient this, TObject obj);
This function sets the object that this client is currently controlling. That object may
either be a body (player), a camera, a turret, etc.
See Also: getControlObject, getObserverCamera
TObject Client::getObserverCamera(TClient this);
This function returns the object for this clients observer camera. This can then be
specified as the object to control (rather than the player's body) by using Client::setControlObject.
ex.
%o = Client::getObserverCamera(%c);
Client::setControlObject(%c, %o);
See Also: getControlObject, setControlObject
TGender Client::getGender(TClient this);
This function retrieves the client's gender (duh). Click on TGender above to see results.
TTeam Client::getTeam(TClient
this);
This function gets the team to which the specified client belongs.
See Also: GameBase::getTeam
TBoolean GameBase::getLOSInfo(TObject this, TVal Distance [, TRotation]);
This function sets the following globals based on the parameters that it receives:
$los::position
$los::normal
$los::object
It seems that with a player the last parameter is usually left blank (implying that the
player's rotation used rather than the specified one).
ex.
if (GameBase::getLOSInfo(%this, 1.5, "0 0 3.14"))
{
%obj = getObjectType($los::object);
}
TRotation GameBase::getRotation(TObject this);
This function gets the rotation of the specified object.
TTeam GameBase::getTeam(TObject);
This function gets the team to which the specified object belongs.
GameBase::setTeam(TObject, TTeam); This function sets the team to which the specified object belongs.
Player::setAnimation(TPlayer this, TAnim value);
This function sets the player's current animation. See TAnim for more
details.
TObject Player::getMountedItem(TPlayer this, TSlot);
This function retrieves the object that is mounted in the specified slot. See TSlot for more details.
ex.
%obj = Player::getMountedItem(%p, $WeaponSlot);
Player::blowUp(TPlayer this);
Specifies that the next time this player dies, use the animation of him/her blowing up
rather than the specified one.
buyItem(TClient, TObject);
This function spawns an item into the possession of the specified client. This item can
then be used, dropped, etc.
ex.
buyItem(%c, TargetingLaser);
Player::useItem(%p, TargetingLaser);
TObject getObjectByTargetIndex(TVal
Index);
This function retrieves any target based on the specified Index.
I'd just like to remind you that type names were created by me and are in no way used in Tribes other than in the values that a particular type usually contains.
Type |
Description |
Values |
TAnim | Animation | |
TArmor (TObject) | Armor Object | "harmor", "marmor", "larmor", etc |
TBoolean | Boolean value | True, False |
TClient | Client object. Assigned from value on connection. These are acted on primarily by the Client container. | "2049", Client.LastDamage, etc. |
TGender | Gender | "Male", "Female" |
TLocation (TVector) | X, Y, Z Location in space. | "0 0 0" |
TObject | Any object. These are acted on primarily by the GameBase container. | |
TPlayer (TObject) | Any player's object. These are acted on primarily by the Player container. | |
TQuadrant (TString) | Location of an action on an object. | "front_left", "back_right" |
TRotation (TVector) | X, Y, Z Rotation in radians (where PI rad = 360 deg) | "0 0 0" |
TSkin (TString) | A predefined skin stored on the server. | "beagle", "dsword" |
TSlot (TVal) | A slot on a player (backpack, weapon, etc) | $BackpackSlot, $WeaponSlot |
TState (TString) | State of an object | "Enabled" |
TString | An array of characters | "This is a string", "0 0 0" |
TVal | An integer value | 123 |
TVector (TString) | A vector. | "10 10 0" |
TAnim is a numerical value that defines an animation. Currently this is only used in relation to a player's body through the function Player::setAnimation. Player.cs defines the following constants that are valid for a TAnim variable:
$PlayerAnim::Crouching = 25;
$PlayerAnim::DieChest = 26;
$PlayerAnim::DieHead = 27;
$PlayerAnim::DieGrabBack = 28;
$PlayerAnim::DieRightSide = 29;
$PlayerAnim::DieLeftSide = 30;
$PlayerAnim::DieLegLeft = 31;
$PlayerAnim::DieLegRight = 32;
$PlayerAnim::DieBlownBack = 33;
$PlayerAnim::DieSpin = 34;
$PlayerAnim::DieForward = 35;
$PlayerAnim::DieForwardKneel = 36;
$PlayerAnim::DieBack = 37;
Defines a type of armor. Each player's armor can be retrieved with a call to Player::getArmor. An armor variable is also used in several lookup tables such as $ItemMax[] and $DamageScale[,].
Value = "harmor", "marmor", "larmor", etc
Contained Variables
TVal | maxDamage |
Contains simply a True or False value. Note that if a non-existant variable is asked for its value, False is returned.
Ex. (TBoolean %bool)
%bool = Player::isCrouching(%p);
if (%bool == True) { /*...*/ }
This is an object that defines an individual source. This source is most likely a person connected via the Tribes client, but I don't suppose it has to be. This differs from a player in that a player is the client's bodily manifestation in the game (as opposed to an observer).
Value = ex. 2049
Contained Variables
TTime | LastDamage | |
TVal | scoreDeaths | Number of times this client has died. |
TVal | scoreKills | Number of kills for this client. |
Specifies a type of damage (hey, what more can I say?). This value is used to look up plausable messages to display when a player dies (see game.cs for messages) and look up damage scale values. baseProjData.cs defines the following values:
$ImpactDamageType = -1;
$LandingDamageType = 0;
$BulletDamageType = 1;
$EnergyDamageType = 2;
$PlasmaDamageType = 3;
$ExplosionDamageType = 4;
$ShrapnelDamageType = 5;
$LaserDamageType = 6;
$MortarDamageType = 7;
$BlasterDamageType = 8;
$ElectricityDamageType = 9;
$CrushDamageType = 10;
$DebrisDamageType = 11;
$MissileDamageType = 12;
$MineDamageType = 13;
Contains a player gender. Can be retrieved with Client::getGender.
Value = "Male", "Female"
Contains (as a string) an absolute location in 3D space in the form "X Y Z"
Value = ex. "0 0 0", "23, 34.5, 12"
Ex. (TLocation %loc)
%loc = "0 0 0"; GameBase::setPosition(%p, %loc);
This object is the bodily manifestation of a client (as opposed to an observer).
Value = ex. 8096
Contained Variables
TObject | CarryFlag | |
TVal | CommandTag | |
TTime | DamageStamp | |
TTime | DamageTime | |
TVal | dieSeqCount | |
TObject | Flag | |
TBoolean | HasFlag | |
TClient | LastHarm | |
TVal | leaveTime | |
TVal | outArea | |
TVal | ResupplyFlag | |
TVal | RepairRate | |
TObject | RepairTarget | |
TVal | shieldStrength | |
TObject | Station | |
TVal | ThrowTime | |
TVal | timeLeft |
This string defines the location on an object in which something
occurred. Valid values for this string are:
"front_left"
"front_right"
"back_left"
"back_right"
This string defines a 3D rotation in radians (where 360 deg = PI rad). Think of it as AngleX, AngleY, AngleZ.
Value = ex. "0 0 0", "0.4, 0.15, 3.0"
This string specifies that this client should use one of the skins that is loaded onto the server. serverDefaults.cs specfies the following valid skins:
$Server::teamSkin[0] = "beagle";
$Server::teamSkin[1] = "dsword";
$Server::teamSkin[2] = "cphoenix";
$Server::teamSkin[3] = "swolf";
$Server::teamSkin[4] = "base";
$Server::teamSkin[5] = "base";
$Server::teamSkin[6] = "base";
$Server::teamSkin[7] = "base";
ex.
setSkin(%c, $Server::teamSkin[4]);
Specifies a slot on a player. Item.cs defines the following constants for slots:
$ToolSlot=0;
$WeaponSlot=0;
$BackpackSlot=1;
$FlagSlot=2;
$DefaultSlot=3;
Contains a string value describing the state of an object (ex. %st = "Enabled").
Contains a string value (ex. %s = "String";) as opposed to an integer value (ex. %i = 10;).
Contains an integer value (ex. %i = 10;) as opposed to a string value (ex. %s = "String";).
Contains (as a string) an array of values--usually X, Y and Z.
Value = ex. "0 0 0", "23, 34.5, 12"
Ex. (TVector %vec)
%vec = "0 0 1000"; // Sproing the player up in the air
Player::applyImpulse(%Player, %Vec);
|
visits since 5-25-99 |