Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
BehavEd is a drag and drop interface for building scripts. On the left youll see the list of
ICARUS commands available to you. On the right is a column of buttons used for BehavEd
functions like loading and saving your scripts, quitting, copying and pasting commands, etc.
BehavEd Command Buttons
Actions
Add Add selected command to the script window (same as double-clicking on the command)
Delete Delete the selected line from the script
Edit Edit the selected line (same as double-clicking on the line)
Clone Copy the selected line and paste the copy on the next line
Copy Copy the selected line to the buffer
Paste Paste the line in the buffer to the line after the currently selected line
File
New Start a new script
Open Open an existing script
Append Append an existing script to the end of the one youre editing.
Save Save your script under its current name
Save As - Name and save your script
Application
Preferences Brings up the list of directories BehavEd should look fo certain files in.
About - Some information about BehavEd
Exit Quit BehavEd
Treeview Options
Show Types Turns on the showing of the types of all values and strings and table entries.
%g floats Shows all floats with several decimal places (default shows only decimal places used)
Compile! Process your script so that it is ready to be run in the game by ICARUS.
The Feedback Window
All errors and messaged related to compiling a script will appear in the bottom white window. If a
script compiled successfully you will see a smiley face and the text OK. Otherwise, it will report
the error.
ICARUS Command List
You can add a command to your script (displayed in the large central window) by either dragging
a command from this list to that window or double clicking on it. If you simply highlight a
command, information about it will appear just above the Feedback Window.
Key:
{} Indicates a command that can be expanded to contain other commands.
e A normal command
[] A macro, essentially a group of commands.
Commands:
(For detailed descriptions, see each commands individual description later in this document)
flush if
loop
affect run
wait
action sound move rotate use
kill
remove print
rem
declare free
get
random set
camera task
do
wait
dowait walkTo runTo
NOTE: The else command is not yet available in the BehavEd editor...
affect This command is used to send a block of commands to an entity other than the one
running the current script. For example:
Print( Hello, Fred!)
Affect ( Fred, FLUSH )
{
wait( 1000 )
print( Leave me alone! )
}
In the above example, the entity running the script will print Hello, Fred!, then tells fred to wait a
second and respond with Leave me alone!
The name (Fred) that you specify must be the script_targetname of the entity you wish to affect.
For NPCs, their script_targetname will be the same as the NPC_targetname you specify for them
in the map editor. For all other entities, you must specify a script_targetname if you intend to
affect them at some point.
The second parameter in the affect command decides whether you want to totally wipe out what
the entity was doing before or just insert the new command into what he was doing. The choices
are:
FLUSH Just like the flush command, will wipe out any script commands Fred might have been
waiting to process in favor of the new ones in the affect block.
INSERT Wherever Fred is in his script commands he is running, throw in these new commands.
So if Fred is sitting at a table and alternating between eating and looking around, this new
command will make him print Leave me alone! and allow him to continue eating and looking
around.
Its important to remember that an affect simply dumps commands onto another entity.
The script that has the affect in it will not wait for the commands inside the affect to finish.
For example:
Print( Hello, Fred!)
Affect ( Fred, FLUSH )
{
wait( 1000 )
print( Leave me alone! )
}
print( Damn you to Hell, Fred! )
This will not wait until Fred is done talking before printing Damn you to Hell, Fred!. What will
happen is something like this:
Hello, Fred!
Damn you to Hell, Fred!
Then, a second later, Fred will say:
Leave me alone!
This is because affects complete instantly for the script the affect is in. If you wanted the reply
to Fred to wait a second after Fred spoke, this is what you would do.
Print( Hello, Fred!)
Affect ( Fred, FLUSH )
{
wait( 1000 )
print( Leave me alone! )
}
wait( 2000 )
print( Damn you to Hell, Fred! )
The reason you wait two seconds is because you and Fred are now running your scripts
simultaneously. You have to wait for the one second before Fred speaks and wait another
second before you speak.
This is a very important rule and is easy to forget. Always remember: affects are not executed in
the script you are running, they are shoved onto another entity for them to execute!
run this command is used to run another script from inside a current script.
Say you have a script like so:
print( Hello World! )
run( test/response )
wait( 1000 )
print( Oh well, I give up. )
and a script named test/response like so:
wait( 1000 )
print( I said Helloooo World! )
What would happen when you ran the first script is this:
Hello World!
(wait a second)
I said Helloooo World!
(wait a second)
Oh well, I give up.
So, basically, all a run command does is insert a bunch of commands from another script into
your script where your run command is. This becomes useful when you have a block of
commands you want to execute from several different scripts. If you take these commands and
isolate them in one script, you can run them from any script you wish. This should save you
some time in not having to enter that command block over and over. This also makes fixing
errors and making changes in that block of commands much easier since you only have to make
a correction/change in one script, not several.
Macros
(walkTo, runTo, etc)
Macros are simply blocks of commands, grouped for convenience. Macros have no special
function. They can be useful for containing a large block of commands in a collapsible group so it
doesnt clutter up your editing window.
Tasks
(task, do, wait, dowait)
Tasks are a way of making your script wait for certain commands to finish before it
continues. This is useful for all sorts of scenarios. If, for example, you want an NPC to walk to a
button then use it, you must tell the script to wait for the NPC to get to the button before you tell
them to use the button. If you want to wait for an NPC to finish an animation or a certain line of
dialogue before changing your camera angle, you need to use a task.
The general format for creating a task is as such:
task ( TASKNAME )
{
commands
}
The TASKNAME is anything you want, though you should not use the same TASKNAME for two
different tasks.
To execute the commands in the task, use the command:
do ( TASKNAME )
This will start the commands in the task block you have identified by name.
When you want to pause script execution until the task is completed, use this command:
wait ( TASKNAME )
The script will not continue until all the commands in the task are completed. NOTE: If you use
the wait without using the do command first, your script will NEVER CONTINUE! In other
words, dont do that.
Often, you may find that you want to do a task then wait for it immediately. In this case, in
order to save some time, you can use this command:
dowait ( TASKNAME )
This will start the task blocks commands and then instantly pause script execution until that task
is complete.
It is important to know that while there are some commands that take some time to
complete (like getting to a navgoal or finishing a line of dialogue), most commands complete
immediately. In this document, any command that does NOT complete immediately is marked by
an asterisk (*). If you are going to make a task, you have to have at least one of these
commands in it, otherwise your task will complete as soon as you start it.
One of the most important things about tasks to remember is this: A task is unique to the
entity it is defined on. This means if you define a task on one entity and try to do the task on a
different entity, you will get an error that says cannot find task block TASKNAME.
For example:
task ( Go to the door )
{
commands
}
affect ( Fred, FLUSH )
{
dowait ( Go to the door);
}
Is incorrect. Fred has no idea whatsoever what the task Go to the door is, because that task
was defined on the entity that affected Fred, not on Fred himself!
The correct way:
affect ( Fred, FLUSH )
{
task ( Go to the door )
{
commands
}
dowait ( Go to the door);
}
This is a common error at first, but you will get used to it.
The final thing you should remember about tasks is you should define them only once.
You may execute the task as many times as you want, but define it only once.
For example:
loop ( 50 )
{
task ( Go to the door )
{
commands
}
dowait ( Go to the door);
}
Is incorrect. This is going to define the Go to the door task 50 times! What you want to do is:
task ( Go to the door )
{
commands
}
loop ( 50 )
{
dowait ( Go to the door);
}
This way, you define the task only once, but execute it 50 times, as you intended.
Sound Command
sound( CHANNEL, filename )
The sound command is used to play a sound. There are several channels you can play a
sound on. Playing a sound on a channel that is already in use will cut off the previous sound.
CHAN_AUTO
Auto-picks an empty channel to play sound on
CHAN_LOCAL
menu sounds, etc
CHAN_WEAPON
plays on weapon sound channel
CHAN_VOICE
Voice sounds cause mouth animation and attenuate slowly
CHAN_VOICE_ATTEN Causes mouth animation, use normal sound falloff (attenuates faster)
CHAN_ITEM
plays on item sound channel
CHAN_BODY
plays on body sound channel (footsteps, impact sounds, etc.)
CHAN_AMBIENT
added for ambient sounds
CHAN_LOCAL_SOUND chat messages, etc
CHAN_ANNOUNCER announcer voices, etc, plays globally
CHAN_LESS_ATTEN attenuates similar to chan_voice, but uses CHAN_AUTOs empty
channel auto-pick behavior
CHAN_MENU1,
menu stuff, etc
CHAN_VOICE_GLOBAL Causes mouth animation and is broadcast, like announcer
To wait for a voice sound to finish before continuing a script:
task( say hello )
{
sound( CHAN_VOICE, sound/voice/test/helloworld.wav )
}
print( Hello yourself! )
You can also wait for sounds played on CHAN_VOICE_ATTEN and CHAN_VOICE_GLOBAL
channels. You cannot wait for sounds played on any of the other channels.
Brush Manipulation Commands
(move, rotate)
The move command will make a brush move from a specified coordinate to a second coordinate
over a certain amount of milliseconds, like so:
move (<0 0 0>, <0 0 1000>, 1000 )
will make the brush move from the origin (at <0 0 0>) to 1000 map units above the origin over a
time of 1 second.
You may also use the get and tag commands to get the coordinates you want, like so:
move ( tag(spot1, ORIGIN), tag(spot2, ORIGIN), 1000 )
move ( get(VECTOR, parm1), get(VECTOR, parm2), 1000 )
More on the tag and get commands later
The rotate turns the brush to a specific angle over time, like so:
rotate( <0 90 0>, 1000 )
Turns brushs yaw to 90 over 1 second.
Note that a duration of 0 will make the brush turn/move to its new angles/position instantly.
10
CAMERA Commands
(enable, disable, move, pan, zoom, roll, follow, track, distance, fade, shake, path)
The camera commands are used for cinematics: scripted events in which the players
POV changes to a camera view, like a movie.
Enable This turns on camera mode. It changes the players view origin and angles to that of
the camera.
Disable - This turns off the camera and returns the players view origin and angles to that of
Munro.
Move This is used to move the camera to a specific spot or coordinate. This can be done one
of three ways:
camera( MOVE, <0 0 0>, 0 )
moves the camera to the coordinates <0 0 0>, the origin of the world
camera( MOVE, tag( cameraSpot1, ORIGIN ), 0 )
moves the camera to the spot in the map that the ref_tag named cameraSpot1 is located.
camera( MOVE, get( VECTOR, SET_ORIGIN ), 0 )
moves the camera to the origin of the current ent (or whatever vector is stored in whatever set
field or variable you get).
The last parameter controls how long (in milliseconds) it takes for the camera to get to the
specified position. A value of zero, as above, will move the camera there instantly. A value of
1000 will make the camera move from its current location toward the new location at a speed that
will get it to its final position in 1000 milliseconds (one second).
Pan This is used to change the cameras view angles. You can pan left, right, up, down and
even tilt the camera right or left.
Camera ( PAN, destinationAngle, panDirection, duration )
The general format is:
Camera( PAN, <0 0 0>, <0 0 0>, 0 )
The vectors values are: <pitch yaw roll>
The destinationAngle is the final angle you intend to finish at. The panDirection is the direction
you wish each axis to move in. Any value is valid, but it will only look to see if each axis direction
is positive or negative. A value of zero will make the camera find the shortest direction to pan in
to reach the destinationAngle.
Again, like the MOVE command, you can set this in three different ways:
camera( PAN, <0 0 0>, <1 1 1>, 0 )
camera( PAN, tag( cameraSpot1, ORIGIN ), <1 1 1>, 0 )
or
camera( PAN, get( VECTOR, SET_ORIGIN ), <1 1 1>, 0 )
11
A duration (last parameter) of 0 makes the camera immediately set its angles to those specified, a
longer duration will make the camera turn (pan) to the new angles.
Zoom Changes the FOV or focal length of the camera. Rather like zooming in or out.
Camera( ZOOM, 80, 0 )
The second value is the FOV of the camera you wish to use. 80 is the normal game FOV, 1 is
maximum zoom, and 120 is the widest angle you can have. The last parameter is the duration of
the zoom zero means instant and non-zero will make the cameras zoom change gradually over
the specified amount of milliseconds.
Roll This command will allow you to change just the roll of the camera without messing up the
other angles. The reason for the existence of this command is that a ref_tag cannot be easily set
up to store a roll value.
Camera( ROLL, 45, 0 )
A positive value tilts (rolls) the camera to the right, a negative value tilts it to the left. The last
value is the duration of the roll.
Follow Allows the camera to automatically aim itself at a group of entities.
camera( FOLLOW, cameraGroup, speed, initialLerp )
The cameraGroup is a string. Every entity with the same string in its cameraGroup will be
part of the scene. The camera will find the center of every actor in the scene and stay pointed
at the center of them. This is useful not just for following a moving actor but also for framing
groups of actors. To set someones cameraGroup, use the SET_CAMERA_GROUP command
(see the Set Command Variables section).
The second parameter is the cameras turning speed. The higher the turning speed, the better
the camera will keep up with the action. A value of zero will use the default camera turning speed
(100).
initialLerp is a true/false (1/0) command that will tell the camera to PAN from its current angle to
the angle that frames the scene youve requested (rather than just snapping to the angle). This is
where a slower or faster turning speed may come in handy it allows you to control the speed of
the initialLerp pan.
Track Makes the camera move along a path.
Camera( TRACK, trackName, speed, initialLerp )
The trackName should be the targetname of the first in a series of linked path_corners on your
map. The camera will move from path_corner to path_corner until it reaches the end. You may
target the last path_corner at whatever you want and the camera will fire it when it gets there.
The speed parameter determines how fast the camera moves on its track.
InitialLerp will make the camera MOVE from its current position to the start of the track you
specify. It will move at the speed you specify in this command.
When the camera gets to a path_corner, it will look at the next path_corner to see if the designer
has set a speed value on it in the map editor. If so, it will use that speed instead of the speed
12
set in this command. In this way you can make your camera move along its track at different
speeds as it progresses.
Distance Makes the camera keep a specific distance from its cameraGroups center.
Camera( DISTANCE, distance, initialLerp )
This command works in conjunction with the FOLLOW command, and usually the TRACK
command. The distance you specify tells the camera to speed up or slow down to maintain a
constant distance from the cameraGroup specified in the FOLLOW command. If the camera
is on a track, it will stay on the track and try to keep this distance (overriding any speed value set
by the TRACK command).
The initialLerp will make the camera speed up to get to the desired distance from the
cameraGroup rather than snap to it.
Fade Makes the camera change its RGB color and opacity from one value to another.
Camera( FADE, startRGB, startOpacity, endRGB, endOpacity, duration )
Very simply, used to create a colored overlay that can fade in and out. To do a simple fade to
black lasting 2 seconds:
Camera( FADE, <0 0 0>, 0, <0 0 0>, 1, 2000 )
You can also fade back from black, fade to/from white or whatever color you want, using the red
green and blue vector.
Shake Makes the camera shake for a certain amount of time.
Camera( SHAKE, intensity, duration )
intensity can be from 1 to 16.
duration is in milliseconds.
Path* - Makes camera follow a ROF path
Specify a ROF file for the camera to play. The camera will move along that ROF. This is
a command you can wait for completion on.
Camera( PATH, roff/bob.rof )
Get
Get( FLOAT/VECTOR/STRING, )
Anything you can set, you can get. Get is used to copy a value from one Set
field/variable to another and in if statements.
set(SET_PARM1, Fred)
if( get(STRING, SET_PARM1) = Fred )
{
print(Hello World!)
}
13
Note that you must specify what type of info you want to get from the variable whose
name you specify. This should match what youll be storing the get in or comparing it to. Valid
types are STRING, VECTOR and FLOAT.
In BehavEd, Get is accessed by hitting the helper button when youre editing a
command it will automatically pick the right type for you. For if statements in BehavEd, you
still have to type the whole get expression manually.
Variables
(global/local)
All variables must be declared before being used. Provide the type of the new variable
and the name.
declare( FLOAT, counter )
declare( VECTOR, position )
declare( STRING, myName )
You can then set the variable like so:
set( myName, Fred )
Then you can get the variable any time you want, for instance, in an if statement:
If ( get(STRING, myName) = Fred )
{
print( Hello, World! )
}
When youre done with the variable you can free it:
free( myName )
All variables are freed when the level ends, but you might want to free one yourself if youre
running low on available variables (there are 32 of each type available at a time).
Additionally, you can get info from a variable in set commands, as below:
set( SET_NAVGOAL, get(STRING, globalNavGoal) )
This way you could have some other script set the value of the globalNavGoal (it would be the
targetname of a navgoal), then someone else just has to run this generic script that would tell
them to go to whatever the globalNavGoal is. They would set the globalNavGoal like so:
set( globalNavGoal, FredsHome )
or, if that script is meant to be a generic script, they can use parms, like so:
set( globalNavGoal, get(STRING, SET_PARM1) )
This way you can have 50 ents use this script to set a navgoal to whatever their parm1 is.
Random
Random( minNumber, maxNumber )
14
This is a valuable function for getting some randomness in your scripts. Simply enter this
in a spot where a number would normally occur and it will pick a random number.
random( 0, 3.5 )
Will plug in a random number between 0 and 3.5.
The only way to access this in BehavEd is to hit the helper button next to float type edit boxes
and use the rnd button and edit fields (as described in the first section).
TAGs
TAG( targetname, ORIGIN/ANGLE )
In Q3Radiant, you can place objects called ref_tags. You can set an angle on them by
pointing them at an info_null or simply picking an angle. These ref_tags can then be used in
scripts as a nice way to get coordinates and angles without having to mess with actual numbers.
For example:
camera( MOVE, tag(cameraSpot1, ORIGIN), 0 )
This will move the camera to the origin of the tag with the targetname cameraSpot1.
You can also get angles from a tag:
camera( PAN, tag(cameraSpot1, ANGLES), <1 1 1>, 0 )
The general benefit of using this system is that you never have to tweak actual coordinates if you
want to just adjust the tag by eye or need to move whole parts of the map.
15
Set Command
set( SET_TABLE, value )
The set command is probably the most useful single command. Generically, this
function will simply change the value of whatever Set Variable you choose from the Table (in a
drop-down list in BehavEd). However, the different effects of changing these variables are widely
varied making this a powerful command.
Usage:
set( SET_BEHAVIORSTATE, BS_WANDER )
This simple command, for example, will make an NPC randomly wander throughout the waypoint
network on a level.
For the full list of Set Command Variables, see the next section.
A quick word about the SET_PARM variables:
There are eight of these- SET_PARM1 through SET_PARM8. These are meant to be generic
value holders, changing their value will do nothing in itself. Think of them as storage. Every
entity can store up to 8 values in these parms. They can be numbers, vectors or strings. The
main purpose of these are that they can also be set on an entity in the map editor. This has the
effect of allowing you to write one script that works slightly differently for a potentially infinite
number of entities who run it.
A simple example:
On your map, you have an NPC, who you want to walk between three navgoals, called nav1,
nav2, nav3, etc. Heres the script you would normally write:
set( SET_BEHAVIORSTATE, BS_DEFAULT )
set( SET_WALKING, true )
Loop( -1 )
{
task( walk to nav1 )
{
set( SET_NAVGOAL, nav1 )
}
task( walk to nav2 )
{
set( SET_NAVGOAL, nav2 )
}
task( walk to nav3 )
{
set( SET_NAVGOAL, nav3 )
}
}
Simple enough, your guy will now walk between the three navgoals forever.
Now you place another NPC whos supposed to walk between a totally different set of
three navgoals, point1, point2 and point3. Now, you could make a whole new script for this,
but it might be a good idea to just use the same exact one.
16
nav1
nav2
nav3
On the second NPC, walking to the point set of navgoals, set these values in the map editor:
parm1
parm2
parm3
point1
point 2
point 3
Then, both NPCs can run the same script, which looks like this:
set( SET_BEHAVIORSTATE, BS_DEFAULT )
set( SET_WALKING, true )
Loop( -1 )
{
task( walk to nav1 )
{
set( SET_NAVGOAL, get( STRING, SET_PARM1 ) )
}
task( walk to nav2 )
{
set( SET_NAVGOAL, get( STRING, SET_PARM2 ) )
}
task( walk to nav3 )
{
set( SET_NAVGOAL, get( STRING, SET_PARM3 ) )
}
}
Each get command will get the corresponding navgoal name that was stored in the entitys parms
in the map editor.
This allows you to re-use a script over and over. It might seem like more work at first, especially
for just these two NPCs, but if you start to have fifty NPCs all doing the same thing, youll soon
find that keeping track of one script and never having to write another is very helpful. These
scripts can be used for several NPCs on the same level and even NPCs on a totally different
level.
One thing to keep in mind is that if you are going to make several NPCs use the same script, be
very careful making changes to it, as it will affect every NPC using it. However, if you come to
find that you wish to (or need to) make a change, you will only have to change one script instead
of fifty!
17
Behavior Sets :
Set Field Name
SET_ANGERSCRIPT
SET_ATTACKSCRIPT
SET_AWAKESCRIPT
SET_BLOCKEDSCRIPT
Parm Type
script file path
script file path
script file path
script file path
SET_DEATHSCRIPT
SET_DELAYEDSCRIPT
SET_FFIRESCRIPT
SET_FFDEATHSCRIPT
SET_FLEESCRIPT
SET_LOSTENEMYSCRIPT
SET_MINDTRICKSCRIPT
SET_PAINSCRIPT
SET_SPAWNSCRIPT
SET_STUCKSCRIPT
SET_USESCRIPT
SET_VICTORYSCRIPT
Description
Run the first time an NPC acquires an enemy.
Script run when this entity attacks
Script run when entity is startled by an event.
Script run when entity is blocked by another
entity and unable to move.
Script run when you are killed. Note that if you
have SET_UNDYING set to true, this script will
execute when you get down to 1 health.
Script to run after a certain amount of time has
passed (see SET_DELAYSCRIPTTIME)
Script to run when player has shot own team
repeatedly
Script to run when player kills a teammate
Script to run when entity is hit and has less than
1/3 of its initial health
Script run when enemy cannot navigate to his
target and gives up.
Script to run when player uses jedi mind trick on
the NPC.
Script run when entity is hit, presuming
ignorepain is not set to true.
Script run when entity is spawned.
Script run when entity is blocked by world and
cannot manuever around in any way.
Script run when entity is used by another entity.
The field that must be set on an NPC for being
used by another entity is NPC_targetname. So
if you wanted a trigger to use an NPC, set the
triggers target key to Joe (for example) and
the NPCs NPC_targetname key to Joe. This
can be applied to non-NPCs as well.
Script run when entity kills someone.
18
Note that the script file path should strip off everything from Q:\quake\baseq3\real_scripts\ and
does not take a file extension. So if you wanted to use the script at
Q:\quake\baseq3\real_scripts\test\getmad.scr
The proper script file path would be:
test\getmad
Note that setting a script file path of NULL will simply clear the script slot altogether.
Note that these scripts execute every time the event happens, if you want it to run only once, you
must clear that behavior set slot in the script that it runs for that event.
EXAMPLE:
If you want someone to start unaware and then go into a hunt and kill behavior state the
first time theyre shot, do this:
Set ( SET_BEHAVIORSTATE, BS_DEFAULT );
Set ( SET_IGNOREALERTS, true );
Set ( SET_LOOK_FOR_ENEMIES, false );
Set ( SET_PAINSCRIPT, test\getmad );
And, the test/getmad script would look like this:
Set ( SET_IGNOREALERTS, false );
Set ( SET_LOOK_FOR_ENEMIES, true );
Set ( SET_PAINSCRIPT, NULL );
Behavior Set - Related Script Set Fields:
SET_DELAYSCRIPTTIME
int
How long in seconds to wait before executing the
delayedscript.
19
x y z
targetname
20
Note that most goals should usually be waypoint_navgoals, but you can specify any entity as a
goal.
SET_CAPTUREGOAL
targetname
SET_ENEMY
targetname
SET_LOCKEDENEMY
true/false
SET_PAINTARGET
targetname
SET_TARGET
SET_TARGET2
SET_TARGETNAME
SET_VIEWTARGET*
targetname
targetname
targetname
targetname
SET_NAVGOAL*
targetname
SET_AFFIRMNEGTARG
self/name
SET_ENEMYTEAM
SET_PLAYERTEAM
SET_REMOVE_TARGET
Team Table
Team Table
targetname
SET_LOCATION*
trigger msg
Animation Data :
SET_ANIM_UPPER*
Anim Table
SET_ANIM_LOWER*
Anim Table
SET_ANIM_BOTH*
Anim Table
SET_ANIM_HOLDTIME_LOWER*
int
SET_ANIM_HOLDTIME_UPPER*
int
SET_ANIM_HOLDTIME_BOTH*
int
SET_FACEAUX
float
SET_FACEBLINK
float
SET_FACEBLINKFROWN
float
SET_FACEFROWN
float
SET_FACENORMAL
float
SET_FACEEYESCLOSED
float
21
SET_FACEEYESOPENED
float
SET_ADDRHANDBOLT_MODEL
SET_REMOVERHANDBOLT_MODEL
SET_ADDLHANDBOLT_MODEL
SET_REMOVELHANDBOLT_MODEL
SET_SCALE
float
string
string
string
string
Behavioral :
SET_BEHAVIORSTATE
bState Table
22
SET_RUNNING
SET_WALKING
SET_CHASE_ENEMIES
SET_LOOK_FOR_ENEMIES
SET_FACE_MOVE_DIR
SET_DONT_FLEE
SET_FORCED_MARCH
SET_LOOK_TARGET
true/false
true/false
true/false
true/false
true/false
true/false
true/false
targetname
SET_SHOOTDIST
float
SET_VISRANGE
float
SET_HFOV
SET_VFOV
SET_EARSHOT
int
int
float
Stats :
Misc NPC-Specific:
SET_ICARUS_FREEZE
targetname
SET_ICARUS_UNFREEZE
targetname
23
true/false
true/false
true/false
true/false
true/false
true/false
24
SET_SABER_DEFENSE
SET_SABER_OFFENSE
force level
force level
All Entities
SET_COUNT
SET_WAIT
SET_PLAYER_USABLE
int
float
true/false
int
string
SET_CENTERTEXTCOLOR
string
SET_SCROLLTEXTCOLOR
string
Non-NPC Animation:
These commands are for use on misc_model_breakables only
SET_STARTFRAME
int
SET_ANIMFRAME
int
SET_ENDFRAME*
int
SET_LOOP_ANIM
true/false
SET_DISABLE_SHADER_ANIM true/false
SET_SHADER_ANIM
true/false
Other (do not affect entities):
SET_TIMESCALE
int
SET_PRECACHE
filename
25
string
26
TABLES
ANIM TABLE
Used by SET_ANIM_LOWER, SET_ANIM_UPPER, SET_ANIM_BOTH.
Note that not every animation listed here is guaranteed to exist in every skeleton!
Also: the description of certain generic animations (like gesture, etc) are not guaranteed to be the
same in each skeleton, they may in fact look quite different.
Read the included anims.h file in the gamesource directory where BehavEd is installed on your
machine. You can view the file in a text editor for the names and descriptions of the animations.
Also, those same comments appear in BehavEd when you select them from the animation list.
Behavior State Table
BS_DEFAULT
The default behavior for this NPC. This is what you will use 90% of the
time. Use the behavioral SET commands listed in the NPC-Only Set
Fields section to modify their behavior. NOTE: in JK2, an entitys
default behavior (BS_DEFAULT) is controlled by the weapon they have
equipped. If a Rodian has a disruptor, he acts like a sniper, if he has a
lightsaber, he acts like a jedi, etc.
BS_ADVANCE_FIGHT* Head to captureGoal and fight along the way, continues when reached
captureGoal.
BS_FOLLOW_LEADER Follow your leader and shoot any enemies you come across
BS_JUMP*
Face navgoal and jump to it
BS_REMOVE
Once the player is out of viewrange of the NPC, it will remove itself.
BS_SEARCH
From your homewaypoint, repeatedly search a random branch and
return.
BS_WANDER
Wander through the waypoint network aimlessly.
BS_NOCLIP
Moves through walls, etc.
BS_CINEMATIC
Does nothing but face it's angles and move to a goal if it has one
BS_SLEEP
NOT IMPLEMENTED
27
Weapons Table
Drop
WP_NONE
WP_SABER
WP_BRYAR_PISTOL
WP_BLASTER
WP_DISRUPTOR
WP_BOWCASTER
WP_REPEATER
WP_DEMP2
WP_FLECHETTE
WP_ROCKET_LAUNCHER
WP_THERMAL
WP_TRIP_MINE
WP_DET_PACK
WP_STUN_BATON
WP_MELEE
WP_EMPLACED_GUN
WP_BOT_LASER
WP_TURRET
WP_ATST_MAIN
WP_ATST_SIDE
WP_TIE_FIGHTER
WP_RAPID_FIRE_CONC
WP_BLASTER_PISTOL
TEAM_FREE
TEAM_PLAYER
TEAM_ENEMY
TEAM_NEUTRAL
No team
Player and his allies
All enemies
Most droids
Item Table
INV_ELECTROBINOCULARS
INV_BACTA_CANISTER
INV_SEEKER
INV_LIGHTAMP_GOGGLES
INV_SENTRY
Binoculars
Bacta Canister
Inquisitor
Lightamp Goggles
Portable Assault Sentry
Music States Table
DM_AUTO
DM_SILENCE
DM_EXPLORE
DM_ACTION
DM_BOSS
DM_DEATH
28