html>
Trespasser Script Reference
This page was automatically generated from XML
Trespasser Script Reference
This document describes the classes and values of the scripting used by Trespasser. The syntax of the script is
that used by TresEd, the Trespasser Level Editor.
Script Reference:
General Script Classes
Trigger Classes
Trigger Actions
Notes:
- Default value "none" means value is optional and only used if specified.
- A '$' object is one whose name begins with '$' and is used by the physics engine.
- If restrictions (eg. "Named object must exist") are not honored, Trespasser may behave oddly or crash.
- If a value is listed as "Must specify", Trespasser may behave oddly or crash if the value is not specified.
Disclaimer: This page is work in progress, is far from complete, and has not been thoroughly checked so use it just as a guide.
Values are case sensitive and strongly typed. This means that if you type "moveable" instead of "Moveable" or "int Frame" instead of "float Frame", Trespasser will ignore the value. Where the default value is listed as "must specify", Trespasser may behave badly or even crash if the value is not specified.
The Class value determines the type of object, and all objects should specify it.
Type |
Name |
Default |
Description |
string |
Class |
"CInstance" |
Class of object, described below. |
Example:
group MyTerrainTexture = {
string Class = "CTerrainObj"
int Height = 1
string SoundMaterial = "Grass"
}
Classes:
AI Command
CAnimal
CBackdrop
CEntityAttached
CEntityWater
CGun
CInstance
CJoint
CLightDirectional
CMagnet
CMuzzleFlash
CParticles
CSky
CTerrainObj
CWaterDisturbance
Player
Player Settings
Teleport
TerrainPlacement
<no Class specified>
See also Trigger classes
Possible classes, with unknown usage (not used in original levels): CHitSpang, CInput, CSocket, Default, Marker, TerrainExtent, CTest, CSubsystem.
AI Command
Specifies the sounds to use for CAnimals. See a level for examples.
CAnimal
A dinosaur, see a level for examples. See also the trigger actions "Dino AI", "Creature" and "Wakeup".
Type |
Name |
Default |
Description |
int |
ArcheType |
must specify |
What this dino eats. A "Not-Anne" Carnivore has no interest in eating Anne, though they may stil kill her if she gets in the way. 1 = Herbivore 0 = Carnivore -1 = Not-Anne Carnivore |
int |
Dinosaur |
must specify |
Used by vocals (class AI Command). Not sure if it means anything more than which sounds to use. (Could affect dino AI behaviour?) 0 = Raptor 1 = T-rex 2 = Parasaurolophus 3 = Triceratops 4 = Stegosaur 5 = Brach 6 = Albertosaur |
int |
PVA |
must specify |
? Always -2 in original levels |
Physics |
string |
Type |
must specify |
Type of jointed skeleton: "Trike" = Four legged creature "Raptor" = Two legged creature |
string |
Head |
must specify |
Physics objects used for collisions. (Named '$' object must exist.) |
string |
Body |
must specify |
Physics objects used for collisions. (Named '$' object must exist.) |
string |
Tail |
must specify |
Physics objects used for collisions. (Named '$' object must exist.) |
string |
LeftFoot, RightFoot, LeftRearFoot, RightRearFoot |
unknown |
In the original levels these are not set - Trepsser uses a default foot model. I believe they can be set though. Perhaps "Foot" is used instead of RightFoot? (Named '$' object must exist.) |
int |
NumJoints |
must specify |
Number of joints (not including double joints). See CJoint . |
int |
NumDoubleJoints |
must specify |
Number of interpolated joints. |
CBackdrop
Not sure how this class is used. A few levels have this, but they contain no other values, just "string Class = "CBackdrop"".
CEntityAttached
Not sure how this class is used. Looks just like a CInstance, but has a "string Target" value, and always (except for one instance) has some Anim00 texture names.
CEntityWater
Ripples happen on water entities when objects collide with it. See also CWaterDisturbance.
Type |
Name |
Default |
Description |
float |
ResolutionRatio |
1.0 |
Optional. One original level has this as 2.0, the others do not specify it. |
string |
SoundMaterial |
none |
Optional. For the few original levels that have this, it is "Water". |
CGun
See a level for examples..
Type |
Name |
Default |
Description |
string |
MFlashObject0 |
must specify |
CMuzzleFlash(s) for gun (Named object must exist.) |
string |
MFlashObject1 |
none |
CMuzzleFlash(s) for gun (Named object must exist.) |
CInstance
General object in world. See also the trigger actions "Texture Animate", "Physics", and "Substitute Mesh".
Type |
Name |
Default |
Description |
Misc |
bool |
AI |
|
If true and a dino has ActGetOut=true, the dino won't go into this bounding volume. I think the default value of AI is true if object is Visible, and false if it has Visible=false. |
float |
AIMass |
unknown |
? Used in Anne and dinos. |
int |
AIType |
unknown |
What AI sees this object as: 2 = dinosaur 3 = bone, carcas 5 = Anne 15 = water |
float |
Damage |
unknown |
? |
float |
Height |
unknown |
? Use if Planted=true. |
bool |
Merge |
true |
? |
bool |
Split |
true |
? |
string |
Mesh |
none |
Use mesh of given object instead of own mesh. |
bool |
Planted |
false |
? |
string |
SoundMaterial |
none |
Used by CCollisionTrigger. May also be name of sound from "Effects.tpa", but doesn't have to be. |
bool |
Wrap |
true |
? |
Rendering |
int |
AlphaChannel |
none |
0,1,8 in original levels. Make object transparent. Used by LightBeam in testscene, and also by many triggers. |
bool |
AlwaysFace |
false |
True to create a 'billboard'. Rotates around (world?) Z-axis, Y-axis of object faces viewer. |
bool |
Bumpmaps |
unknown |
? Ignored if all textures are 8bit. Ignored completely? |
float |
Bumpiness |
unknown |
|
bool |
Curved |
false |
? Ignored? |
float |
Diffuse |
1.0 |
Amount of diffuse lighting. WARNING: If this value is changed, Trespasser won't load the level unless the PID is updated. This is because the Diffuse value is used in the hash function that converts texture names in the GRF with texture IDs in the PID. |
float |
Emissive |
0.0 |
Emissive lighting parameter, often used by billboards and detail objects that are Unlit. |
bool |
MipMap |
true |
Used during level creation, unclear whether used by engine. Specifies whether mipmaps are to be generated and used for the textures of this mesh. If true, only the smallest mipmap is permanently in memory. If false, the whole texture always resides in memory, so use with care. Must be false for CSky, and perhaps TerrainPlacement. |
int |
Normals |
unknown |
(does this work? perhaps only used during level creation) Which sort of face normals to use. 0 = Use vertex normals? 1 = Use face normals? 2 = ? |
bool |
Reflect |
unknown |
? Only used on GoldBar (in jr?) |
bool |
refract |
unknown |
? Only used on GoldBar (in jr?) |
float |
RefractIndex |
unknown |
? Only used on GoldBar (=1.1, in jr?) |
float |
Specular |
0.0 |
1.1 to 1.9 in original levels. |
float |
SpecularAngle |
unknown |
0.2 to 37 in original levels. |
bool |
Shadow |
true |
If true cast shadow onto terrain. |
bool |
Unlit |
false |
If true don't apply diffuse light (nor ambient as well?) to this object. Will usually specify Emissive=1.0 in this case. |
bool |
Visible |
true |
If true object can be seen. (Can be used if it's a CInstance, CAnimal, or if it has no valuetable entry.) See also the trigger action "Visibility". |
Physics |
bool |
Moveable |
false |
Object can be moved (perhaps only works if it's Tangible?). |
bool |
Tangible |
false |
Is this a physical object ie. one that feels solid. |
bool |
Floats |
false |
|
bool |
Frozen |
false |
|
float |
Density |
unknown |
? Used to compute mass from bounding volume? |
float |
Elasticity |
unknown |
Original levels have 0.1-0.2, except for PBasketBall00-00=2.0 |
float |
Friction |
unknown |
Ranges 0 to 10 in original levels. |
float |
Mass |
unknown |
Explicitly set mass (ie. not using Density). |
string |
Type |
none |
If "Compound" then use Model00s for the physics. Both this object and Model00's should have Tangible=true, and the Moveable flags must match as well. "Compound" = Compound object |
string |
Model00, Model01, ... |
none |
Physics sub-object. Specifies object(s) whose bounding boxes should be used for physics
instead of this object's bounding box. Type must be "Compound". Trespasser files
only use numbers 00-09.
Note: I believe that if geometry type2 objects are used as subobjects, the name
must begin with '$', and the values cannot contain "Visible=false"
(having the name start with '$' will make it invisible). (Named '$' object must exist.) |
Animated textures
For a scrolling texture, set DeltaX and Delta. For animated texture, specify
some Anim00s. When the current animation Frame changes, all textures in the
object are replaced with the new Anim texture. Note that a model retains it's
original textures until the first frame change (which occurs after Interval
seconds).
|
float |
DeltaX |
0.0 |
For scrolling texture, X texture coords/second. |
float |
DeltaY |
0.0 |
For scrolling texture, Y texture coords/second. |
string |
Anim00, Anim01, ... |
0 |
If specified, defines an animated texture. Name of texture must be without path eg. "AnneHealth100.bmp". Can have up to Anim31. See also the trigger action "Texture Animate". |
int |
Frame |
0 |
Initial frame number. Note: even if this is specified, the model retails original textures until the animation first updates. |
int |
FreezeFrame |
-1 |
Stop animation when this frame is reached. -1 means don't stop, loop through the textures continuously. |
float |
Interval |
unknown |
Delay in seconds between changing animated texture, -1 to freeze. |
int |
TrackTwo |
0 |
(optional, default is one track only) Set first frame of second animation track If Frame gets to the end of the first track, it loops back to zero. If Frame gets to the last Anim frame, it loops to TrackTwo. Change tracks by setting Frame in the "Texture Animate" action. |
Visibility culling and image caching: |
float |
Culling |
unknown |
Don't draw if object is further away than this. |
float |
ShadowCulling |
unknown |
Don't draw shadow if object is further away than this. |
bool |
CacheIntersecting |
false |
? |
float |
CacheMul |
1.0 |
Cache object at further distance than normal (eg. 2, 3, 4). |
bool |
NoCache |
false |
Don't use an image cache for this object. |
string |
DetailShadow |
none |
Object to use for shadow. (Named object must exist.) |
int |
Priority |
unknown |
1,2,3 in original levels. Tied to video quality settings. (Not sure of exact usage, but eg. at low quality option, Priority 1 objects are not rendered, but Priority 3 objects are.) |
string |
Detail1 |
none |
LOD mesh. Specifies models (eg. with reduced detail) to use when object is less than a certain pixel size (specified by A00, A01). (Named '$' object must exist.) |
float |
A01 |
none |
See Detail1. (In original levels, A01 is always greater than A02. ie. A01 is larger pixel size so used when object is closer). |
string |
Detail2 |
none |
See Detail1. (Named '$' object must exist.) |
float |
A02 |
none |
See Detail1. |
CJoint
CAnimal (and Anne also) have joints, which have no Class specified, and are named
$J<objectname>XX where XX is the joint number (starting at 00). Basic joints have
a list A00, A01,... of vertices attached to the joint. "Double" joints also have
"int Anim00,Anim01" specifying parent joints, and "float Ratio,RotationRatio"
specfying an interpolation between the parent joints. (Not sure exactly how the
interpolation is done.)
Example:
group $JRaptorB05 = {
int A00 = 24
int A01 = 25
}
group $JRaptorB26 = {
int Anim00 = 7
int Anim01 = 6
float Ratio = 0.500000
float RotationRatio = 0.500000
int A00 = 0
int A01 = 1
int A02 = 2
int A03 = 15
}
CLightDirectional
Light direction is along the Z axis of the model. Not all levels have this. Always has "bool Visible = false". See also the trigger action "Renderer".
Example:
group DLight_JungleRoad = {
string Class = "CLightDirectional"
bool Visible = false
}
CMagnet
Magnets are used to create rotational joints, slide joints, attach a slave object to a
master, and attach master objects to Anne's hand or shoulder. See also the trigger action "Magnet".
(Suspected invalid value: "float RestoringForce", only specified once (=2.5) in original levels, not mentioned in exe.)
Type |
Name |
Default |
Description |
bool |
Breakable |
false |
If true, magnet can be broken (uses BreakStrength). |
float |
BreakStrength |
unknown |
1-150 in original levels. |
float |
Drive |
0.0 |
Rotational driving force if ZFree=true (X,Y too?). |
float |
Friction |
0.0 |
Rotational friction. |
bool |
HandPickup |
false |
Can Anne grab this magnet? Specify MasterObject only, and use Instance=true. Can specify a Substitute mesh for Anne. |
bool |
Instance |
false |
Apply to all instances of SlaveObject/MasterObject? |
string |
MasterObject |
none |
If not specified, slave is attached to world. (Named object must exist.) |
string |
SlaveObject |
none |
(Named object must exist.) |
bool |
ShoulderHold |
false |
This magnet will attach to Anne's shoulder. Specify MasterObject only, and use Instance=true. |
int |
Substitute |
none |
Substitute mesh for Anne if HandPickup. |
bool |
XFree, YFree, ZFree |
false |
Axes to allow rotation around. eg. ZFree for a door, all free for a swivel joint. Note that Trespasser ignores the MasterObject if any of these are true (ie. rotation joints can only be attached to the world). |
bool |
XTFree, YTFree, ZTFree |
false |
Axes to allow translation along. |
Possible additional values (but not used in original levels): AngleMin, AngleMax, Delta, Delay, Gender, Magnet, RestoreStrength, SlaveMagnet, X, Z.
CMuzzleFlash
Muzzle flashes are used by CGun.MFlashObject0, and are always of the form:
Example:
group FMFrifleMF03-00 = {
string Class = "CMuzzleFlash"
bool Unlit = true
bool Shadow = false
}
CParticles
Particle system definition. See a level for examples.
CSky
The sky object. Always has "bool MipMap = false". See also the trigger action "Sky".
Example:
group MySky-00 = {
string Class = "CSky"
bool MipMap = false
// MUST specify false, so sky texture is always loaded
int SkyFlatColour = 0 // Always 0 in original levels
}
CTerrainObj
Can have CInstance values Culling and SoundMaterial. (Also AI, CacheMul and CacheIntersecting, but I'm not sure if Trespasser uses those three). See also the trigger action "Terrain Renderer".
Type |
Name |
Default |
Description |
int |
Height |
must specify |
Specifies layering of terrain objects. Higher numbers are drawn on top of lower ones, base objects should have Height = 1. If terrain objects have the same height, they are drawn in an unspecified order, so best set the Heights appropriately. |
string |
SoundMaterial |
none |
|
Example:
group MyTrnobj-00 = {
string Class = "CTerrainObj"
int Height = 2
string SoundMaterial = "Terrain - Cement"
}
CWaterDisturbance
I assume that if an instance of this is placed by a CEntityWater object it creates some waves. A couple of instances of this class have some other values (like "Visible=false") but I think Trespasser ignores them.
Example:
group WaterDisturb1-00 = {
string Class = "CWaterDisturbance"
float Interval = 1.0 // Either 1,2,3 in original levels
float Strength = 0.1 // Either 0.1,0.2 in original levels
}
Player
This is Anne, the player in Trespasser. Not much to modify here, just use Anne from an existing level. Note that values in the script refer to Anne as "Player" instead of the instance name "Anne".
Player Settings
Specifies the sounds to use for Anne. Just copy from an existing level if needed.
Teleport
Teleport objects are the destinations for the "tnext" cheat. I'm not sure what the order of the teleports is, but most likely the order they're listed in the GRF regiontable. Teleports often contain other CInstance values, but I think Trespasser ignores them.
Example:
group TeleportA = {
string Class = "Teleport"
}
TerrainPlacement
Specifies the terrain file for the level. (The texture on this object sometimes looks like a render of the terrain objects of the whole level.)
Type |
Name |
Default |
Description |
string |
File |
must specify |
Name of terrain .WTD file, no extension. |
bool |
MipMap |
must be "false" |
Always false in the original levels. |
Example:
group TrnPlacement-00 = {
string Class = "TerrainPlacement"
string File = "be"
bool MipMap = false
}
<no Class specified>
If no "Class" value is specified, Trespasser seems to assume it's a CInstance. However, there is one special object which defines a color look up table. The name of the object follows a standard format for all the levels, but I don't know if that format is important. The object contains two groups:
Example:
group Trig_BEGlobalClut-00 = {
group DefaultClutStartColor = {
int B = 223
int G = 237
int R = 251
}
group DefaultClutStopColor = {
int B = 17
int G = 20
int R = 24
}
}
Triggers perform one or more actions when certain conditions are met.
The base class CBooleanTrigger evaluates a FireExpression monitoring the state of trigger instances.
All other trigger classes inherit CBooleanTrigger's values, and have additional contitions to determine when the trigger fires.
Example:
group InsideHouseTigger = {
string Class = "CLocationTrigger"
bool PlayerEnterTrigger = true
int ActionType = 34
string OverlayText = "You have entered the house"
}
CBooleanTrigger
Trigger fires when FireExpression evaluates to true. These values can be used by all other triggers.
Type |
Name |
Default |
Description |
int |
ActionType |
none |
Type of action(s) to perform when trigger fires. See the Trigger Actions section. |
int |
BoundVol |
0 |
Which bounding volume to use for trigger. Only used by CLocationTrigger and CCollisionTrigger. 0 = Sphere 1 = Cube |
int |
FireCount |
-1 |
Maximum number of times trigger should fire. -1 means any number of times. (See also ResetFire) |
float |
FireDelay |
0.0 |
When trigger is activated, wait this long before processing the actions. |
string |
FireExpression |
true |
Trigger only fires if this boolean expression is true. The expression evaluates the state of other triggers. Operators in the expression can be: "!" for NOT, "&" for AND, and "|" for OR. I think by default the expression checks if a trigger has ever fired, and putting "@" before the trigger name means check the current state. Not sure if there is any operator precedence or if brackets can be used.
eg. If Place1 etc. are all CLoactionTriggers: "Place1 & Place2" to check if player has been in both places, or "@InRoom | InShed" to check if player is currently in the room, OR was in the shed at some time in the past. |
int |
Probability |
100 |
Probability (0-100) that trigger will actually fire (ie. process the actions) when activated. (Not used in original levels) |
int |
ProcessStyle |
3 |
Used when there is more than one action to perform (see the Actions section). eg. For three actions the trigger contains sub-groups called Action00, Action01, Action02, and the ProcessStyle says when and in what order to execute the actions.
0 = |
Processes the actions in order immediately (ie. without waiting for an action to finish before moving on to the next). |
The remaining ProcessStyles all wait for the current action to finish before starting the next action. |
1 = |
Process actions in order, one action every time the trigger fires |
2 = |
Like 1 but process in random order |
3 = |
Process actions now, in order, once each |
4 = |
Process actions now, in random order, once each |
5 = |
Process actions now, in order, looping continuously |
6 = |
Process actions now, in random order, looping continuously |
|
float |
RepeatPeriod |
0.0 |
Time to wait before trigger can fire again. |
bool |
ResetFire |
false |
Reset fire count. ie. Make it as if this trigger hasn't fired yet, and allow the trigger to fire FireCount times all over again. |
bool |
FireAtZero |
false |
Use with ResetFire. |
float |
SequenceDelayMin |
unknown |
? Min/Max for a random delay between actions? |
float |
SequenceDelayMax |
unknown |
|
int |
AlphaChannel |
unknown |
Not used by Trespasser. See CInstance.AlphaChannel. |
CCollisionTrigger
Trigger fires when two objects collide.
Type |
Name |
Default |
Description |
string |
Element1 |
unknown |
If trigger has only one of Element1,2 set, then fire when that object hits anything else. If trigger has both of Element1,2 set, then fire only when those two collide. |
string |
Element2 |
unknown |
|
float |
MaxVelocity |
unknown |
? MaxVelocity=1.0 whenever it is set in the original levels. |
float |
MinVelocity |
unknown |
? (Not used in original levels) |
bool |
SoundMaterial1 |
false |
If true, Element1 is a SoundMaterial string and not an object. See CInstance.SoundMaterial. |
bool |
SoundMaterial2 |
false |
If true, Element2 is a SoundMaterial string and not an object. See CInstance.SoundMaterial. |
CCreatureTrigger
Trigger fires when a Anne or a CAnimal dies, wakes, or sleeps.
Type |
Name |
Default |
Description |
string |
A00, A01, ... |
must specify |
Name of creature(s) to monitor. (Named object must exist.) |
bool |
CreatureDie |
false |
If true, trigger fires when creature dies. |
bool |
CreatureSleep |
false |
If true, trigger fires when creature (physics) falls asleep. |
bool |
CreatureWake |
false |
If true, trigger fires when creature physics is awoken. |
bool |
EvaluateAll |
false |
? Only used once in original levels. I think false means "fire if any creature dies", and true means "fire only when all creatures are dead". |
Example:
group CreatureDie-00 = {
string Class = "CCreatureTrigger"
string A00 = "RaptorB-300"
bool CreatureDie = true
int ActionType = 34
string OverlayText = "Raptor died"
}
Probable additional values (but not used in original levels): CreatureWake, CreatureSleep, CreatureCriticalDamage, CreatureDamagePoints.
CLocationTrigger
Trigger fires when Anne or an object enters/is in/leaves a certain area.
Type |
Name |
Default |
Description |
bool |
PlayerEnterTrigger |
false |
If true, fire trigger when player enters. |
bool |
PlayerInTrigger |
false |
If true, fire trigger (constantly?) while player is in the bounding volume. Perhaps use RepeatPeriod to limit frequency. |
bool |
PlayerExitTrigger |
false |
If true, fire trigger when player exits. |
bool |
ObjectEnterTrigger |
false |
See PlayerEnter etc., but might use the TriggerActivate object. |
bool |
ObjectInTrigger |
false |
|
bool |
ObjectExitTrigger |
false |
|
string |
TriggerActivate |
none |
? Object that activates trigger. If not set, will any object fire the trigger? If set, do Player* flags still work? (Named object must exist.) |
bool |
PointTrigger |
true |
? Use (center) point for bounding volume of trigger? Or use point for bounding volume of object? |
Probable additional values (but not used in original levels): CreatureEnterTrigger, CreatureInTrigger, CreatureLeaveTrigger, CreatureEnterCount, CreatureLeaveCount.
CObjectTrigger
Fires when an object is picked up, put down, or "used" (eg. by pressing spacebar).
Type |
Name |
Default |
Description |
string |
A%d |
must specify |
Name of object(s) to monitor. (Named object must exist.) |
bool |
PickUpObject |
false |
If true, fire trigger when an object is picked up. |
bool |
PutDownObject |
false |
If true, fire trigger when an object is put down. |
bool |
UseObject |
false |
If true, fire trigger when an object is used. |
CSequenceTrigger
Fires when a sequence of things happen. See 'lab' level for some examples.
(@todo check this) Eg. If there are 5 SequenceOrderNames, the trigger waits until 5 triggers from the SequenceListenNames list have fired. Then, if the order they fired matches the order listed in SequenceOrderNames, the trigger fires. If the order does not match, SequenceFalseTriggerName fires.
Type |
Name |
Default |
Description |
group |
SequenceEvalNowNames |
unknown |
? Force evaluation of sequence if one of these triggers fires? |
string |
SequenceFalseTriggerName |
unknown |
Trigger name to fire if there's a bad sequence. |
group |
SequenceListenNames |
must specify |
List of triggers to monitor. |
group |
SequenceOrderNames |
must specify |
Order the monitored triggers must fire in. |
CStartTrigger
Trigger fires once when level starts.
CTimerTrigger
I think FireExpression is used to determine when this trigger fires. (Does the trigger fire continuously during the High time, or just on a transition?)
Type |
Name |
Default |
Description |
bool |
InitialState |
unknown |
? (Not used in original levels) |
float |
MaxHighTime |
unknown |
(@test) Once trigger fires, it is 'on' for a random amount of time between MinHighTime and MaxHighTime, then it turns off. |
float |
MinHighTime |
unknown |
|
float |
MaxLowTime |
unknown |
(@test) Trigger is 'off' for a random amount of time between MinHighTime and MaxHighTime, before turning on again. (Unless FireCount has been exceeded, then trigger stays off.) |
float |
MinLowTime |
unknown |
|
CVariableTrigger
I don't think this trigger ever fires, it's just a "boolean variable" that
can be controlled by the script (using ActionType 27), and can be used in other triggers' FireExpression.
Type |
Name |
Default |
Description |
bool |
Value |
must specify |
Initial state of trigger. Use ActionType 27 to change. |
Example:
group MyBooleanVariable-00 = {
string Class = "CVariableTrigger"
bool Value = true // Initial state
}
Actions that can happen when a trigger fires.
0 = "Play Voiceover"
1 = "Play Ambient Sound"
2 = "Play Music"
5 = "Fog"
6 = "Renderer"
7 = "Terrain Renderer"
9 = "Dino AI"
10 = "Physics"
11 = "Substitute Mesh"
13 = "Sky"
16 = "Load Level"
17 = "Creature"
18 = "Teleport"
19 = "Save Game"
20 = "Magnet"
21 = "Texture Animate"
22 = "Visibility"
23 = "Play Effect"
24 = "Wakeup"
25 = "Delay"
27 = "Set Variable"
28 = "Display Hint"
29 = "Audio Parameters"
31 = "End Game"
34 = "Display Text"
The type of action is specified in the ActionType value of a trigger. If there is only one action for a trigger, the ActionType and the action's values can simply be added into the trigger group:
group SimpleActionTrigger = {
string Class = "CStartTrigger"
int ActionType = 34
string OverlayText = "This trigger just displays some text."
}
If there is more than one action, the actions are specified as ActionXX groups, each containing one ActionType, and that action's values. The trigger may also contain a ProcessStyle value to specify how the multiple actions are to be executed:
group MultipleActionTrigger = {
string Class = "CStartTrigger"
int ProcessStyle = 3
group Action00 = {
int ActionType = 0
string Sample = "VA01"
}
group Action01 = {
int ActionType = 25
float Delay = 4.0
}
group Action02 = {
int ActionType = 34
string OverlayText = "This trigger plays a sound, waits 4 seconds,
then displays this text."
}
}
Some action types were not used in the original levels and their usage is unknown: 3, 4, 8, 12, 14, 15, 26, 30, 32, 33.
ActionType 0 = "Play Voiceover"
Play voiceover (from "Stream.tpa"). I think volumes are specified in Decibels (dB), in which case -10 = half volume.
Type |
Name |
Default |
Description |
string |
Sample |
must specify |
Name of sample to play from "Stream.tpa" file. |
float |
Attenuation |
unknown |
(0 or 1 in original levels) |
float |
Volume |
unknown |
(If set in original levels, it's always to -5) |
Possible additional values (but not used in original levels): Attach, BoundaryVolume, LoopCount, MaximumDistance, OutsideVolume, Mute, Frustum, Emitter, StopAfterFade, VolumeFader.
ActionType 1 = "Play Ambient Sound"
Play ambient sound (from "Ambient.tpa").
Type |
Name |
Default |
Description |
string |
Sample |
must specify |
Name of sample to play from "Ambient.tpa" file. |
float |
Attenuation |
unknown |
(0 or 1 in original levels) |
float |
Volume |
unknown |
(If set in original levels, it's always to -5) |
bool |
Looped |
false |
|
int |
SpatialType |
unknown |
? (If the original levels have this value, it's always 0) |
float |
MasterVolumeMin |
unknown |
A random volume between min and max is used. In original levels Min ranges from -25 to -3. |
float |
MaxVolumeDistance |
unknown |
(0.4 to 1.0 in original levels) |
string |
A00, A01, ... |
unknown |
? Used sometimes when ProcessStyle = 6. In which case the trigger has no Sample, and no list of Action00s. |
Possible additional values (but not used in original levels): Attach, BoundaryVolume, LoopCount, MaximumDistance, OutsideVolume, Mute, Frustum, Emitter, StopAfterFade, VolumeFader.
ActionType 2 = "Play Music"
Play music (from "Stream.tpa").
Type |
Name |
Default |
Description |
string |
Sample |
must specify |
Name of sample to play (from "Stream.tpa" file). |
float |
Attenuation |
unknown |
(0 or 1 in original levels) |
float |
Volume |
unknown |
(If set in original levels, it's always to -5) |
int |
SpatialType |
unknown |
? (If the original levels have this value, it's always 0) |
Possible additional values (but not used in original levels): Attach, BoundaryVolume, LoopCount, MaximumDistance, OutsideVolume, Mute, Frustum, Emitter, StopAfterFade, VolumeFader.
ActionType 5 = "Fog"
Set fog parameters. See also the trigger action "Sky".
Type |
Name |
Default |
Description |
float |
FogHalf |
unknown |
Original levels have 0.12, 0.22 |
float |
FogPower |
unknown |
Original levels have 0.8 |
int |
FogType |
unknown |
? Perhaps an int to select between linear, exp, and exp2 fog types. (Not used in original levels.) |
int |
R |
unknown |
Fog color component 0-255. |
int |
G |
unknown |
Fog color component 0-255. |
int |
B |
unknown |
Fog color component 0-255. |
ActionType 6 = "Renderer"
Set renderer parameters.
Type |
Name |
Default |
Description |
float |
AmbientLight |
unknown |
Original levels have 0.17, 0.2 |
float |
FarClipPlane |
unknown |
I think the fog is adjusted to max out at this distance. Value only used once in original levels (set to 500 in testscene). |
float |
NearClipPlane |
unknown |
(Not used in original levels.) |
Possible additional values (not used in original levels): AltSubdivisionLen, AltPixelError, SubdivisionLen, PixelError, NoLowRes, SoftwareOnly, HardwareOnly, Priority, CullMaxRadiusShadow, CullMaxDistShadow, CullMaxRadius, CullMaxDist, ShadowCulling, Culling.
ActionType 7 = "Terrain Renderer"
Set terrain renderer parameters.
Type |
Name |
Default |
Description |
float |
TrrPixelTol |
unknown |
? Original levels have 7-10 |
float |
TrrPixelTolFar |
unknown |
? Original levels have 50 |
bool |
TrrMovingShadows |
true |
False to not draw shadows while object is moving. (Not used in original levels.) |
float |
TrrNoDynTextureDist |
unknown |
? Original levels have 230 |
float |
TrrNoShadowDist |
unknown |
(Not used in original levels.) |
float |
TrrNoTextureDist |
unknown |
? Original levels have 230 |
ActionType 9 = "Dino AI"
Modify dinosaur behaviour.
Type |
Name |
Default |
Description |
string |
Target |
must specify |
Target dino (Named object must exist.) |
bool |
ActStayAway |
false |
If true use StayAwayMin|OK|Target |
float |
StayAwayMin |
unknown |
|
float |
StayAwayOK |
unknown |
|
string |
StayAwayTarget |
none |
(Named object must exist.) |
bool |
ActStayNear |
false |
If true use StayNearMax|OK|Target |
float |
StayNearMax |
unknown |
|
float |
StayNearOK |
unknown |
|
string |
StayNearTarget |
none |
(Named object must exist.) |
Various other AI values from CAnimal can also be set. Eg. Anger, Hunger etc.
ActionType 10 = "Physics"
Freeze, set velocity, or apply push to an object.
Type |
Name |
Default |
Description |
string |
Target |
must specify |
Name of instance to apply physics action to. (Named object must exist.) |
bool |
Frozen |
none |
Set Frozen state of target if specified. |
bool |
Impulse |
false |
If true then apply Push (otherwise use XYZ velocity, or always use XYZ too?). Requires Push and Emitter values. |
float |
Push |
unknown |
Force (or velocity?) to apply to target. |
string |
Emitter |
none |
Must be specified if Impulse=true. Push is applied in the direction of the Y axis of this instance. (Named object must exist.) |
float |
X |
0.0 |
Set X velocity of target if specified. |
float |
Y |
0.0 |
Set Y velocity of target if specified. |
float |
Z |
0.0 |
Set Z velocity of target if specified. |
ActionType 11 = "Substitute Mesh"
Change mesh used by object.
Type |
Name |
Default |
Description |
string |
Target |
must specify |
Name of instance to perform substitution on. (Named object must exist.) |
int |
Substitute |
must specify |
For target instance use mesh in value "A%d" of target instance, where %d is the this Substitute number. |
ActionType 13 = "Sky"
Set parameters of the sky. See also the trigger action "Fog".
Type |
Name |
Default |
Description |
float |
FogFar |
unknown |
Full fog after this value, what is it measured relative to? The clip planes? Around 0.85 in original levels. |
float |
FogNear |
unknown |
No fog before this value. Around 0.7 in original levels. |
float |
Height |
unknown |
Height of sky. Around 1000 in original levels. |
float |
Scale |
unknown |
? Usually 0.75 in original levels. |
int |
Subdivision |
32 |
32 in original levels. |
float |
WindspeedX |
0.8 |
Usually 0.8 in original levels. |
float |
WindspeedY |
1.8 |
Usually 1.8 in original levels. |
Values that were never used in the original levels: probably ScaleLimit, MinScale, MaxScale, FillScreen.
ActionType 16 = "Load Level"
Load a level.
Type |
Name |
Default |
Description |
string |
LevelName |
must specify |
Name of level to load (eg. "jr"). |
ActionType 17 = "Creature"
Modify health and other values of Anne and dinosaurs.
Type |
Name |
Default |
Description |
string |
ObjectName |
must specify |
Name of a CAnimal, or "Player" for Anne. (Named object must exist.) |
float |
Damage |
0.0 |
Amount to subtract from instance HitPoints? |
float |
HitPoints |
none |
If specified, set health of object. |
Possibly can set other values from CAnimals?
ActionType 18 = "Teleport"
Move object.
Type |
Name |
Default |
Description |
string |
ObjectName |
must specify |
Instance to teleport (Named object must exist.) |
string |
TeleportDestObjectName |
must specify |
Teleport destination (Named object must exist.) |
bool |
HeightRelative |
false |
|
bool |
SetPosition |
false |
|
bool |
SetOrientation |
false |
|
Values that were never used in the original levels: possibly OnTerrain.
ActionType 19 = "Save Game"
Creates a new savegame (eg. "Savegame.000") in the Trespasser directory. Doesn't include a
thumbnail though, so it's more like a .scn file than a savegame.
Type |
Name |
Default |
Description |
string |
LevelName |
Autosave.scn |
Not actually the level name, but rather the name that appears in the savegame list in the Load Level menu. Doesn't matter if name has occurred before, always creates another save game file. |
(This action was not used in the original levels.)
ActionType 20 = "Magnet"
Create (or disable?) a magnet. Probably can use any values from CMagnet (@test). Original
levels set the following CMagnet values: Drive, Enable, Friction, MasterObject, Target, ZFree. A couple
of triggers also set a "string Target" value, is that a typo?
Type |
Name |
Default |
Description |
bool |
Enable |
unknown |
|
ActionType 21 = "Texture Animate"
Set animated texture parameters.
Type |
Name |
Default |
Description |
string |
Target |
must specify |
Target object. Textures on all instances of the object's mesh are changed. (Named object must exist.) |
int |
Frame |
unknown |
Set animated texture frame number for target. See CInstance.Anim00 |
int |
FreezeFrame |
none |
If specified, set freeze frame for target (-1 for no freeze frame). |
float |
Interval |
none |
If specified, set animation interval for target (-1.0 to freeze). |
int |
TrackTwo |
none |
If specified, set start of second animation track for target. (Set to zero if want only one track?) |
Values that were never used in the original levels: possibly Toggle.
ActionType 22 = "Visibility"
Set visible/hidden state of object.
Type |
Name |
Default |
Description |
string |
ObjectName |
must specify |
Object to set Visible state of. (Named object must exist.) |
bool |
Visible |
must specify |
Object visibility state is set to this. |
bool |
Volume |
unknown |
? Unknown. Only set in one trigger, might be a typo. Perhaps affect all objects in bounding volume instead of just ObjectName? Or use bounding volume of objectName? |
ActionType 23 = "Play Effect"
Play effect sound (from "Effect.tpa"). Similar to action "Play Ambient Sound" but can attach to (move with) an object.
Type |
Name |
Default |
Description |
string |
Sample |
must specify |
Name of sample to play from "Ambient.tpa" file. |
float |
Attenuation |
unknown |
0,1,2 in original levels |
bool |
Attach |
false |
If true, sound is attached to (moves with) Emitter. |
string |
Emitter |
none |
See Attach. (Named object must exist.) |
ActionType 24 = "Wakeup"
Wake up dinos? It's only used once in original levels, in a trigger with name "TrigWakeupA-00".
ActionType 25 = "Delay"
Delay before moving to next action.
Type |
Name |
Default |
Description |
float |
Delay |
must specify |
Time to delay before moving to next action. |
ActionType 27 = "Set Variable"
Set (boolean) variable trigger state.
Type |
Name |
Default |
Description |
string |
TriggerName |
must specify |
Name of a CVariableTrigger (Named trigger must exist.) |
bool |
Value |
must specify |
Value to set trigger to. |
Values that were never used in the original levels: possibly Toggle.
ActionType 28 = "Display Hint"
Type |
Name |
Default |
Description |
int |
HintID |
must specify |
|
ActionType 29 = "Audio Parameters"
Set environmental audio parameters. Eg. Set default parameters
in a CStartTrigger, and then in CLocationTriggers to give different areas
special effects. Remember to set the defaults again when player leaves the area.
Type |
Name |
Default |
Description |
int |
AudioEnvironment |
unknown |
? A range of numbers, perhaps related to the data in .TPA files. |
float |
ReverbDamping |
unknown |
Ranges from 0 - 0.79 in original levels. |
float |
ReverbDecay |
unknown |
Ranges from 0.4 - 4.32 in original levels. |
float |
ReverbVolume |
unknown |
Ranges from 0.15 - 1.0 in original levels. |
ActionType 31 = "End Game"
End game and play 'win' movie. No other values for this action.
ActionType 34 = "Display Text"
Display text at top of screen.
Type |
Name |
Default |
Description |
string |
OverlayText |
must specify |
Text to display at top of screen |
float |
TextDisplayTime |
3.0 |
Period to display text for (in seconds) |
int |
TextPosition |
unknown |
Horizontal position of text: 0 = Left 1 = Center 2 = Right |
Values that were never used in the original levels:
TextDisplayTime, TextPosition (and possibly ResourceID, TextAtTop).
Page researched and created by Andres, with additional research by Rebel.