Call of Duty: World at War

Call of Duty: World at War

Not enough ratings
[Scripting Tutorial] List of Code Notifies
By SparkyMcSparks
A list of code notifies sent by the engine when certain events happen that can be caught by script.
   
Award
Favorite
Favorited
Unfavorite
Code Notifies
Notify
Description
Example
"damage"
This is used for when you'd like to know if something took damage. There are multiple parameters that can be used to find out how much damage', 'from where', etc.
self waittill( "damage", damage, attacker, direction_vec, point, type, modelName, tagName );

damage = amount of damage
attacker = who caused the damage
direction_vec = direction of travel
point = point of impact
type = type of damage
modelName = name of model that was hit
tagName = (not exactly sure on this one)
"grenade_fire"
This is used for when you'd like to know if the player has thrown a grenade. There are a couple useful parameters that are returned with the notify.
self waittill( "grenade_fire", e_grenade, str_weaponName );

e_grenade = the grenade entity spawned
str_weaponName = the name of the grenade weapon type
"death"
This is normally used with endon but is also used with waittill, it let's us know when something has died. This notify is sent on the thing that died. You can also capture the 'killer' by adding a parameter.
self endon ( "death" );
self waittill( "death" );
self waittill( "death", attacker ); // attacker=who killed the entity
"disconnect"
Sent to a player entity if the player suffers a network disconnect. This needs to be added to anything that you thread on a player.
self endon( "disconnect" );
"done"
"enter_vehicle"
This will let you know if an entity has entered a vehicle.
self waittill( "enter_vehicle" );
"exit_vehicle"
This will let you know if an entity has exited a vehicle.
self waittill( "exit_vehicle" );
"goal"
Used when you're sending something to a position, node, struct, etc. This will be sent when the entity reaches its 'goal'.
self waittill( "goal" );
"goal_changed"
Sent when an AI has a new goal that it's trying to go to.
self waittill( "goal_changed" );
"movedone"
If you find the need to move things in script, this will be the notify to wait for so you know when it's done moving.
self waittill( "movedone" );
"near_goal"
"reached_end_node"
Commonly used for vehicle splines, this will tell you when the entity has reached the last node.
self waittill( "reached_end_node" );
"reached_wait_node"
"bad_path"
Sent after an AI failed to find a path to its goal.
self waittill( "bad_path" );
"rotatedone"
If you find the need to rotate things in script, this will be the notify to wait for so you know when it's done rotating.
self waittill( "rotatedone" );
"spawned"
"trigger"
Used to let us know when a trigger had been triggered. You can also capture what triggered the trigger with an extra parameter.
self waittill( "trigger" );
self waittill( "trigger", ent );

The 'ent' variable will be filled with the entity that triggered this trigger.
"grenade danger"
Sent when an AI detects an enemy grenade launch.
self waittill( "grenade danger", grenadeEntity );
"enemy_visible"
Sent when the AI's enemy is determined to be visible.
self waittill( "enemy_visible" );
"bulletwhizby"
Sent when an AI detects a bullet whizby.
self waittill( "bulletwhizby", suppressorEntity, startPoint, endPoint, closestPoint );
"suppression"
Sent when an AI receives a suppression event.
self waittill( "suppression", suppressorEntity );
"weapon_fired"
Sent to a vehicle when it fires its weapon.
self waittill( "weapon_fired" );
1 Comments
terror Oct 4, 2014 @ 5:09am 
COOL THANKZ