/*
        BehavEd Command List

	(Note that anything involving floats must be (eg) "1.0", not just "1")
*/
//=== TYPES ================================================================
//header file type includes

// SOF2SPECIFIC: this typeset now MUST be present for BehavEd to present GET-helper combos!
<%s="SET_TYPES">
{
#include "IGInterface.h" setType_e
}

<%s="BOOL_TYPES">
{
	"OFF"
	"ON"
}

<%s="BOOL_TYPES_REL">
{
	"OFF"
	"ON"
	"NULL"
}

<%s="GOAL_REL">
{
	"STOP"
	"PAUSE"
	"GO"
}

<%s="LOOK_TYPES">
{
	"HEAD"
	"EYES"
	"FULL"
	"NULL"
}

<%s="HITLOC">
{
	"Head"
	"Right Leg"
	"Neck"
	"Left Leg"
	"Chest"
	"Right Foot"
	"Left Shoulder"
	"Left Arm"
	"Left Hand"
	"Right Shoulder"
	"Right Arm"
	"Right Hand"
	"Gut"
	"Groin"
	"Left Thigh"
	"Left Foot"
	"Right Thigh"
	"NULL"
}

<%s="SPEED">
{
	"1 - None"
	"2 - Slow"
    "3 - TakeYourTime"
	"4 - Jog"
	"5 - NoRush"
	"6 - FastJog"
	"7 - HurryUp"
	"8 - Run"
	"9 - FastRun"
	"10 - Emergency"		
}


<%s="TASK_TYPES">
{
	"WALK"//# uses finite state for walking
	"RUN"//# uses finite state for running
	"Path"//# plans path to navpoint using Lich
	"PathCrouch"//# plans path to navpoint using Lich, once there- goes to crouch spot
	"Move"//# moves to a specific point on map (NOT finite state driven)
	"MoveToEnt"//# moves to a specific entity on map
	"MoveToDeadEnt"//# movesto dead entity without stepping on it (do NOT use me if your name is not FOWLOR)
	"Teleport"//# teleports to point (NOT finite state driven)
	"Attack"//# fires weapon (might need to set Focus first)
	"Focus"//# focus on target (use SET_ENEMY to specify one, default is closest member of enemy team)
	"Use"//# Walk to this entity, then use it (use entgoal for name of entity)
	"Pickup"//# Walk to the closest pickup, and pick it up
	"Inventory"//# For inventory actions
}

<%s="GOAL_TYPES">
{
	"HoldArea"//# SQUAD: Move to this area using leapfrog and hold it (use areagoal)
	"FastAdvance"//# SQUAD: Move to this area quickly and hold it (use areagoal)_
	"Surround"//# SQUAD: Surround this opponent (use entgoal)
	"TakePosition"//# FIRETEAM/INDIVIDUAL: leap frog to this position (use vecgoal)
	"Recon"//	# FIRETEAM/INDIVIDUAL: Proceed to this area then recon/explore it (use areagoal)
	"Guard"//	# FIRETEAM/INDIVIDUAL: Patrol in this area (use areagoal)
	"Wander"//	# FIRETEAM/INDIVIDUAL: Wander this area (use areagoal)
	"Follow"//	# FIRETEAM/INDIVIDUAL: Follow this entity (use entgoal)
}

<%s="GOAL_MODES">
{
	"Stealth"//# Execute your teams goals all stealth-like (send out scouts first)
	"Rambo"//# Disregard stealth
	"Flank"//# Send 1/2 of the team to flank area.	 (use areagoal2)
}

<%s="INVENTORY_ACTION">
{
	"Draw"
	"Hold"	//# Will also draw if not currently drawn, then hold
	"Examine" //# Will also draw if not currently drawn, then examine
	"Use"//# Will also draw if not currently drawn, then use
	"Throw"//# Will also draw if not currently drawn, then throw
	"Holster"
	"Toss"//# Only for gun, tosses it out	
}

<%i="DECLARE_TYPE">
{
	FLOAT//## %s="" # A number
	STRING//## %s="" # A string
	VECTOR//## %s="" # A vector
}

