[script] event- / action-list


(nUllSkillZ) #1

Hi,

the following lists contain events and actions that I’ve found in the source code and in sock’s LDR.
I’ve posted a similar list some time ago at level-designer.de .
But I 've thought it would be a good idea to have these lists also here in the forums.

Note:
I’m not sure if all of these events and actions work.
And I don’t know which events/actions can be used in which entity.

events:


activate

buildstart

built

death

decayed

defused

destroyed

dynamited

failed

message

mg42

pain

playerstart

rebirth

spawn

stopcam

timelimit_hit

trigger

actions:


abortifnotsingleplayer

abortifwarmup

abortmove	// no parameter

//=================
accum	<buffer_index> <command> <paramater...>

// Commands:
// 	accum <n> inc <m>
//	accum <n> abort_if_less_than <m>
//	accum <n> abort_if_greater_than <m>
// 	accum <n> abort_if_not_equal <m>
// 	accum <n> abort_if_equal <m>
// 	accum <n> set <m>
// 	accum <n> random <m>
// 	accum <n> bitset <m>
// 	accum <n> bitreset <m>
// 	accum <n> abort_if_bitset <m>
// 	accum <n> abort_if_not_bitset <m>
// 	accum <n> trigger_if_equal <m> <s> <t>	// Gordon: added (12/06/02)
// 	accum <n> wait_while_equal <m>		// Gordon: added (12/06/02)

//=================

addtankammo

aiscriptname

// Arnout: modified to target multiple entities with the same targetname
alertentity	<targetname>

allowtankenter

allowtankexit	<yes|on|no|off>

// connect this entity onto the tag of another entity
attachtotag	<targetname/scriptname> <tagname>

attatchtotrain	<targetname> <length>

// nUllSkillZ: should be botdebugging
// nUllSkillZ: found: "BotDebugging ON/OFF // toggles bot debugging"
botgebugging

changemodel	<modelname>

construct	<targetname>

constructible_chargebarreq	<float:fraction>
constructible_class		<int:class>
constructible_constructxpbonus	<int:xppoints>
constructible_destructxpbonus	<int:xppoints>
constructible_duration		<int:duration>
constructible_health		<int:health>
constructible_weaponclass	<int:class>

//=================
cvar	<cvarName> <operation> <value>

// Operation can be any of:
// 	inc
// 	abort_if_less_than
// 	abort_if_greater_than
// 	abort_if_not_equal
// 	abort_if_not_equals
// 	abort_if_equal
// 	abort_if_equals
// 	bitset
// 	bitreset
// 	abort_if_bitset
// 	abort_if_not_bitset
// 	set
// 	random
// 	trigger_if_equal
// 	wait_while_equal
//=================

disablemessage

disablespeaker	<targetname>
enablespeaker	<targetname>

entityscriptname

// The entity will face the given angles, taking <duration> to get their.
// If the GOTOTIME is given instead of a timed duration, the duration calculated from the last gotomarker command will be used instead
faceangles	<pitch> <yaw> <roll> <duration/GOTOTIME> [ACCEL/DECCEL]

// Fades all sounds up or down, going from the current level to max or zero in 'time' milliseconds
fadeallsounds	[UP/DOWN] time

followpath	<direction 0(forward)|1(backward)> <splinename> <speed> [wait]

followspline	<direction 0(forward)|1(backward)> <splinename> <speed> [wait]

freezeanimation

//=================
globalaccum         <buffer_index> <command> <paramater...>

// Commands:
// 	globalAccum <n> inc <m>
// 	globalAccum <n> abort_if_less_than <m>
// 	globalAccum <n> abort_if_greater_than <m>
// 	globalAccum <n> abort_if_not_equal <m>
// 	globalAccum <n> abort_if_equal <m>
// 	globalAccum <n> set <m>
// 	globalAccum <n> random <m>
// 	globalAccum <n> bitset <m>
// 	globalAccum <n> bitreset <m>
// 	globalAccum <n> abort_if_bitset <m>
// 	globalAccum <n> abort_if_not_bitset <m>
// 	globalAccum <n> trigger_if_equal <m> <s> <t>	// Gordon: added (12/06/02)
// 	globalAccum <n> wait_while_equal <m>		// Gordon: added (12/06/02)

//=================

// NOTE: speed may be modified to round the duration to the next 50ms for smooth transitions
gotomarker	<targetname> <speed> [accel/deccel] [turntotarget] [wait] [relative <position>]

