Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
481 lines (289 sloc) 6.97 KB

Complete list of CoD4 script notifies

Table of contents

  1. Foreword
  2. Core game script notifies
  3. Custom CoD4X script notifies

Foreword

Script notifies is a GSC engine feature allows you to create and listen to various events happens with entities (mostly). You can block script thread using

ent waittill("some-event");

To continue this thread you have to "notify" it in other script thread using

ent notify("some-event");

Also, you can kill script thread with

ent endon("some-event"); /* Not blocking call. */

More than that, you can pass arguments among event notifications. For example,

ent waittill("my-cool-event-with-args", stringArg, intArg, target);
/* ... */
ent notify("my-cool-event-with-args", "string", 1337, self);

Core game script notifies

  1. begin
  2. begin_firing
  3. call_vote
  4. cancel_location
  5. confirm_location
  6. damage
  7. death
  8. detonate
  9. end_firing
  10. explode
  11. flashbang
  12. goal
  13. goal_yaw
  14. grenade danger
  15. grenade_fire
  16. grenade_pullback
  17. menuresponse
  18. movedone
  19. near_goal
  20. night_vision_off
  21. night_vision_on
  22. projectile_impact
  23. reload
  24. reload_start
  25. rotatedone
  26. sprint_begin
  27. sprint_end
  28. touch
  29. trigger
  30. turret_no_vis
  31. turret_not_on_target
  32. turret_on_target
  33. turret_on_vistarget
  34. turret_rotate_stopped
  35. veh_collision
  36. veh_predictedcollision
  37. vote
  38. weapon_change
  39. weapon_fired

begin

When: Client just connected.

On: Player.


begin_firing

When: Client started firing using weapon.

On: Player.


call_vote

TODO.

When: Player called a vote.

On: Player.

Arguments: string string1, string string2, string string3.

Requirements: Dvar "g_oldVoting" equal 1.


cancel_location

When: Player closed location selection dialog.

On: Player.


confirm_location

When: Player choosed location on location dialog (airdrop dialog).

On: Player.

Arguments: vector origin.


damage

Variant 1:

TODO.

When: Victim gets damaged.

On: Victim entity.

Arguments: int a1, entity attacker, vector a3, string means_of_death, string a5, string a6, string a7, int a8, ??? ????.


Variant 2:

TODO.

When: Entity gets damaged.

On: Victim entity.

Arguments: int a1, entity a2.


death

Variant 1:

When: Entity died or destroyed.

On: Game entity or hud element.


Variant 2:

When: Player died.

On: Victim entity.

Arguments: entity attacker.


Variant 3:

When: Entity "died".

On: Victim entity.

Arguments: int a1, entity a2, vector a3, vector a4, string a5.


detonate

When: Entity detonates.

On: Game entity that can be detonated.


end_firing

When: Player ends firing.

On: Player.


explode

When: Entity explodes.

On: Game entity that can be exploded.

Arguments: vector origin.


flashbang

When: Player flashbanged.

On: Victim player.

Arguments: float percent_distance, float percent_angle, entity attacker, string team ("axis" or "allies").


goal

TODO.

When: ???

On: ???


goal_yaw

TODO.

When: ???

On: ???


grenade danger

TODO. Arg confirm required.

When: Grenade close to player.

On: Attacker?

Arguments: entity grenade, entity victim?, string grenade_name.


grenade_fire

When: Player throws grenade.

On: Player.

Arguments: entity grenade, string weapon_name.


grenade_pullback

When: Player throws grenade back.

On: Player.

Arguments: string weapon_name.


menuresponse

When: Player invokes "menuresponse" in hud menu.

On: Player.

Arguments: string menu_name, string response_name.


movedone

When: Entity finished moving.

On: Game entity, not player.


near_goal

TODO.

When: ???

On: ???


night_vision_off

When: Player took off night vision goggles.

On: Player.


night_vision_on

When: Player put on night vision goggles.

On: Player.


projectile_impact

TODO.

When: Projectile entity impacts surface.

On: Projectile entity.

Arguments: string a1, vector a2, int a3.


reload

When: Player reloads weapon.

On: Player.


reload_start

TODO. Recheck if happens only with bolt-action weapons.

When: Player starts reloading weapon.

On: Player.


rotatedone

When: Entity stopped rotation.

On: Game entity, but not player.


sprint_begin

When: Player started sprinting.

On: Player.


sprint_end

When: Player stopped sprinting.

On: Player.


touch

When: One game entity touches other one. Usually, called on both inflicted entities.

On: Game entity, including player.

Arguments: entity other.


trigger

Variant 1:

When: Player triggered trigger entity.

On: Trigger entity.

Arguments: entity player.


Variant 2:

When: Player picks up item.

On: Game entity can be picked up (item, weapon).

Arguments: entity activator (player or undefined), entity dropped (entity or undefined).


turret_no_vis

TODO.

When: ???

On: Entity???


turret_not_on_target

TODO.

When: ???

On: Entity???


turret_on_target

TODO.

When: ???

On: Entity???


turret_on_vistarget

TODO.

When: ???

On: Entity???


turret_rotate_stopped

TODO.

When: ???

On: Entity???


veh_collision

TODO.

When: ???

On: Entity???

Arguments: vector a1, vector a2.


veh_predictedcollision

TODO.

When: ???

On: Entity???

Arguments: vector a1, vector a2.


vote

When: Client pressed "vote yes" (F1) or "vote no" (F2) buttons.

On: Player.

Arguments: string vote ("yes" or "no").

Requirements: Dvar "g_oldVoting" equal 1.


weapon_change

When: Player changing weapon.

On: Player.

Arguments: string new_weapon.


weapon_fired

When: Player fired.

On: Player.


Custom CoD4X script notifies

  1. movedone
  2. rotatedone

movedone

When: Bot stopped moving.

On: Bot entity.


rotatedone

When: Bot stopped rotating.

On: Bot entity.

You can’t perform that action at this time.