<%i="CHANNELS">
{
#include "channels.h" soundChannel_e
}




<%s="SKEL">
{
	"Arms"  // # set animation arms
	"Torso" // # set animation torso
	"Body"  // # set animation body
	"Left Arm" // # set animation left arm
	"Eyes"     // # set eye animations

}

<%s="PRIM">
{
	"Attack" // # use Attack primitive
	"Damage" // # use Damage primitive
	"HMove" // # use HMOVE primitive
	"VMove" // # use VMOVE primitive
	"Stationary" // # use Stationary primitive
	"Inventory"	// # use Inventory primitive
	"Interaction" // # use Interaction primitive
	"Communication" // # use Communication primitive
}

<%s="HEALTH">
{
	"Dead"   // # use Dead Animations
	"Low"    // # use Low HP Animations
	"Medium" // # use Med HP Animations
	"Full"   // # use Full HP Animations
}
<%s="MOOD">
{
	"Bored"
	"Happy"
	"Sad"
	"Alert"
	"Afraid"
	"Stealth"
	"Soldier"
	"Normal"
	"AfraidFace"
	"NULL"
}
<%s="ITEM">
{
	"Hold Rifle"
	"None"         // # not holding anything
	"Hold Pistol"
}
<%s="STANCE">
{
	"Stand"
	"Crouch"
	"Prone"
	"Sit"
	"Jump"
	"Swim"
	"NULL"
}
<%s="HANDSIGNAL">
{
	"Advance"
	"Danger"
	"Disperse"
	"Follow"
	"Halt"
	"Point"
	"Rush"
	"Sight"
	"Slow"
	"Terrorist Point"
}
<%s="TEAM_TYPES">
{
	"Team_None"
	"Team_TheShop"
	"Team_Prometheus"
	"Team_ColombianRebels"
	"Team_Finca"
	"Team_Czech"
	"Team_HongKongGang"
}
<%s="ANIMNAME">
{
	"Fire M4"		// # name of Animation to use
	"Breathe"
	"Jog"
	"Jog Back"
	"Run"
	"Run Back"
	"Walk"
	"Swim"
	"Walk Back"
	"Walk030"
	"Walk060"
	"Walk090"
	"Walk150"
	"Walk210"
	"Walk240"
	"Walk270"
	"Walk300"
	"Walk330"
	"Crouch Fast Walk"
	"Crouch Run"
	"Crouch Slow Walk"
	"Crouch Walk"
	"Crouch Walk Back"
	"Advance"
	"Danger"
	"Disperse"
	"Follow"
	"Halt"
	"Point"
	"Rush"
	"Sight"
	"Slow"
	"Heli Piloting"
	"Heli Turning"
	"Fire"
	"ShootM60"
	"Hold"
	"Hold Death"
	"Neck Death"
	"Pain"
	"Left Leg Death"
	"Left Shoulder Death"
	"R Shoulder"
	"Right Thigh Death"
	"Left Thigh Death"
	"Groin Death"
	"Foot Death"
	"Front Death"
	"HeadPain"
	"Front Pain"
}

<%i="AFFECT_TYPE">
{
	FLUSH//# clears out affected entity's prior commands first
	INSERT//# inserts command into affected entity's current list
}

