Nuclide
Software Development Kit for id Technology
|
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.
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 NSIO::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 NSTrigger::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... | |
nonvirtual vector | GetTouchPosition (void) |
Returns the last valid point the entity has touched. More... | |
nonvirtual vector | GetTouchNormal (void) |
Returns the normal of the last valid surface the entity has touched. More... | |
void NSTrigger::NSTrigger | ( | void | ) |
|
virtual |
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.
|
virtual |
|
virtual |
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.
int NSTrigger::GetMaster | ( | entity | queryingEntity | ) |
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.
entity NSTrigger::GetTargetEntity | ( | void | ) |
Returns the first entity named after the target field.
float NSTrigger::GetTeam | ( | void | ) |
Retrives the team value of a given entity.
vector NSTrigger::GetTouchNormal | ( | void | ) |
Returns the normal of the last valid surface the entity has touched.
vector NSTrigger::GetTouchPosition | ( | void | ) |
Returns the last valid point the entity has touched.
string NSTrigger::GetTriggerTarget | ( | void | ) |
Returns the name of the entity group it can trigger (legacy style).
|
virtual |
Returns what we will pass onto other's NSTrigger::GetMaster()
calls if we're their master.
Reimplemented in game_team_master, multisource, and NSBrushTrigger.
bool NSTrigger::HasTargetname | ( | void | ) |
Returns TRUE if the entity has a name that can be used for messaging.
bool NSTrigger::HasTriggerTarget | ( | void | ) |
Returns TRUE if the entity has a legacy trigger target.
|
virtual |
Called when we are being prompted by another object/function with an input message.
Reimplemented from NSIO.
Reimplemented in env_explosion, env_fade, env_physexplosion, env_shake, env_shooter, env_spark, func_areaportal, func_door, func_door_rotating, func_guntarget, func_plat, func_tracktrain, func_wall_toggle, game_team_master, game_text, light, logic_case, logic_relay, logic_timer, path_track, phys_convert, phys_hinge, phys_keepupright, phys_slideconstraint, point_camera, point_servercommand, point_trigger, prop_portal, scripted_sentence, trigger_changelevel, trigger_hurt, trigger_multiple, trigger_once, ambient_generic, env_beam, env_bubbles, env_cascade_light, env_fog_controller, env_funnel, env_instructor_hint, env_muzzleflash, env_smoker, env_sprite, func_conveyor, info_waypoint, logic_achievement, NSClientPlayer, NSEntity, NSItem, NSMonster, NSActor, NSPhysicsConstraint, NSRenderableEntity, NSSoundScape, and NSSurfacePropEntity.
|
virtual |
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_soundscape, light_environment, prop_static, button_target, cycler, env_explosion, env_message, env_model, env_shooter, env_spark, func_breakable, func_brush, func_button, func_door, func_door_rotating, func_guntarget, func_healthcharger, 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_tracktrain, func_train, func_traincontrols, func_wall_toggle, game_counter, game_counter_set, game_zone_player, info_node, info_node_air, infodecal, item_eyescanner, item_food, item_generic, item_healthcharger, item_recharge, 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_portal, prop_static, random_speaker, random_trigger, reserved_spot, scripted_sequence, targ_speaker, target_cdaudio, target_speaker, trigger_auto, trigger_autosave, trigger_cdaudio, trigger_changelevel, trigger_counter, trigger_endsection, trigger_hurt, trigger_look, trigger_monsterjump, 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, env_sprite, func_conveyor, func_friction, func_illusionary, func_ladder, func_lod, func_useableladder, func_wall, logic_achievement, speaker, trigger_gravity, trigger_push, NSOutput, NSBrushTrigger, NSCharger, NSClientPlayer, NSEntity, NSItem, NSMonster, NSPhysicsEntity, NSPointTrigger, NSRenderableEntity, NSSound, NSSpawnPoint, NSSurfacePropEntity, and NSTalkMonster.
|
virtual |
Similar to NSIO::SpawnKey
but for save-game fields.
Whatever you write into file handles within your NSIO::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, 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, item_healthcharger, item_recharge, light, logic_auto, logic_case, logic_timer, momentary_rot_button, NSMomentary, monstermaker, 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, NSWorldspawn, NSAttack, NSCharger, NSClient, NSClientPlayer, NSClientSpectator, NSEntity, NSItem, NSMonster, NSMoverEntity, NSActor, NSPhysicsConstraint, NSPhysicsEntity, NSPointTrigger, NSProjectile, NSRenderableEntity, NSSoundScape, NSSquadMonster, NSSurfacePropEntity, NSTalkMonster, NSTimer, NSVehicle, and NSWeapon.
|
virtual |
Handles saving a copy of this entity to a given filehandle.
Within you want to use the NSIO::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, 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, item_healthcharger, item_recharge, light, logic_auto, logic_case, logic_timer, momentary_rot_button, NSMomentary, monstermaker, 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, NSWorldspawn, NSAttack, NSCharger, NSClient, NSClientPlayer, NSClientSpectator, NSEntity, NSItem, NSMonster, NSMoverEntity, NSActor, NSPhysicsConstraint, NSPhysicsEntity, NSPointTrigger, NSProjectile, NSRenderableEntity, NSSoundScape, NSSquadMonster, NSSurfacePropEntity, NSTalkMonster, NSTimer, NSVehicle, and NSWeapon.
void NSTrigger::SetTeam | ( | float | new_team | ) |
Assigns the entity to a given team value.
void NSTrigger::SetTriggerTarget | ( | string | name | ) |
Sets the legacy target for this entity.
|
virtual |
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_soundscape, env_sun, func_dustcloud, func_dustmotes, 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_sound, 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_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_eyescanner, item_generic, item_healthcharger, item_recharge, light, light_environment, logic_auto, logic_case, logic_relay, logic_timer, momentary_door, momentary_rot_button, monster_furniture, 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, prop_portal, random_speaker, random_trigger, scripted_sentence, scripted_sequence, targ_speaker, target_cdaudio, target_speaker, 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, func_lod, func_useableladder, info_waypoint, light_dynamic, logic_achievement, speaker, trigger_gravity, trigger_push, NSWorldspawn, NSAttack, NSCharger, NSEntity, NSItem, NSMonster, NSMoverEntity, NSPhysicsConstraint, NSPhysicsEntity, NSPointTrigger, NSProjectile, NSRenderableEntity, NSSoundScape, NSSquadMonster, NSSurfacePropEntity, NSTalkMonster, and NSWeapon.
|
virtual |
Called when we started touching another entity.
|
virtual |
Called whenever we're touching another entity.
Reimplemented in func_breakable, func_button, func_door, func_door_rotating, 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, 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, item_eyescanner, 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_useableladder, func_wall, info_waypoint, logic_achievement, speaker, trigger_push, NSMonster, and NSProjectile.
void NSTrigger::UseTargets | ( | entity | act, |
int | state, | ||
float | triggerDelay | ||
) |
When called will trigger its legacy targets with a given delay.