Nuclide
Software Development Kit for id Technology (BETA)
|
ncTrigger 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 | ncTrigger (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 ncIO::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 ncTrigger::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 ncTrigger::ncTrigger | ( | 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 ncTrigger::GetGlobalValue | ( | string | strName | ) |
Returns the value of a given env_global property.
int ncTrigger::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 ncTrigger::GetTargetEntity | ( | void | ) |
Returns the first entity named after the target field.
float ncTrigger::GetTeam | ( | void | ) |
Retrives the team value of a given entity.
vector ncTrigger::GetTouchNormal | ( | void | ) |
Returns the normal of the last valid surface the entity has touched.
vector ncTrigger::GetTouchPosition | ( | void | ) |
Returns the last valid point the entity has touched.
string ncTrigger::GetTriggerTarget | ( | void | ) |
Returns the name of the entity group it can trigger (legacy style).
|
virtual |
Returns what we will pass onto other's ncTrigger::GetMaster()
calls if we're their master.
Reimplemented in game_team_master, multisource, and ncBrushTrigger.
bool ncTrigger::HasTargetname | ( | void | ) |
Returns TRUE if the entity has a name that can be used for messaging.
bool ncTrigger::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 ncIO.
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_projectedtexture, env_smoker, env_sprite, func_conveyor, func_monitor, info_particle_system, info_waypoint, light_dynamic, logic_achievement, point_spotlight, trigger_camera, ncPlayer, ncEntity, ncItem, ncMonster, ncActor, ncPhysicsConstraint, ncRenderableEntity, ncSoundScape, and ncSurfacePropEntity.
|
virtual |
Server: Called when the entity first spawns or when game-logic requests the entity to return to its original spawn state.
Reimplemented from ncIO.
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_fire, env_fog, env_fog_controller, env_funnel, env_glow, env_instructor_hint, env_laser, env_projectedtexture, env_smoker, env_sprite, func_conveyor, func_friction, func_illusionary, func_ladder, func_lod, func_monitor, func_tankmortar, func_useableladder, func_vehicle, func_wall, info_particle_system, light_dynamic, logic_achievement, phys_rope, point_spotlight, prop_rope, prop_vehicle_driveable, speaker, trigger_camera, trigger_gravity, trigger_push, ncOutput, ncBrushTrigger, ncCharger, ncPlayer, ncEntity, ncItem, ncMonster, ncPhysicsEntity, ncPointTrigger, ncRenderableEntity, ncSound, ncSpawnPoint, ncSurfacePropEntity, and ncTalkMonster.
|
virtual |
Similar to ncIO::SpawnKey() but for save-game fields.
Whatever you write into file handles within your ncIO::Save()
method needs to be read back in here.
Reimplemented from ncIO.
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, ncMomentary, 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, func_vehicle, info_waypoint, logic_achievement, phys_rope, prop_rope, speaker, trigger_camera, trigger_gravity, trigger_push, NSWorldspawn, ncAttack, ncCharger, ncClient, ncPlayer, ncSpectator, ncEntity, ncItem, ncMonster, ncMoverEntity, ncActor, ncPhysicsConstraint, ncPhysicsEntity, ncPointTrigger, ncProjectile, ncRenderableEntity, ncSoundScape, ncSquadMonster, ncSurfacePropEntity, ncTalkMonster, ncTimer, ncVehicle, and ncWeapon.
|
virtual |
Handles saving a copy of this entity to a given filehandle.
Within you want to use the ncIO::SaveFloat() etc. methods to write the internal member attributes to the specified file handle.
Reimplemented from ncIO.
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, ncMomentary, 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, func_vehicle, info_waypoint, logic_achievement, phys_rope, prop_rope, speaker, trigger_camera, trigger_gravity, trigger_push, NSWorldspawn, ncAttack, ncCharger, ncClient, ncPlayer, ncSpectator, ncEntity, ncItem, ncMonster, ncMoverEntity, ncActor, ncPhysicsConstraint, ncPhysicsEntity, ncPointTrigger, ncProjectile, ncRenderableEntity, ncSoundScape, ncSquadMonster, ncSurfacePropEntity, ncTalkMonster, ncTimer, ncVehicle, and ncWeapon.
void ncTrigger::SetTeam | ( | float | new_team | ) |
Assigns the entity to a given team value.
void ncTrigger::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 ncIO.
Reimplemented from ncIO.
Reimplemented in ncInteractiveSurface, 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_fire, env_fog, env_fog_controller, env_funnel, env_glow, env_instructor_hint, env_laser, env_muzzleflash, env_projectedtexture, env_shockwave, env_smoker, env_sprite, func_conveyor, func_friction, func_lod, func_monitor, func_tankmortar, func_useableladder, func_vehicle, info_particle_system, info_waypoint, light_dynamic, logic_achievement, phys_rope, point_spotlight, prop_rope, speaker, trigger_camera, trigger_gravity, trigger_push, NSWorldspawn, ncAttack, ncCharger, ncEntity, ncItem, ncMonster, ncMoverEntity, ncActor, ncPhysicsConstraint, ncPhysicsEntity, ncPointTrigger, ncProjectile, ncRenderableEntity, ncSoundScape, ncSquadMonster, ncSurfacePropEntity, ncTalkMonster, and ncWeapon.
|
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, ncDebris, ncItem, ncMonster, ncPhysicsEntity, ncProjectile, and ncTalkMonster.
|
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_projectedtexture, env_shockwave, env_smoker, env_sprite, func_conveyor, func_illusionary, func_ladder, func_monitor, func_useableladder, func_wall, info_particle_system, info_waypoint, light_dynamic, logic_achievement, point_spotlight, speaker, trigger_camera, trigger_push, ncMonster, and ncProjectile.
void ncTrigger::UseTargets | ( | entity | act, |
int | state, | ||
float | triggerDelay | ||
) |
When called will trigger its legacy targets with a given delay.