<%i="CAMERA_COMMANDS">
{
	ENABLE//## %% # Puts game in camera mode // no more parms
	DISABLE//## %% # Takes game out of camera mode //no more parms
	ZOOM//## %f="0.0" %d="0" # Normal is 80, 10 is zoomed in, max is 120.  Second value is time in ms to take to zoom to the new FOV
	MOVE//## %v="0.0 0.0 0.0" %d="0" # Move to a absolute vector origin or TAG("targetname", ORIGIN) over time over number of milliseconds
	PAN//## %v="0.0 0.0 0.0" %v="0.0 0.0 0.0" %d="0" # Pan to absolute angle from current angle in dir (no dir will use shortest) over number of milliseconds
	ROLL//## %f="0.0" %d="0" # Roll to relative angle offsets of current angle over number of milliseconds
	TRACK//## %s="trackName" %f="0.0" %d="0" # Get on track and move at speed, last number is whether or not to lerp to the start pos
	FOLLOW//## %s="cameraGroup" %f="0.0" %d="0" # Follow ents with matching cameraGroup at angleSpeed, last number is whether or not to lerp to the start angle
	DISTANCE//## %f="0.0" %d="0" # Keep this distance from cameraGroup (if any), last number is whether or not to lerp to the start angle
	FADE//## %v="0.0 0.0 0.0" %f="0.0" %v="0.0 0.0 0.0" %f="0.0" %d="0" # Fade from [start Red Green Blue], [Opacity] to [end Red Green Blue], [Opacity] (all fields valid ranges are 0 to 1) over [number of milliseconds]
	SHAKE//## %f="0.0" %d="0" # Intensity (0-16) and duration, in milliseconds
	PATH//## %s="filename" !!"S:\base\!!scripts\*.rof" # Play a ROFF on a camera
}

<%i="TAG_TYPE">
{
	ORIGIN
	ANGLES
}

<%s="PLAY_TYPES">
{
#include "IGInterface.h" playType_e
}



// these must be left in this order, since they mirror the order of icons in res/bitmap1.bmp
//
<%i="ICON_OVERRIDES">
{
	I_BRACE
	I_EVENT
	I_MACRO
	I_SPACE
	//
	I_SOUND
	I_CAMERA
	I_ROTATE
	I_REMOVE
	I_SET
	I_MOVE
	I_IF
	I_LOOP
	I_DO
	I_WAIT
	I_DOWAIT
	I_SIGNAL
	I_WAITSIGNAL
	I_FLUSH
	I_WAITCLOCK
}

//#=== Flow control commands ============================================

[I_FLUSH] flush();//# clear all previous script commands on ent
[I_IF] if ( $test expression =,<,>,! xxx$ ) {}	//# if condition true, execute block of commands
[I_IF] else () {} //# must immediately follow and else, will execute if the if condition is false

[I_LOOP] loop ( %d=-1 ) {}	//# execute block of commands any number of times (-1 = forever)

affect( %s="DEFAULT", %t="AFFECT_TYPE" )  {}//# switch script affect to ent with specified name, flush old commands or insert the new block of commands into current commands

run ( %s="DEFAULT" ); //# ent runs specified script

//#=== Standard commands ================================================

[I_WAITCLOCK] wait( %f=1000.0 );//# script will wait specified number of milliseconds
[I_WAITSIGNAL] waitsignal( %s="signalname" );//# wait until a signal() command is given with the name name - only one ent can wait for a particular signal
[I_SIGNAL] signal( %s="signalname" );//# The ent waiting for this signal will continue with it's script

//action( %s="DEFAULT", %s="DEFAULT" );//# no longer valid, but I'll leave it in for the moment for testing
[I_SOUND] sound( %t="CHANNELS", %s="DEFAULT" );//#  play sound on specified channel of ent

[I_MOVE] move ( %v=<0.0 0.0 0.0>, %f=1000.0 );//# Move ent from current location to <x,y,z> over time in milliseconds #Moves absolute to location
[I_MOVE] "moveBy"
{
	set( %s="SET_MOVE_BY" %s="0.0 0.0 0.0 1000.0"); //# Move ent from current location by <x,y,z> over time in milliseconds #Moves relative to location
}
[I_MOVE] "moveDir"
{
	set( %s="SET_MOVE" %s="0.0 0.0 0.0 500.0 1000.0"); //# Move ent from current location in direction of <x,y,z> with distance d over time in milliseconds #Moves relative to location
}
//[I_MOVE] move ( %v=<0.0 0.0 0.0>, %v=<0.0 0.0 0.0>, %f=1000.0 );//move ent from point to point at speed
//move ( $default$, $default$, %f=1000.0 );//move ent from point to point at speed
//[I_MOVE] move ( $default$, %f=1000.0 );//move ent from point to point at speed
[I_ROTATE] rotate( %v=<0.0 0.0 0.0>, %f=1000.0 );//# rotate ent to target angles at speed