// Stop moving
halt	// no parameter

kill	<targetname>

// nUllSkillZ: mu = music
mu_fade		<target volume 0.0-1.0> <fadeout time>
mu_play		<musicfile> [fadeup time]
mu_queue	<musicfile>
mu_start	<musicfile> <fadeuptime>
mu_stop

// NOTE: all source animations must be at 20fps
playanim	<startframe> <endframe> [looping <FOREVER/duration>] [rate <FPS>]

// Currently only allows playing on the VOICE channel, unless you use a sound script.
// Use the optional LOOPING paramater to attach the sound to the entities looping channel.
playsound	<soundname OR scriptname> [LOOPING]

// Mostly for debugging purposes
print	<text>

// prints out the value of  accum 'accumNumber'
printaccum	<accumNumber>

// prints out the value of global accum 'globalaccumnumber'
printglobalaccum	<globalaccumnumber>

remapshader	<target shader> <new shader>

remapshaderflush	// no parameter

remove	// no parameter

// removes the bot called 'botname'
removebot	<botname>

repairmg42	<targetname>

// causes any currently running scripts to abort, in favour of the current script
resetscript

setaasstate

setautospawn	<target spawn> <team>

setbotgoalpriority

setbotgoalstate

setchargetimefactor	<team> <class> <factor>

setdamagable	<targetname> <0|1>

setdebuglevel

setglobalfog	<bool:restore> <int:duration> [float:r] [float:g] [float:b] [float:depthForOpaque]

sethqstatus	<team> <status>

SetInitialCamera	<camera filename> <black>

setmodelfrombrushmodel

setposition	<targetname> <default|invisible|underconstruction>

setrotation	<pitchspeed> <yawspeed> <rollspeed>

setspeed	<x> <y> <z> [gravity/lowgravity]

setstate

settankammo

spawnbot

spawnrubble	<spawnrubble>

startanimation	<startframe> <framecount> <fps> [norandom|nolerp|noloop]

// nUllSkillZ: commented out in "g_script.c"
// nUllSkillZ: double entry
// startcam	<camera filename> <black>

stopcam	// no parameter

stoprotation	// no parameter

// Stops any looping sounds for this entity.
stopsound	// no parameter

togglespeaker	<targetname>

// Calls the specified trigger for the given ai character or script entity
trigger	<aiName / scriptName> <trigger>

unfreezeanimation

wait	<duration> / random <min> <max>

wm_addteamvoiceannounce	<team> <soundname>

wm_allied_respawntime	<seconds>

wm_announce	<"text to send to all clients">

wm_announce_icon	<icon number> <"text to send to all clients">

wm_axis_respawntime	<seconds>

wm_endround

wm_number_of_objectives	<number>

wm_objective_status	<objective_number> <team> <status(0:blank|1:tick|2:cross)>

wm_removeteamvoiceannounce	<team> <soundname>

wm_set_defending_team

wm_set_main_objective	<objective_number> <team>

wm_set_round_timelimit	<number>

wm_setwinner	<team>

wm_teamvoiceannounce	<team> <soundname> 


(Chruker) #2

I have a scripting reference on my site, which also list all of those. Unfortunately the server is down at the moment due to a hardware failure.

Anyway, to comment about the list: The mg42 event is always followed by a mount or unmount parameter, so you could make these trigger functions, in the scriptblock of the script_mover:


// Called when a player is using the mounted MG
mg42 mount
{
}
	
// Called when a player is no longer using the mounted MG
mg42 unmount
{
}

Also for the accum command there is this special command:


accum <buffer_index> set_to_dynamitecount <targetname>
Sets the value in 'buffer_index' to the number of dynamite sticks thats has been planted at 'targetname'.
NOTE: This is only available for the accum command.


(Chruker) #3

test

Strange, when I submitted the previous reply I was redirected to the SplashDamage frontpage.


(nUllSkillZ) #4

I think this should be:


MG42_SCRIPTNAME_VALUE
{
	mount
	{
		// Called when a player is using the mounted MG
	}

	unmount
	{
		// Called when a player is no longer using the mounted MG
	}
}

Anyone used this?


(Chruker) #5

It is so long since I checked it, but if IRC the script event was ‘mg42 mount’ and ‘mg42 unmount’, just like there are ‘pain’, ‘death’ or ‘activate allies’ script events.

I remember checking if it works, and I had it writing something each time I used the MG.