MOHAA GAME Module Classes(3)
watchactor( Entity actor_to_watch )
Makes the player's camera watch the specified actor.
weapdrop
Drops the player's current weapon.
weapnext
Cycle to player's next weapon.
weapprev
Cycle to player's previous weapon.
whatis( Integer entity_number )
Prints info on the specified entity.
wuss
Gives player all weapons.
zoomoff
makes sure that zoom is off
PlayerAlliedDeathmatchStart (info_player_allied) → PlayerDeathmatchStart → PlayerStart → SimpleArchivedEntity → SimpleEntity → Listener → Class
PlayerAxisDeathmatchStart (info_player_axis) → PlayerDeathmatchStart → PlayerStart → SimpleArchivedEntity → SimpleEntity → Listener → Class
PlayerDeathmatchStart (info_player_deathmatch) → PlayerStart → SimpleArchivedEntity → SimpleEntity → Listener → Class
arena( Integer arena_number )
set the arena number for this starting position
PlayerIntermission (info_player_intermission) → Camera → Entity → SimpleEntity → Listener → Class
PlayerStart (info_player_start) → SimpleArchivedEntity → SimpleEntity → Listener → Class
angle( Float newAngle )
set the angles of the entity using just one value.
Sets the yaw of the entity or an up and down
direction if newAngle is [0-359] or -1 or -2
disablespawn
forbids spawning from this spawnpoint
enablespawn
allows spawning from this spawnpoint
PortableTurret → TurretGun → Weapon → Item → Trigger → Animate → Entity → SimpleEntity → Listener → Class
clipsize( Integer ammoClipSize )
Set the amount of rounds a clip of the weapon holds
item_droptofloor
Drops the item to the ground.
PortalCamera (portal_camera) → Entity → SimpleEntity → Listener → Class
roll( Float roll )
Sets the portal camera's roll.
PortalSurface (portal_surface) → Entity → SimpleEntity → Listener → Class
locatecamera
Locates the camera position.
Projectile (projectile) → Animate → Entity → SimpleEntity → Listener → Class
addownervelocity( Boolean bool )
Set whether or not the owner's velocity is added to the projectile's velocity
addvelocity( Float velocity_x, Float velocity_y, Float velocity_z )
Set a velocity to be added to the projectile when it is created
arctotarget
Make the projectile follow a normal arc on its way to its target
avelocity( [ String [random|crandom] ], [ Float yaw ], [ String [random|crandom] ], [ Float pitch ], [ String [random|crandom] ], [ Float roll ] )
set the angular velocity of the projectile
beam( String command, [ String arg1 ], [ String arg2 ], [ String arg3 ], [ String arg4 ], [ String arg5 ], [ String arg6 ] )
send a command to the beam of this projectile
becomebomb
Make the projectile into a bomb
bouncesound
Set the name of the sound that is played when the projectile bounces
bouncesound_hard
Set the name of the sound that is played when the projectile bounces off hard surfaces
bouncesound_metal
Set the name of the sound that is played when the projectile bounces off metal
bouncesound_water
Set the name of the sound that is played when the projectile bounces in water
bouncetouch
Make the projectile bounce when it hits a non-damageable solid
canhitowner
Make the projectile be able to hit its owner
chargelife
set the projectile's life to be determined by the charge time
chargespeed
set the projectile's speed to be determined by the charge time
clearowner
Make the projectile be able to hit its owner now
dlight( Float red, Float green, Float blue, Float intensity )
set the color and intensity of the dynamic light on the projectile
dmlife( Float projectileLife )
set the life of the projectile in DM
doTouch( Entity touchingEntity )
sent to entity when touched.
drunk( Float amount, Float rate )
Make the projectile drunk
explode
Make the projectile explode
explodeontouch
Make the projectile explode when it touches something damagable
explosionmodel( String modelname )
Set the modelname of the explosion to be spawned
fuse
set the projectile's life to be determined by the charge time
heatseek
Make the projectile heat seek
hitdamage( Float projectileHitDamage )
set the damage a projectile does when it hits something
impactmarkorientation( Float degrees )
Set the orientation of the impact mark
impactmarkradius( Float radius )
Set the radius of the impact mark
impactmarkshader( String shader )
Set the impact mark of the shader
killed( Entity attacker, Integer damage, Entity inflictor, Vector position, Vector direction, Vector normal, Integer knockback, Integer damageflags, Integer meansofdeath, Integer location )
event which is sent to an entity once it as been killed
Location values:
-1 General
0 Pelvis
1 Lower Torso
2 Mid Torso
3 Upper Torso
4 Neck
5 Head
6 RUpperArm
7 RForearm
8 RHand
9 LUpperArm
10 LForearm
11 LHand
12 RThigh
13 RCalf
14 RFoot
15 LThigh
16 LCalf
17 LFoot
knockback( Float projectileKnockback )
set the knockback of the projectile when it hits something
life( Float projectileLife )
set the life of the projectile
meansofdeath( String meansOfDeath )
set the meansOfDeath of the projectile
minlife( Float minProjectileLife )
set the minimum life of the projectile (this is for charge up weapons)
minspeed( Float minspeed )
set the minimum speed of the projectile (this is for charge up weapons)
notouchdamage
Makes the projectile not blow up or deal damage when it touches a damagable object
prethink
Make the projectile think to update it's velocity
removewhenstopped
Make the projectile get removed when it stops
smashthroughglass( Integer speed )
Makes the projectile smash through windows & other damageble glass objects when going above a set speed
speed( Float projectileSpeed )
set the speed of the projectile
stopped
sent when entity has stopped bouncing for MOVETYPE_TOSS.
updatebeam
Update the attached beam
ProjectileGenerator (ProjectileGenerator) → Animate → Entity → SimpleEntity → Listener → Class
Accuracy( Float Accuracy )
Accuracy 0-25 feet
Default=10
BeginCycle
Startup the cycle..
Cycles( Integer Cycles )
Number of cycles. 0=infinte
Default=0
doActivate( Entity activatingEntity )
General trigger event for all entities
EndCycle
End the cycle..
FireOnStartUp
Default=1; Set this to 0 if you don't want the PG to fire on startup.
gettargetentity
Returns entity being targeted by the projectile generator,
ID( Integer ID )
Sets the ID for this projectile generator
Default=0:
initialize
Initialize object
isturnedon
Returns whether the generator is on or off.
launchsound( String Sound )
Set a launch sound for the projectile.
MaxDelay( Float MaxDelay )
Maximum time between bursts
Default=10
MaxDuration( Float MaxDuration )
Sets the maximum duration of bursts(in seconds)
Default=3
MaxNumShots( Integer MaxNumShots )
Sets the maximum # of shots to fire in a cycle
Default=1
MinDelay( Float MinDelay )
Minimum time between bursts.
MinDuration( Float MinDuration )
Sets the minimum duration of the bursts (in seconds)
Default=3
MinNumShots( Integer MinNumShots )
Sets the minimum # of shots to fire in a cycle
Default=1
Model( String Model )
Projectile model to use.
Default=models/projectiles/bazookashell.tik
target( String targetname_to_target )
target another entity with targetname_to_target.
TickCycle
Tick the cycle..
TurnOff
Turn Off and cancel the current cycle (if any)
TurnOn
Turn On and begin the first cycle
ProjectileGenerator_Gun (ProjectileGenerator_Gun) → ProjectileGenerator → Animate → Entity → SimpleEntity → Listener → Class
bulletcount( Float bulletCount )
Set the number of bullets this weapon shoots when fired
bulletdamage( Float bulletDamage )
Set the damage that the bullet causes
bulletknockback( Float bulletKnockback )
Set the knockback that the bullet causes
bulletlarge( Integer bulletType )
Set if the bullets fired are rifle bullets(1), artillery(2) or larger tracers(3)
bulletrange( Float bulletRange )
Set the range of the bullets
bulletspread( Float bulletSpreadX, Float bulletSpreadY, [ Float bulletSpreadXmax ], [ Float bulletSpreadYmax ] )
Set the min & optional max spread of the bullet in the x and y axis
fakebullets( Boolean useFakeBullets )
Whether or not the projectile generator should fire real bullets.
firedelay( Float fFireDelay )
Set the minimum time between shots from the weapon
ID( Integer ID )
Sets the ID for this projectile generator
Default=0:
meansofdeath( String meansOfDeath )
Set the meansOfDeath of the weapon.
throughmetal( Float dist )
Sets how far the bullets can go through metal
throughwood( Float dist )
Sets how far the bullets can go through wood
tracerfrequency( Integer frequenct )
Set the frequency of making tracers
tracerspeed( Float speed )
Scale factor of how fast a tracer should travel (valid ranges 0-2)
ProjectileGenerator_Heavy (ProjectileGenerator_Heavy) → ProjectileGenerator → Animate → Entity → SimpleEntity → Listener → Class
projectile( String projectileModel )
Set the model of the projectile that this weapon fires
ProjectileGenerator_Projectile (ProjectileGenerator_Projectile) → ProjectileGenerator → Animate → Entity → SimpleEntity → Listener → Class
arc( Float arc )
arc in front of the player
isdonut( Integer isdonut )
will target donut
maxdonut( Float maxdonut )
max extent of donut from player
mindonut( Float mindonut )
min extent of donut from player
playpreimpact
Play a pre-impact sound
preimpactsound( String Sound )
Set a pre-impact sound.
preimpactsoundprob( Float probability )
Set the chance for a pre-impact sound to occur.
Range: ( 0.0, 1.0 ), with 0 having no chance, and 1 always occurring.
preimpactsoundtime( Float delay )
Set the time before impact to play the preimpact sound.
projectile( String projectileModel )
Set the model of the projectile that this weapon fires
ProjectileTarget (ProjectileGenerator_Target) → Entity → SimpleEntity → Listener → Class
ID( Integer ID )
Sets the ID for this projectile generator
Default=0:
PuffDaddy (plant_puffdaddy) → Animate → Entity → SimpleEntity → Listener → Class
doTouch( Entity touchingEntity )
sent to entity when touched.
idle
Animates the puff daddy.
PushObject (func_pushobject) → Entity → SimpleEntity → Listener → Class
dmg( Integer damage )
Set the damage.
doBlocked( Entity obstacle )
sent to entity when blocked.
pushsound( String sound )
Set the pushing sound
start
Sets up the pushobject.
Rain (func_rain) → Entity → SimpleEntity → Listener → Class
RandomSpawn (func_randomspawn) → Spawn → ScriptSlave → Mover → Trigger → Animate → Entity → SimpleEntity → Listener → Class
doActivate( Entity activatingEntity )
General trigger event for all entities
max_time( Float maxTime )
Maximum time between random spawns.
min_time( Float minTime )
Minimum time between random spawns.
RandomSpeaker (sound_randomspeaker) → TriggerSpeaker → TriggerPlaySound → Trigger → Animate → Entity → SimpleEntity → Listener → Class
chance( Float newChance<0.00...1.00> )
Sets the chance that the sound will play when triggered.
maxdelay( Float max_delay )
Sets the maximum time between playings.
mindelay( Float min_delay )
Sets the minimum time between playings.
triggereffect( Entity triggering_entity )
Send event to owner of trigger.
ReSpawn (func_respawn) → Spawn → ScriptSlave → Mover → Trigger → Animate → Entity → SimpleEntity → Listener → Class
RotatingDoor (func_rotatingdoor) → Door → ScriptSlave → Mover → Trigger → Animate → Entity → SimpleEntity → Listener → Class
doclose
Closes the door (special doors).
doopen( Entity other )
Opens the door (special doors).
openangle( Float open_angle )
Sets the open angle of the door.
RunThrough (func_runthrough) → Entity → SimpleEntity → Listener → Class
chance( Float chance )
chance that trigger will spawn something.
delay( Float delay )
time between RunThrough being activated.
doTouch( Entity touchingEntity )
sent to entity when touched.
lip( Float lip )
distance below trigger we should spawn things.
offset( Vector spawn_offset )
When triggered, what to offset the spawned object by.
spawnmodel( String model_to_spawn )
When triggered, what to spawn.
speed( Float speed )
threshold speed at which RunThrough is activated.
Script → Class
ScriptAimedStrafingGunfire (script_aimedstrafinggunfire) → ScriptSimpleStrafingGunfire → ScriptSlave → Mover → Trigger → Animate → Entity → SimpleEntity → Listener → Class
aimtarget
Set the aim target.
fire
Fire.
ScriptClass → Listener → Class
ScriptDoor (script_door) → Door → ScriptSlave → Mover → Trigger → Animate → Entity → SimpleEntity → Listener → Class
angle( Float newAngle )
set the angles of the entity using just one value.
Sets the yaw of the entity or an up and down
direction if newAngle is [0-359] or -1 or -2
doclose
Closes the door (special doors).
doinit
Sets up the script door.
doopen( Entity other )
Opens the door (special doors).
movedir
door's movedir
opendot
door's open dot product
startangles
door's size
startorigin
door's startorigin
ScriptMaster → Listener → Class
alias( String alias, String realPath, [ String arg1 ], [ String arg2 ], [ String arg3 ], [ String arg4 ], [ String arg5 ], [ String arg6 ] )
Create an alias to the specified path
aliascache( String alias, String realPath, [ String arg1 ], [ String arg2 ], [ String arg3 ], [ String arg4 ], [ String arg5 ], [ String arg6 ] )
Create an alias to the specified path and cache the resource
cache( String resourceName )
pre-cache the given resource.
ScriptModel (script_model) → ScriptSlave → Mover → Trigger → Animate → Entity → SimpleEntity → Listener → Class
angle( Float newAngle )
set the angles of the entity using just one value.
Sets the yaw of the entity or an up and down
direction if newAngle is [0-359] or -1 or -2
anim( String anim_name )
Sets the script model's animation
animdone
Script model animation has finished.
model( String modelName )
set the model to modelName.
moveanim( String animName )
Makes the script model play an animation and move with the deltas contained in the animation
moving_from_anim
The script model is moving based on an animation
ScriptModelRealDamage (script_model_realdamage) → ScriptModel → ScriptSlave → Mover → Trigger → Animate → Entity → SimpleEntity → Listener → Class
damage( Entity attacker, Integer damage, Entity inflictor, Vector position, Vector direction, Vector normal, Integer knockback, Integer damageflags, Integer meansofdeath, Integer location )
general damage event used by all entities
Location values:
-1 General
0 Pelvis
1 Lower Torso
2 Mid Torso
3 Upper Torso
4 Neck
5 Head
6 RUpperArm
7 RForearm
8 RHand
9 LUpperArm
10 LForearm
11 LHand
12 RThigh
13 RCalf
14 RFoot
15 LThigh
16 LCalf
17 LFoot
ScriptOrigin (script_origin) → ScriptSlave → Mover → Trigger → Animate → Entity → SimpleEntity → Listener → Class
model( String modelName )
set the model to modelName.
ScriptSimpleStrafingGunfire (script_simplestrafinggunfire) → ScriptSlave → Mover → Trigger → Animate → Entity → SimpleEntity → Listener → Class
bulletcount( Float bulletCount )
Set the number of bullets this weapon shoots when fired
bulletdamage( Float bulletDamage )
Set the damage that the bullet causes
bulletknockback( Float bulletKnockback )
Set the knockback that the bullet causes
bulletrange( Float bulletRange )
Set the range of the bullets
bulletspread( Float bulletSpreadX, Float bulletSpreadY, [ Float bulletSpreadXmax ], [ Float bulletSpreadYmax ] )
Set the min & optional max spread of the bullet in the x and y axis
fire
Fire.
firedelay( Float fFireDelay )
Set the minimum time between shots from the weapon
off
Turn the gunfire off.
on
Turn the gunfire on.
projectile
Set the projectile model
throughmetal( Float dist )
Sets how far the bullets can go through metal
throughwood( Float dist )
Sets how far the bullets can go through wood
tracerfreq
Set the frequency of the tracers
ScriptSkyOrigin (script_skyorigin) → ScriptSlave → Mover → Trigger → Animate → Entity → SimpleEntity → Listener → Class
ScriptSlave (script_object) → Mover → Trigger → Animate → Entity → SimpleEntity → Listener → Class
angle( Float newAngle )
set the angles of the entity using just one value.
Sets the yaw of the entity or an up and down
direction if newAngle is [0-359] or -1 or -2
angles( Vector angles )
Sets the angles.
bind( Entity parent )
bind this entity to the specified entity.
closeportal
Close the area portal enclosed in this object
damage( Entity attacker, Integer damage, Entity inflictor, Vector position, Vector direction, Vector normal, Integer knockback, Integer damageflags, Integer meansofdeath, Integer location )
general damage event used by all entities
Location values:
-1 General
0 Pelvis
1 Lower Torso
2 Mid Torso
3 Upper Torso
4 Neck
5 Head
6 RUpperArm
7 RForearm
8 RHand
9 LUpperArm
10 LForearm
11 LHand
12 RThigh
13 RCalf
14 RFoot
15 LThigh
16 LCalf
17 LFoot
dmg( Integer damage )
Set the damage.
doActivate( Entity activatingEntity )
General trigger event for all entities
doBlocked( Entity obstacle )
sent to entity when blocked.
doTouch( Entity touchingEntity )
sent to entity when touched.
doUse( Entity activatingEntity )
sent to entity when it is used by another entity
endpath
Stop following the path
explode( Float damage )
Creates an explosion at the script slave's position
flypath( Entity array, Float speed, Float acceleration, Float look_ahead )
Makes the script slave fly the specified path with speed and acceleration until reached_distance close to position
followpath( Entity path, [ String arg1 ], [ String arg2 ], [ String arg3 ], [ String arg4 ], [ String arg5 ], [ String arg6 ] )
Makes the script slave follow the specified path. The allowable arguments are ignoreangles,
ignorevelocity, normalangles, loop, and a number specifying the start time.
jumpto( String vector_or_entity )
Jump to specified vector or entity.
model( String modelName )
set the model to modelName.
modifyflypath( Float speed, Float acceleration, Float look_ahead )
Makes the script slave fly the specified path with speed and acceleration until reached_distance close to position
move
Move the script slave.
moveBackward( Float dist )
Move the position backward.
moveDown( Float dist )
Move the position down.
moveEast( Float dist )
Move the position east.
moveForward( Float dist )
Move the position forward.
moveLeft( Float dist )
Move the position left.
moveNorth( Float dist )
Move the position north.
moveOffset( Vector dist )
Move the position by the offset vector.
moveRight( Float dist )
Move the position right.
moveSouth( Float dist )
Move the position south.
moveto( String vector_or_entity )
Move to the specified vector or entity.
moveUp( Float dist )
Move the position up.
moveWest( Float dist )
Move the position west.
next
Goto the next waypoint.
normalangles( Boolean bUseNormalAngles )
Sets the object to use normal angles when travelling on a spline path
notshootable
Makes the script slave not shootable
openportal
Open the area portal enclosed in this object
path_relativeyaw( Float relativeYaw )
Makes the script slave follow the specified path with a yaw offset,
physics_off
Turn physics off this script object on
physics_on( [ Integer no_collide_entity ] )
Turn physics on this script object on
If no_collide_entity is set to 1 then the script slave will not collide with other entities
physics_velocity( Vector impulseVector )
Add a physical impulse to an object when it is being physically simulated
rotateaxis( Integer axis, Float avelocity )
Rotate about the specified axis at the specified angular velocity.
rotateaxisdown( Integer axis, Float angle )
Rotate the specified axis down by the specified amount.
rotateaxisdownto( Integer axis, Float angle )
Rotate the specified axis down to angle.
rotateaxisup( Integer axis, Float angle )
Rotate the specified axis up by the specified amount.
rotateaxisupto( Integer axis, Float angle )
Rotate the specified axis up to angle.
rotatedownto( Vector direction )
Rotate down to the specified direction.
rotateto( Vector direction )
Rotate to the specified direction.
rotateupto( Vector direction )
Rotate up to the specified direction.
rotateX( Float avelocity )
Rotate about the x axis at the specified angular velocity.
rotateXdown( Float angle )
Rotate the x down by the specified amount.
rotateXdownto( Float angle )
Rotate the x down to angle.
rotateXup( Float angle )
Rotate the x up by the specified amount.
rotateXupto( Float angle )
Rotate the x up to angle.
rotateY( Float avelocity )
Rotate about the y axis at the specified angular velocity.
rotateYdown( Float angle )
Rotate the y down by the specified amount.
rotateYdownto( Float angle )
Rotate the y down to angle.
rotateYup( Float angle )
Rotate the y up by the specified amount.
rotateYupto( Float angle )
Rotate the y up to angle.
rotateZ( Float avelocity )
Rotate about the z axis at the specified angular velocity.
rotateZdown( Float angle )
Rotate the z down by the specified amount.
rotateZdownto( Float angle )
Rotate the z down to angle.
rotateZup( Float angle )
Rotate the z up by the specified amount.
rotateZupto( Float angle )
Rotate the z up to angle.
scriptslave_followingpath
Called every frame to actually follow the path
scriptslave_movedone
Called when the script slave is done moving
setdamage( Integer damage )
Set the damage.
setmeansofdeath( String means_of_death )
Set the damage means of death.
speed( Float speed )
Sets the speed.
stop
Stop the script slave.
threadmove( String label )
Move the script slave and create thread which waits until finished.
time( Float travel_time )
Sets the travel time.
trigger( Entity ent )
Trigger entities target.
unbind
unbind this entity.
waitmove
Move the script slave and wait until finished.
ScriptThread → Listener → Class
abs( Float arg )
Absolute value of int or float
addobjective( Integer objective_number, Integer status, [ String text ], [ Vector location ] )
Adds/Changes an Objective
aliascache( String alias, String realPath, [ String arg1 ], [ String arg2 ], [ String arg3 ], [ String arg4 ], [ String arg5 ], [ String arg6 ] )
Create an alias to the specified path and cache the resource
all_ai_off
Turns all AI off.
all_ai_on
Turns all AI back on.
angles_pointat( Entity parent_entity, Entity entity, Entity target_entity )
Returns the angles that points at the target_entity given the base orientation of the parent_entity and the position of the entity.
angles_toforward( Vector angles )
Returns the forward vector of the specified angles
angles_toleft( Vector angles )
Returns the left vector of the specified angles
angles_toup( Vector angles )
Returns the up vector of the specified angles
assert( Float value )
Assert if value is 0.
bool( Integer value )
Casts value to a bool.
bsptransition( String next_map )
Transitions to the next BSP. Keeps player data, and game data.
cache( String resource_name )
Cache the specified resource.
cam( String command, [ String arg1 ], [ String arg2 ], [ String arg3 ], [ String arg4 ], [ String arg5 ], [ String arg6 ] )
Processes a camera command.
centerprint( String stuffToPrint )
prints the included message in the middle of all player's screens
cinematic
Turns on cinematic.
clear_objective_pos
Clears the position of the current objective, for when you don't have one
clearfade
Clear the fade from the screen
clearletterbox( Float time )
Clears letterbox mode.
CreateListener
Creates a Listener instance.
cuecamera( Entity entity, [ Float switchTime ] )
Cue the camera. If switchTime is specified, then the camera
will switch over that length of time.
cueplayer( [ Float switchTime ] )
Go back to the normal camera. If switchTime is specified,
then the camera will switch over that length of time.
debug_int3
Generate an asm int 3
debugline( Vector start, Vector end, [ Float red ], [ Float green ], [ Float blue ], [ Float alpha ] )
Draws a debug line from start to end using the given color and alpha for g_numdebuglinedelays server frames
delaythrow( String label )
Internal usage.
dprintln( String string )
Prints a debug string.followed by a newline.
drawhud( Integer value )
Specfiy if hud is to be drawn: 0 draws nothing, 1 draws all and 2 draws all minus the weapons bar.
earthquake( Float duration, Float magnitude, Float no_rampup, Float no_rampdown )
Create an earthquake
end
End the thread.
entity( Integer value )
Casts value to an entity.
error( String message, Integer level )
Generate a script error with specified message and stack level
exec( String script )
Executes the specified script.
exec( String script )
Executes the specified script.
fadein( Float time, Float red, Float green, Float blue, Float alpha, [ Integer mode ] )
Sets up fadein in values.
fadeout( Float time, Float red, Float green, Float blue, Float alpha, [ Integer mode ] )
Sets up fadeout values.
fadesound( Float time )
fades the sound out over the given time.
float( Integer value )
Casts value to a float.
forcemusic( String current, [ String fallback ] )
Forces the current and fallback (optional) music moods.
freezeplayer
Freeze the player.
getboundkey1( String keyname )
return a string describing the key
getboundkey2( String keyname )
return a string describing the key
getcvar( String name )
getcvar
goto( String label )
Goes to the specified label.
hidemenu( String name, [ Integer bForce ] )
hide menu, with option to force it off
hidemouse
hide mouse cursor
huddraw_align( Integer index, String h_align, String v_align )
Sets the alignment of a huddraw element. Specified with 'left', 'center', or 'right'
huddraw_alpha( Integer index, Float alpha )
Sets the alpha of a huddraw element.
huddraw_color( Integer index, Float red, Float green, Float blue )
Sets the color for a huddraw element
huddraw_font( Integer index, String fontname )
Sets the font to use.
huddraw_rect( Integer index, Integer x, Integer y, Integer width, Integer height )
Specifies the position of the upper left corner and size of a huddraw element
huddraw_shader( Integer index, String shader )
Sets the shader to use for a particular huddraw element
huddraw_string( Integer index, String string )
Sets a string to be displayed. Clears the shader value.
huddraw_virtualsize( Integer index, Integer virtual )
Sets if the huddraw element should use virutal screen resolution for positioning and size
int( Integer value )
Casts value to an int.
iprintln( String string )
Prints a string.followed by a newline.
iprintln_noloc( String string )
Prints a string.followed by a newline with no localization conversion.
iprintlnbold( String string )
Prints a string.followed by a newline in a bold/important way.
iprintlnbold_noloc( String string )
Prints a string.followed by a newline in a bold/important way with no localization conversion.
IsAlive( Entity ent )
Returns true if the specified entity exists and has health > 0.
killclass( String class_name, [ Integer except ] )
Kills everything in the specified class except for the specified entity (optional).
killent( Integer ent_num )
Kill the specified entity.
letterbox( Float time )
Puts the game in letterbox mode.
leveltransition( String next_map )
Transitions to the next Level. Statistics to Map Loading, does not keep player data or game data.
loc_convert_string( String in )
returns a localized version of the string.
locprint( Integer xoffset, Integer yoffset, String stuffToPrint )
prints the included message in the specified location of all player's screens
map( String map_name )
Starts the specified map.
missionfailed( Integer novideofade )
Makes the player fail their mission, level restarts.
missiontransition( String next_map )
Transitions to the next Mission. Statistics to Main Menu, Next Level should be unlocked.
mprint( String string )
Prints a string.
mprintln( String string )
Prints a string.followed by a newline.
music( String current, [ String fallback ] )
Sets the current and fallback (optional) music moods.
musicvolume( Float volume, Float fade_time )
Sets the volume and fade time of the music.
noncinematic
Turns off cinematic.
pause
Pauses the thread.
PlayMovie( String name )
Play a Movie...
popmenu( Integer index )
pop menu
print( String string )
Prints a string.
print3d( Vector origin, String string, [ String [strings] ] )
prints a string in 3D space
println( String string )
Prints a string.followed by a newline.
pushmenu( String name )
push menu
radiusdamage( Vector origin, Float damage, Float radius, Integer constant_damage )
radius damage at origin
randomfloat( Float max )
randomfloat
randomint( Integer max )
randomint
releaseplayer
Release the player.
removeclass( String class_name, [ Integer except ] )
Removes everything in the specified class except for the specified entity (optional).
removeent( Integer ent_num )
Removes the specified entity.
restoremusicvolume( Float fade_time )
Restores the music volume to its previous value.
restoresoundtrack
Restores the soundtrack to the previous one.
self
self
server( [ String arg1 ], [ String arg2 ], [ String arg3 ], [ String arg4 ], [ String arg5 ], [ String arg6 ] )
Server only command.
set_objective_pos( Vector pos )
Sets the position in the world of the current objective
setcurrentobjective( Integer objective_number )
Sets the specified objective as the current objective
setcvar( String cvar_name, String value )
Sets the value of the specified cvar.
setlightstyle( Integer lightstyleindex, String lightstyledata )
Set up the lightstyle with lightstyleindex to the specified data
showmenu( String name, [ Integer bForce ] )
show menu, with option to force it on
sighttrace( Vector start, Vector end, [ Integer pass_entities ], [ Vector mins ], [ Vector maxs ] )
Performs a trace line from the start to the end, returns 0 if something was hit and 1 otherwise
soundtrack( String soundtrack_name )
Changes the soundtrack.
spawn( String entityname, [ String keyname1 ], [ String value1 ], [ String keyname2 ], [ String value2 ], [ String keyname3 ], [ String value3 ], [ String keyname4 ], [ String value4 ] )
Spawn the specified entity.
spawn( String entityname, [ String keyname1 ], [ String value1 ], [ String keyname2 ], [ String value2 ], [ String keyname3 ], [ String value3 ], [ String keyname4 ], [ String value4 ] )
Spawn the specified entity.
string( Integer value )
Casts value to a string.
stuffcmd( [ String arg1 ], [ String arg2 ], [ String arg3 ], [ String arg4 ], [ String arg5 ], [ String arg6 ] )
Server only command.
teamwin( String axis_or_allies )
Sets that the 'axis' or the 'allies' have won the map.
thread( String label )
Creates a thread starting at label.
thread( String label )
Creates a thread starting at label.
throw( String label )
Throws to the specified label.
timeout( Float time )
specifies script timeout time
trace( Vector start, Vector end, [ Integer pass_entities ], [ Vector mins ], [ Vector maxs ] )
Performs a Trace Line from the start to the end, returns the end or the position it hit at
trigger( String name )
Trigger the specified target or entity.
vector_add( Vector vector1, Vector vector2 )
Returns vector1 + vector2
vector_closer( Vector vec_a, Vector vec_b, Vector vec_c )
returns 1 if the first vector is closer than the second vector to the third vector
vector_cross( Vector vector1, Vector vector2 )
Returns vector1 x vector2
vector_dot( Vector vector1, Vector vector2 )
Returns vector1 * vector2
vector_length( Vector vector )
Returns the length of the specified vector.
vector_normalize( Vector vector )
Returns the normalized vector of the specified vector.
vector_scale( Vector vector1, Float scale_factor )
Returns vector1 * scale_factor
vector_subtract( Vector vector1, Vector vector2 )
Returns vector1 - vector2
vector_toangles( Vector vector1 )
Returns vector1 converted to angles.
vector_within( Vector position1, Vector position2, Float distance )
returns 1 if the two points are <= distance apart, or 0 if they are greater than distance apart
wait( Float wait_time )
Wait for the specified amount of time.
waitframe
Wait for one server frame.
ScriptVariableList → Class
Sentient → Animate → Entity → SimpleEntity → Listener → Class
activatenewweapon( [ String handsurf ] )
Activate the new weapon specified by useWeapon. handsurf allows specifying which hand to use for the player
american
Makes the sentient an American.
ammo( String type, Integer amount )
Gives the sentient some ammo.
armor( String type, Integer amount )
Gives the sentient some armor.
blockend
Is the end of the sentient's block.
blockstart
Is the start of the sentient's block.
bloodmodel( String bloodModel )
set the model to be used when showing blood
charge( [ String hand ], [ String mode ] )
Starts the charging of the weapon in the specified hand
checkanims
Check the animations in the .tik file versus the statefile
damage( Entity attacker, Integer damage, Entity inflictor, Vector position, Vector direction, Vector normal, Integer knockback, Integer damageflags, Integer meansofdeath, Integer location )
general damage event used by all entities
Location values:
-1 General
0 Pelvis
1 Lower Torso
2 Mid Torso
3 Upper Torso
4 Neck
5 Head
6 RUpperArm
7 RForearm
8 RHand
9 LUpperArm
10 LForearm
11 LHand
12 RThigh
13 RCalf
14 RFoot
15 LThigh
16 LCalf
17 LFoot
damagemult( Integer location, Float multiplier )
Sets the damage multiplier for a particular body location
deactivateweapon( String side )
Deactivate the weapon in the specified hand.
dontdropweapons
Make the sentient not drop weapons
dropitems
drops inventory items
fire( [ String hand ], [ String mode ] )
Fires the weapon in the specified hand.
german
Makes the sentient a German.
give( String name )
Gives the sentient the targeted item.
givedynitem( String model, String bonename )
Pass the args to the item
item( String type, Integer amount )
Gives the sentient the specified amount of the specified item.
jumpxy( Float forwardmove, Float sidemove, Float speed )
Makes the sentient jump.
maxgibs( Integer max_number_of_gibs )
Sets the maximum amount of generic gibs this sentient will spawn when hit.
maxmouthangle( Float max_mouth_angle )
Sets the max mouth angle.
meleeattackend
Is the end of the sentient's melee attack.
meleeattackstart
Is the start of the sentient's melee attack.
noshadow
Turns off the shadow for this sentient.
onfire
Called every frame when the sentient is on fire.
pophelmet
Pops a sentient's helmet off if he's got one
putawayweapon( String whichHand )
Put away or deactivate the current weapon, whichHand can be left, right or dual.
releasefire( Float fireholdtime )
Releases the attack in the time specified.
reloadweapon( [ String hand ] )
Reloads the weapon in the specified hand
sethelmet( String tikifile, Float popspeed, Float dmgmult, String surfacename, String [optional )
Gives the sentient a helmet and sets the needed info for it
shadow
Turns on the shadow for this sentient.
spawnbloodygibs( [ Integer number_of_gibs ], [ Float scale ] )
Spawns some bloody generic gibs.
stopfire( [ String hand ] )
Stops the firing of the weapon in the specified hand.
stoponfire
Stops the sentient from being on fire.
stunend
Is the end of the sentient's stun.
stunstart
Is the start of the sentient's stun.
take( String item_name )
Takes away the specified item from the sentient.
takeall
Clears out the sentient's entire inventory.
team
returns 'german' or 'american'
threatbias( Integer bias )
Sets the threat bias for this player / AI
threatbias
Gets the threat bias for this player / AI
threatbias( Integer bias )
Sets the threat bias for this player / AI
toggleitem
Toggles the use of the player's item (first item if he has multiple)
use( String name, [ Integer weapon_hand ] )
Use the specified weapon or item in the hand choosen (optional).
uselast
Activates the last active weapon
useweaponclass( String weaponclass, [ Integer weapon_hand ] )
Use the weapon of the specified class in the hand choosen (optional).
weapon( String weapon_modelname )
Gives the sentient the weapon specified.
weaponcommand( String hand, [ String arg1 ], [ String arg2 ], [ String arg3 ], [ String arg4 ], [ String arg5 ], [ String arg6 ], [ String arg7 ] )
Pass the args to the active weapon in the specified hand
SimpleActor → Sentient → Animate → Entity → SimpleEntity → Listener → Class
noanimlerp
Do not LERP to the next animation
SimpleArchivedEntity → SimpleEntity → Listener → Class
SimpleEntity → Listener → Class
angle( Float newAngle )
set the angles of the entity using just one value.
Sets the yaw of the entity or an up and down
direction if newAngle is [0-359] or -1 or -2
angle( Float newAngle )
set the angles of the entity using just one value.
Sets the yaw of the entity or an up and down
direction if newAngle is [0-359] or -1 or -2
angle
get the angles of the entity using just one value.
Gets the yaw of the entity or an up and down
direction if newAngle is [0-359] or -1 or -2
angles( Vector newAngles<0.00...360.00><0.00...360.00><0.00...360.00> )
set the angles of the entity to newAngles.
angles( Vector newAngles<0.00...360.00><0.00...360.00><0.00...360.00> )
set the angles of the entity to newAngles.
angles( Vector newAngles<0.00...360.00><0.00...360.00><0.00...360.00> )
get the angles of the entity.
centroid
entity's centroid
forwardvector
get the forward vector of angles
leftvector
get the left vector of angles
origin( Vector newOrigin )
Set the origin of the entity to newOrigin.
origin( Vector newOrigin )
Set the origin of the entity to newOrigin.
origin
entity's origin
rightvector
get the right vector of angles
target
entity's target
target( String targetname_to_target )
entity's target
target( String targetname_to_target )
target another entity with targetname_to_target.
targetname
entity's targetname
targetname( String targetName )
set the targetname of the entity to targetName.
targetname( String targetName )
set the targetname of the entity to targetName.
upvector
get the up vector of angles
SinkObject (func_sinkobject) → ScriptSlave → Mover → Trigger → Animate → Entity → SimpleEntity → Listener → Class
active
make the SinkObject active, so that it will respond to players touching it.
dampening( Float newDampening )
dampening of SinkObject.
delay( Float delay )
Delay until SinkObject starts falling.
doTouch( Entity touchingEntity )
sent to entity when touched.
limit( Float newLimit )
maximum displacement of the SinkObject.
notactive
make the SinkObject not active, so that it won't respond to players touching it.
reset
Reset the SinkObject right now.
resetdelay( Float newResetDelay )
Delay between when sinkobject starts resetting.
resetsound( String newResetSound )
Sound played when sinkobject is resetting.
resetspeed( Float newResetspeed )
Speed at which SinkObject resets itself, defaults to 0.002 * speed.
sinksound( String newSinkSound )
Sound played when sinkobject is sinking.
speed( Float speed )
Speed at which SinkObject starts falling.
SlidingDoor (func_door) → Door → ScriptSlave → Mover → Trigger → Animate → Entity → SimpleEntity → Listener → Class
angle( Float newAngle )
set the angles of the entity using just one value.
Sets the yaw of the entity or an up and down
direction if newAngle is [0-359] or -1 or -2
doclose
Closes the door (special doors).
doopen( Entity other )
Opens the door (special doors).
lip( Float lip )
Sets the lip of the sliding door.
speed( Float speed )
Sets the speed of the sliding door.
SmokeGrenade (smokegrenade) → EffectEntity → Animate → Entity → SimpleEntity → Listener → Class
bouncefactor( Float factor )
sets how far smoke volumes bounce when they collide with something
fadedelay( Float time )
sets how long the entity waits until fading out from 1 alpha to 0 alpha, in seconds
fadein( Float time )
sets fadein time from 0 alpha to 1 alpha, in seconds
life( Float life )
sets how long the smoke emitter lives
maxalpha( Float alpha )
sets maximum opacity of an individual smoke particle, in 0-1 range
offset( Float offset_x, Float offset_y, Float offset_z )
sets offset of the smoke volume from the entity
scale( Float scale )
sets initial scale of each smoke volume
scalerate( Float rate )
sets how fast the smoke volume grows
spawnlife( Float life )
sets how long each smoke volume lives
spawnrate( Float rate )
sets how many smoke volumes are spawned per second
spin( Float avel )
sets the number of rotations per second for this entity around its z axis
velocity( Float vel_x, Float vel_y, Float vel_z )
sets how fast the smoke volume moves away, with x forward and z up
SoundManager → Listener → Class
addmusictrigger
Add a new music trigger where the player is standing.
addrandomspeaker
Add a new sound where the player is standing.
addreverbtrigger
Add a new reverb trigger where the player is standing.
addspeaker
Add a new sound where the player is standing.
delete
Delete the current sound.
globaltranslate( Vector translate_amount )
Translates all sounds and triggers by specified amount.
hide
Hides the sounds.
moveplayer
Move the player to the current sound position.
next
Go to the next sound.
prev
Go to the previous sound.
previewreverb
Test out the current reverb settings.
replace
Replace the current sound position with the player's.
reset
Resets the state of all sounds and triggers.
resetreverb
reset the reverb settings to a normal.
save
Saves the sounds.
show( [ Entity path ] )
Show all the sounds.
switchfacet
Switch the current facet that we are editing.
updateinput
Updates the current sound with user interface values.
Spawn (func_spawn) → ScriptSlave → Mover → Trigger → Animate → Entity → SimpleEn
0 评论
Recommended Comments
没有要显示的评论。