use ( %s="DEFAULT" );//# uses specified ent
//use ( $get(STRING,"targetname")$ );//# uses specified ent from a get(STRING) command
//kill ( %s="DEFAULT" );//# kills ent with specified name
[I_REMOVE] remove ( %s="DEFAULT" ); //# removes ent with specified name from game

print( %s="DEFAULT" );//# Prints text to center of screen
rem(%s="comment");//# Just a comment for script, no actual effect in-game

//#=== Variable Handling ===============================================
declare( %t="DECLARE_TYPE", %s="variablename" );	//# declare a global variable here, limit of 16 per map

free( %s="variablename" );	//# free a global variable so you can make more

//get( %t="DECLARE_TYPE", %s="variablename" );	//# OF NO USE BY ITSELF - this will be removed soon, but is still usable inside other commands

random( %f=0.0, %f=0.0 );//# use a random float between 2 specified values. OF NO USE BY ITSELF - this will be removed soon, but is still usable inside other commands

//#=== Set commands =====================================================

//# standard strings
[I_SET] set( %t="SET_TYPES", %s="DEFAULT" );//# standard set commands
[I_SET] set( %s="variablename", %s="value" );//# set for variables
//[I_SET] set_anim_arms( %t="PRIM", %t="HEALTH", %t="ITEM", %t="MOOD", %t="STANCE", %t="ANIMNAME"); # set animation arms
//[I_SET] set_anim_torso( %t="PRIM", %t="HEALTH", %t="MOOD", %t="STANCE", %t="ANIMNAME"); # set animation torso
//[I_SET] set_anim_body( %t="PRIM", %t="HEALTH", %t="MOOD", %t="STANCE", %t="ANIMNAME"); # set animation body

//#Camera functions
[I_CAMERA] camera( %t="CAMERA_COMMANDS" );

//#Task functions

task( %s="DEFAULT" ) {}
[I_DO] do( %s="DEFAULT" )
[I_WAIT] wait( %s="DEFAULT" )		//# wait until task "taskname" is complete
wait( $random( 0, 1 )$ )	//# wait a specified amount of time

[I_DOWAIT] dowait( %s="DEFAULT" );	//# shorthand form of:   do("taskname");      wait("taskname")
play (%t="PLAY_TYPES", %s="default");

//#=== Macros ===========================================================
"WalkTo"
{
	set( %s="SET_TASK", %s="WALK" );
	set( %s="SET_NAVGOAL", %s="DEFAULT" );
}

"RunTo"
{
	set( %s="SET_TASK", %s="RUN" );
	set( %s="SET_NAVGOAL", %s="DEFAULT" );
}

"Path"
{
	set( %s="SET_TASK", %s="Path" );   //# Use Path for getting around corners
	set( %s="SET_NAVGOAL", %s="DEFAULT" );
}

"Crouch"
{
	set ( %s="SET_MOOD", %s="Stealth" );
	set ( %s="SET_STANCE", %s="Crouch" );

}

"Halt Hand Signal"
{
	set ( %s="SET_HAND_SIGNAL", %s="Halt" );

}






