Nuclide
Software Development Kit for id Tech
|
NSTrigger handles all the non-input as well as Legacy (Quake, GoldSource) style trigger behaviour. More...
#include <NSTrigger.h>
Public Member Functions | |
void | NSTrigger (void) |
virtual void | Blocked (entity) |
Called whenever out movement is being blocked by an entity. More... | |
virtual void | StartTouch (entity) |
Called when we started touching another entity. More... | |
virtual void | Touch (entity) |
Called whenever we're touching another entity. More... | |
virtual void | EndTouch (entity) |
Called when we stopped touching the last touched entity. More... | |
virtual void | SpawnKey (string, string) |
This method handles entity key/value pairs on map load. More... | |
virtual void | Save (float) |
Handles saving a copy of this entity to a given filehandle. More... | |
virtual void | Restore (string, string) |
Similar to ::SpawnKey but for save-game fields. More... | |
virtual void | Respawn (void) |
Server: Called when the entity first spawns or when game-logic requests the entity to return to its original spawn state. More... | |
virtual void | Input (entity, string, string) |
Called when we are being prompted by another object/function with an input message. More... | |
virtual bool | CanBeTriggeredBy (entity) |
virtual void | Trigger (entity, triggermode_t) |
Called whenever we're legacy triggered by another object or function. More... | |
virtual int | GetValue (entity) |
Returns what we will pass onto other's ::GetMaster() calls if we're their master. More... | |
nonvirtual void | UseTargets (entity, int, float) |
When called will trigger its legacy targets with a given delay. More... | |
nonvirtual void | SetTriggerTarget (string) |
Sets the legacy target for this entity. More... | |
nonvirtual int | GetMaster (entity) |
Returns whether our master allows us to be triggered. More... | |
nonvirtual globalstate_t | GetGlobalValue (string) |
Returns the value of a given env_global property. More... | |
nonvirtual string | GetTriggerTarget (void) |
Returns the name of the entity group it can trigger (legacy style). More... | |
nonvirtual entity | GetTargetEntity (void) |
Returns the first entity named after the target field. More... | |
nonvirtual bool | HasTriggerTarget (void) |
Returns TRUE if the entity has a legacy trigger target. More... | |
nonvirtual bool | HasTargetname (void) |
Returns TRUE if the entity has a name that can be used for messaging. More... | |
nonvirtual void | SetTeam (float) |
Assigns the entity to a given team value. More... | |
nonvirtual float | GetTeam (void) |
Retrives the team value of a given entity. More... | |
NSTrigger handles all the non-input as well as Legacy (Quake, GoldSource) style trigger behaviour.
It also deals with masters, touches, blocking and so on.
Called whenever out movement is being blocked by an entity.
This is currently only relevant on entities that are of MOVETYPE_PUSH
.
Reimplemented in func_button, func_door, func_door_rotating, func_rotating, func_tracktrain, and func_train.
Called when we stopped touching the last touched entity.
Reimplemented in point_trigger, and trigger_multiple.
globalstate_t NSTrigger::GetGlobalValue | ( | string | strName | ) |
Returns the value of a given env_global property.
Returns whether our master allows us to be triggered.
The argument specifies who's requesting the info for the master. Required for game_team_master to verify against players.
Returns the name of the entity group it can trigger (legacy style).
Returns what we will pass onto other's ::GetMaster()
calls if we're their master.
Reimplemented in game_team_master, multisource, and NSBrushTrigger.
Returns TRUE if the entity has a name that can be used for messaging.
Called when we are being prompted by another object/function with an input message.
Reimplemented from NSIO.
Reimplemented in env_explosion, env_physexplosion, env_shooter, env_spark, func_areaportal, func_door, func_guntarget, func_plat, func_wall_toggle, game_team_master, game_text, logic_case, logic_relay, logic_timer, path_track, phys_convert, phys_hinge, phys_keepupright, phys_slideconstraint, point_camera, point_servercommand, point_trigger, scripted_sentence, trigger_changelevel, trigger_hurt, trigger_multiple, trigger_once, ambient_generic, env_bubbles, env_cascade_light, env_fog_controller, env_funnel, env_instructor_hint, env_muzzleflash, env_muzzleflash, env_smoker, func_conveyor, info_waypoint, logic_achievement, NSEntity, NSMonster, NSPhysicsConstraint, NSRenderableEntity, and NSSurfacePropEntity.
Server: Called when the entity first spawns or when game-logic requests the entity to return to its original spawn state.
Reimplemented from NSIO.
Reimplemented in env_particle, env_sound, env_soundscape, infodecal, light_environment, prop_static, button_target, cycler, env_explosion, env_message, env_model, env_physexplosion, env_shooter, env_spark, func_breakable, func_brush, func_button, func_door, func_door_rotating, func_guntarget, func_healthcharger, func_lod, func_monsterclip, func_mortar_field, func_pendulum, func_physbox, func_plat, func_platrot, func_pushable, func_recharge, func_rot_button, func_rotating, func_tank, func_tankcontrols, func_tracktrain, func_train, func_traincontrols, func_wall_toggle, game_counter, game_counter_set, game_zone_player, info_node, info_node_air, infodecal, item_food, item_generic, light, logic_auto, logic_case, logic_relay, logic_timer, momentary_door, momentary_rot_button, monster_furniture, monster_generic, monstermaker, multi_manager, multisource, path_corner, path_track, phys_ballsocket, phys_constraint, phys_constraintsystem, phys_convert, phys_hinge, phys_keepupright, phys_slideconstraint, point_camera, point_trigger, prop_door_rotating, prop_dynamic, prop_physics, prop_static, random_speaker, random_trigger, scripted_sequence, targ_speaker, target_cdaudio, trigger_auto, trigger_autosave, trigger_cdaudio, trigger_changelevel, trigger_counter, trigger_endsection, trigger_hurt, trigger_look, trigger_monsterjump, trigger_multiple, trigger_once, trigger_playerfreeze, trigger_relay, trigger_teleport, trigger_transition, ambient_generic, env_beam, env_bubbles, env_cascade_light, env_fog, env_fog_controller, env_funnel, env_glow, env_instructor_hint, env_laser, env_smoker, func_conveyor, func_friction, func_illusionary, func_ladder, func_wall, logic_achievement, prop_physics_multiplayer, speaker, trigger_gravity, trigger_push, NSOutput, NSClientPlayer, NSEntity, NSItem, NSMonster, NSPhysicsEntity, NSPointTrigger, NSRenderableEntity, NSSpawnPoint, NSSurfacePropEntity, NSTalkMonster, and NSPMoveVars.
Similar to ::SpawnKey
but for save-game fields.
Whatever you write into file handles within your ::Save()
method needs to be read back in here.
Reimplemented from NSIO.
Reimplemented in env_beverage, env_explosion, env_fade, env_global, env_hudhint, env_message, env_physexplosion, env_shake, env_shooter, env_spark, func_areaportal, func_breakable, func_brush, func_button, func_door, func_door_rotating, func_guntarget, func_healthcharger, func_mortar_field, func_pendulum, func_plat_helper, func_plat, func_platrot, func_pushable, func_recharge, func_rot_button, func_rotating, func_tank, func_trackchange, func_tracktrain, func_train, func_wall_toggle, game_counter, game_counter_set, game_player_equip, game_player_hurt, game_score, game_team_master, game_text, game_zone_player, info_hint, infodecal, item_food, item_generic, light, logic_auto, logic_case, logic_timer, momentary_rot_button, NSMomentary, monstermaker, multi_manager_sub, multi_manager, path_corner, path_track, phys_convert, phys_hinge, phys_keepupright, phys_slideconstraint, player_loadsaved, point_camera, point_trigger, prop_door_rotating, random_speaker, random_trigger, scripted_sentence, scripted_sequence, targ_speaker, target_cdaudio, trigger_auto, trigger_autosave, trigger_cdaudio, trigger_changelevel, trigger_changetarget, trigger_counter, trigger_hurt, trigger_look, trigger_monsterjump, trigger_multiple, trigger_once, trigger_relay, trigger_teleport, ambient_generic, env_bubbles, env_cascade_light, env_fog, env_fog_controller, env_funnel, env_instructor_hint, env_muzzleflash, env_smoker, func_conveyor, info_waypoint, logic_achievement, speaker, trigger_gravity, trigger_push, worldspawn, NSClient, NSClientPlayer, NSClientSpectator, NSEntity, NSItem, NSMonster, NSMoverEntity, NSNavAI, NSPhysicsConstraint, NSPhysicsEntity, NSPointTrigger, NSProjectile, NSRenderableEntity, NSSquadMonster, NSSurfacePropEntity, NSTalkMonster, NSTimer, NSVehicle, and NSWeapon.
Handles saving a copy of this entity to a given filehandle.
Within you want to use the ::SaveFloat() etc. methods to write the internal member attributes to the specified file handle.
Reimplemented from NSIO.
Reimplemented in env_beverage, env_explosion, env_fade, env_global, env_hudhint, env_message, env_physexplosion, env_shake, env_shooter, env_spark, func_areaportal, func_breakable, func_brush, func_button, func_door, func_door_rotating, func_guntarget, func_healthcharger, func_mortar_field, func_pendulum, func_plat_helper, func_plat, func_platrot, func_pushable, func_recharge, func_rot_button, func_rotating, func_tank, func_trackchange, func_tracktrain, func_train, func_wall_toggle, game_counter, game_counter_set, game_player_equip, game_player_hurt, game_score, game_team_master, game_text, game_zone_player, info_hint, infodecal, item_food, item_generic, light, logic_auto, logic_case, logic_timer, momentary_rot_button, NSMomentary, monstermaker, multi_manager_sub, multi_manager, path_corner, path_track, phys_convert, phys_hinge, phys_keepupright, phys_slideconstraint, player_loadsaved, point_camera, point_trigger, prop_door_rotating, random_speaker, random_trigger, scripted_sentence, scripted_sequence, targ_speaker, target_cdaudio, trigger_auto, trigger_autosave, trigger_cdaudio, trigger_changelevel, trigger_changetarget, trigger_counter, trigger_hurt, trigger_look, trigger_monsterjump, trigger_multiple, trigger_once, trigger_relay, trigger_teleport, ambient_generic, env_bubbles, env_cascade_light, env_fog, env_fog_controller, env_funnel, env_instructor_hint, env_muzzleflash, env_smoker, func_conveyor, info_waypoint, logic_achievement, speaker, trigger_gravity, trigger_push, worldspawn, NSClient, NSClientPlayer, NSClientSpectator, NSEntity, NSItem, NSMonster, NSMoverEntity, NSNavAI, NSPhysicsConstraint, NSPhysicsEntity, NSPointTrigger, NSProjectile, NSRenderableEntity, NSSquadMonster, NSSurfacePropEntity, NSTalkMonster, NSTimer, NSVehicle, and NSWeapon.
This method handles entity key/value pairs on map load.
You can easily convert the strValue
parameter using the ReadFloat etc. methods that are part of NSIO.
Reimplemented from NSIO.
Reimplemented in env_fire, NSInteractiveSurface, env_cubemap, env_particle, env_sound, env_soundscape, env_sun, func_dustcloud, func_dustmotes, func_lod, func_smokevolume, infodecal, light_environment, point_message, prop_static, sky_camera, env_beverage, env_explosion, env_fade, env_global, env_hudhint, env_message, env_model, env_physexplosion, env_shake, env_shooter, env_spark, func_areaportal, func_breakable, func_brush, func_button, func_door, func_door_rotating, func_guntarget, func_healthcharger, func_lod, func_mortar_field, func_pendulum, func_physbox, func_plat, func_platrot, func_pushable, func_recharge, func_rot_button, func_rotating, func_tank, func_trackchange, func_tracktrain, func_train, game_counter, game_counter_set, game_player_equip, game_player_hurt, game_score, game_team_master, game_text, game_zone_player, info_hint, infodecal, item_generic, light, logic_auto, logic_case, logic_relay, logic_timer, momentary_door, momentary_rot_button, monstermaker, multi_manager, path_corner, path_track, phys_convert, phys_hinge, phys_keepupright, phys_slideconstraint, player_loadsaved, point_camera, point_trigger, prop_door_rotating, prop_dynamic, prop_physics, random_speaker, random_trigger, scripted_sentence, scripted_sequence, targ_speaker, target_cdaudio, trigger_auto, trigger_cdaudio, trigger_changelevel, trigger_changetarget, trigger_counter, trigger_hurt, trigger_look, trigger_monsterjump, trigger_multiple, trigger_once, trigger_relay, trigger_teleport, ambient_generic, env_beam, env_bubbles, env_cascade_light, env_fog, env_fog_controller, env_funnel, env_glow, env_instructor_hint, env_laser, env_muzzleflash, env_shockwave, env_smoker, env_sprite, func_conveyor, func_friction, info_waypoint, light_dynamic, logic_achievement, prop_physics_multiplayer, speaker, trigger_gravity, trigger_push, worldspawn, NSEntity, NSItem, NSMonster, NSMoverEntity, NSPhysicsConstraint, NSPhysicsEntity, NSPointTrigger, NSProjectile, NSRenderableEntity, NSSpawnPoint, NSSquadMonster, NSSurfacePropEntity, and NSTalkMonster.
Called when we started touching another entity.
Called whenever we're touching another entity.
Reimplemented in func_breakable, func_button, func_door, func_door_rotating, func_plat_helper, func_pushable, func_rot_button, func_rotating, item_food, point_trigger, scripted_sequence, target_cdaudio, trigger_autosave, trigger_cdaudio, trigger_changelevel, trigger_counter, trigger_hurt, trigger_look, trigger_monsterjump, trigger_multiple, trigger_once, trigger_teleport, func_conveyor, func_friction, prop_physics_multiplayer, trigger_gravity, trigger_push, NSDebris, NSItem, NSMonster, NSPhysicsEntity, NSProjectile, and NSTalkMonster.
|
virtual |
Called whenever we're legacy triggered by another object or function.
Reimplemented in button_target, env_beverage, env_explosion, env_fade, env_global, env_hudhint, env_model, env_render, env_shake, env_shooter, env_spark, func_areaportal, func_breakable, func_brush, func_button, func_door, func_door_rotating, func_guntarget, func_mortar_field, func_pendulum, func_plat, func_platrot, func_rotating, func_tracktrain, func_train, func_wall_toggle, game_counter, game_counter_set, game_end, game_player_equip, game_player_hurt, game_player_team, game_score, game_team_master, game_team_set, game_text, game_zone_player, infodecal, light, monstermaker, multi_manager, multisource, path_corner, path_track, player_loadsaved, player_weaponstrip, point_trigger, random_speaker, random_trigger, script_brushmodel, script_model, script_origin, script_struct, script_vehicle, scripted_sentence, scripted_sequence, targ_speaker, trigger_cdaudio, trigger_changelevel, trigger_changetarget, trigger_counter, trigger_endsection, trigger_hurt, trigger_playerfreeze, trigger_relay, env_beam, env_bubbles, env_cascade_light, env_fog, env_fog_controller, env_funnel, env_instructor_hint, env_laser, env_muzzleflash, env_shockwave, env_smoker, env_sprite, func_conveyor, func_illusionary, func_ladder, func_wall, info_waypoint, logic_achievement, speaker, trigger_push, NSMonster, and NSProjectile.
When called will trigger its legacy targets with a given delay.