// Old 1st parm locked set commands, not needed any more:
/*
//# vectors
set( %r%s="SET_ORIGIN", %v=<0.0 0.0 0.0>);
set( %r%s="SET_ANGLES", %v=<0.0 0.0 0.0>);
set( %r%s="SET_COPY_ORIGIN", %v=<0.0 0.0 0.0>);

//# floats
set( %r%s="SET_VELOCITY",%f=0.0);
set( %r%s="SET_XVELOCITY",%f=0.0);
set( %r%s="SET_YVELOCITY",%f=0.0);
set( %r%s="SET_ZVELOCITY",%f=0.0);
set( %r%s="SET_AVELOCITY",%f=0.0);
set( %r%s="SET_DPITCH",%f=0.0);
set( %r%s="SET_DYAW",%f=0.0);
set( %r%s="SET_TIMESCALE",%f=0.0);
set( %r%s="SET_VISRANGE",%f=0.0);
set( %r%s="SET_EARSHOT",%f=0.0);
set( %r%s="SET_VIGILANCE",%f=0.0);

//# ints
set( %r%s="SET_ANIM_HOLDTIME_LOWER",%d=0);
set( %r%s="SET_ANIM_HOLDTIME_UPPER",%d=0);
set( %r%s="SET_HEALTH",%d=0);
set( %r%s="SET_WALKSPEED",%d=0);
set( %r%s="SET_RUNSPEED",%d=0);
set( %r%s="SET_YAWSPEED",%d=0);
set( %r%s="SET_FRICTION",%d=0);
set( %r%s="SET_SHOOTDIST",%d=0);
set( %r%s="SET_HFOV",%d=0);
set( %r%s="SET_VFOV",%d=0);
set( %r%s="SET_DELAYSCRIPTTIME",%d=0);
set( %r%s="SET_FORWARDMOVE",%d=0);
set( %r%s="SET_RIGHTMOVE",%d=0);
set( %r%s="SET_AGGRESSION",%d=0);//# 1 - 5
set( %r%s="SET_AIM",%d=0);//# 1 - 5

//# booleans and simple calls
set( %r%s="SET_SCRIPTED",%t="BOOL_TYPES");
set( %r%s="SET_HIDING",%t="BOOL_TYPES");
set( %r%s="SET_IGNOREPAIN",%t="BOOL_TYPES");
set( %r%s="SET_IGNOREENEMIES",%t="BOOL_TYPES");
set( %r%s="SET_STRAIGHTTOGOAL",%t="BOOL_TYPES");
set( %r%s="SET_DONTSHOOT",%t="BOOL_TYPES");
set( %r%s="SET_NOTARGET",%t="BOOL_TYPES");
set( %r%s="SET_CROUCHED",%t="BOOL_TYPES");
set( %r%s="SET_WALKING",%t="BOOL_TYPES");
set( %r%s="SET_CAREFUL",%t="BOOL_TYPES");
set( %r%s="SET_UNDYING",%t="BOOL_TYPES");
set( %r%s="SET_NOAVOID",%t="BOOL_TYPES");
set( %r%s="SET_BEAM",%t="BOOL_TYPES");
set( %r%s="SET_CREATEFORMATION",%t="BOOL_TYPES");

//# Behavior state settings
set( %r%s="BSTATE", %t="BSTATE_STRINGS" );
set( %r%s="defaultBState", %t="BSTATE_STRINGS" );
set( %r%s="tempBehavior", %t="BSTATE_STRINGS" );

//# Animation settings
set( %r%s="anim_upper", %t="ANIM_NAMES" );
set( %r%s="anim_lower", %t="ANIM_NAMES" );
set( %r%s="anim_both", %t="ANIM_NAMES" );

//#Enemy team table
set( %r%s="playerTeam", %t="TEAM_NAMES" );
set( %r%s="enemyTeam", %t="TEAM_NAMES" );

//#Weapon table
set( %r%s="weapon", %t="WEAPON_NAMES" );

//#Lean side table
set( %r%s="LEAN", %t="LEAN_TYPES" );//# left, right, or none

//#Event/effect table
set( %r%s="event", %s="default" );//# not implemented

//Old hardcoded camera commands
camera( %r%s="ORIGIN", %v=<0.0 0.0 0.0> );
camera( %r%s="ANGLES", %v=<0.0 0.0 0.0> );
camera( %r%s="FOV", %f=0.0 );
camera( %r%s="MOVE", %v=<0.0 0.0 0.0>, %f=0.0 );
camera( %r%s="PAN", %v=<0.0 0.0 0.0>, %f=0.0 );
camera( %r%s="ZOOM", %f=0.0, %f=0.0 );
camera( %r%s="FADE", %v=<0.0 0.0 0.0>, %f=0.0, %v=<0.0 0.0 0.0>, %f=0.0, %f=0.0 );
camera( %r%s="ENABLE" );
camera( %r%s="DISABLE" );
*/

