La información en este artículo es para Source. Haga clic aquí para más información.

Es/Trigger push: Difference between revisions

From Valve Developer Community
< Es
Jump to navigation Jump to search
No edit summary
No edit summary
 
Line 1: Line 1:
{{wip}}{{translating}}
{{wip}}{{translating}}
{{CD|CTriggerPush|file1=triggers.cpp}}
{{CD|CTriggerPush|file1=triggers.cpp}}
{{this is a|brush entity|name=trigger_push}} It is a trigger volume that pushes entities that touch it, ''except'' those with a {{L|parent}}.
{{this is a|brush entity|name=trigger_push}} Esta entidad tiene la función de empujar a otras entidades cuando entra en contacto con ellas, ''excepto'' las entidades {{L|parent}}.
{{bug|{{l4d2}} Does not affect Common infected and witches}}
{{bug|{{l4d2}} No afecta a los infectas comunes ni a las witches.}}
{{bug|{{csgo}} Does not affect {{L|drone}}s {{confirm}}}}
{{bug|{{csgo}} No afecta a {{L|drone}}s {{confirm}}}}


==Keyvalues==
==Valores clave==
{{KV Targetname}}
{{KV Targetname}}
{{KV|Push Direction|intn=pushdir|angle|Angles indicating the direction to push touched entities.
{{KV|Push Direction|intn=pushdir|angle|Angles indicating the direction to push touched entities.
Line 16: Line 16:
{{KV BaseTrigger}}
{{KV BaseTrigger}}


==Flags==
==Etiquetas==
{{minititle|TriggerPush}}
{{minititle|TriggerPush}}
{{Fl|128|Once Only (possibly means set velocity rather than apply acceleration)}}
{{Fl|128|Once Only (possibly means set velocity rather than apply acceleration)}}
Line 23: Line 23:
{{Fl|4096|Correctly account for object mass (<code>trigger_push</code> used to assume 100Kg) and multiple component physics objects (car, blob...)|since={{as}}}}
{{Fl|4096|Correctly account for object mass (<code>trigger_push</code> used to assume 100Kg) and multiple component physics objects (car, blob...)|since={{as}}}}


==Inputs==
==Entradas==
{{I|SetPushSpeed|param=int|Set the push speed in inches / second.|only=l4d2}}
{{I|SetPushSpeed|param=int|Set the push speed in inches / second.|only=l4d2}}
{{I|SetPushDirection|param=vector|Sets the push angle of the trigger.|since=AS|also=GMOD}}
{{I|SetPushDirection|param=vector|Sets the push angle of the trigger.|since=AS|also=GMOD}}
Line 29: Line 29:
{{I BaseTrigger}}
{{I BaseTrigger}}


==Outputs==
==Salidas==
{{O BaseTrigger}}
{{O BaseTrigger}}


== See Also ==
== Véase también ==
* {{ent|script_trigger_push}}
* {{ent|script_trigger_push}}

Latest revision as of 06:19, 4 October 2025

Under construction.png
This page is actively undergoing a major edit.
As a courtesy, please do not edit this while this message is displayed.
If this page has not been edited for at least several hours to a few days, please remove this template. This message is intended to help reduce edit conflicts; please remove it between editing sessions to allow others to edit the page.

The person who added this notice will be listed in its edit history should you wish to contact them.

Info content.png
This page is being translated.
You can help by finishing the translation.
If this page cannot be translated for some reason, or is left untranslated for an extended period of time after this notice is posted, the page should be requested to be deleted.
Also, please make sure the article complies with the alternate languages guide.(en)
C++ Class hierarchy
CTriggerPush
CBaseTrigger
CBaseToggle
CBaseEntity
C++ triggers.cpp

trigger_push es una entidad sólida (en) disponible en todos los juegos de Source Source. Esta entidad tiene la función de empujar a otras entidades cuando entra en contacto con ellas, excepto las entidades parent(en).

Icon-Bug.pngError:Left 4 Dead 2 No afecta a los infectas comunes ni a las witches.  [todo tested in ?]
Icon-Bug.pngError:Counter-Strike: Global Offensive No afecta a drone(en)s [confirmar]  [todo tested in ?]

Valores clave

Note.pngNota:Keyvalue/Targetname needs translation
Push Direction (pushdir) <angle(en)>
Angles indicating the direction to push touched entities.
Note.pngNota:In Counter-Strike: Global Offensive changing this keyvalue via "Point At..." creates a new "angles" property. Copy its value to "Push Direction".
Speed of Push (speed) <integer(en)>
The speed at which to push entities away, in inches / second.
Scale force for alternate ticks (alternateticksfix) <float(en)>
If nonzero, scale the force by this amount when running with alternate ticks. This fixes problems with an overly large force due to the longer frametime on when running with sv_alternateticks 1.
Trigger on Start Touch (triggeronstarttouch) <boolean(en)> (only in Left 4 Dead 2)
Trigger on start touch instead of on touch.
Only Falling Players (OnlyFallingPlayers) <boolean(en)> (en todos juegos desde Counter-Strike: Global Offensive) (también en Garry's Mod)
Only affect players if they are falling (and not pressing jump).
Player fall speed (FallingSpeedThreshold) <float(en)> (en todos juegos desde Counter-Strike: Global Offensive) (también en Garry's Mod)
A player must be falling this fast for them to be pushed.
BaseTrigger
Filter Name (filtername) <filter(en)>
A filter entity to test potential activators against.
Start Disabled (StartDisabled) <boolean(en)>
Stay dormant until activated (with theEnableinput).

Etiquetas

TriggerPush:

Once Only (possibly means set velocity rather than apply acceleration) : [128]
Affects Ladders (Half-Life 2) : [256]
BaseTrigger
Everything (not including physics debris) : [64]
Clients (Survivors, Special Infected, Tanks serie Left 4 Deadserie Left 4 Dead) : [1]
Only clients in vehicles : [32]
Only clients *not* in vehicles : [512]
Disallow Bots (eliminado desde Left 4 Dead) : [4096]
NPCs (Common Infected, Witches serie Left 4 Deadserie Left 4 Dead) : [2]
Only player ally NPCs : [16]
Only NPCs in vehicles (respects player ally flag) : [2048]
Physics Objects (not including physics debris) : [8]
Physics debris (include also physics debris) : [1024]
Pushables (Passes entities with classname func_pushable) : [4] Obsolete
Obsoleto.
Equivalent to using Everything + filter_activator_class that filters func_pushable.
Correctly account for object mass (trigger_push used to assume 100Kg) and multiple component physics objects (car, blob...) : [4096] (en todos juegos desde Alien Swarm)

Entradas

SetPushSpeed <integer(en)> (only in Left 4 Dead 2)
Set the push speed in inches / second.
SetPushDirection <vector(en)> (en todos juegos desde Alien Swarm) (también en Garry's Mod)
Sets the push angle of the trigger.
SetSpeed <integer(en)> (only in Portal 2: Community Edition)
Sets the push speed. Still takes alternate tick keyvalue into account.
BaseTrigger
Toggle
Toggles this trigger between enabled and disabled states.
Enable
Enable trigger
Disable
Disable trigger
TouchTest  (en todos juegos desde Source 2007)
Triggers either the OnTouching or OnNotTouching outputs for whether anything is touching this entity.
Icon-Bug.pngError:Sleeping prop_physics will never fire "OnTouching". Also applies to entities using prop_physics as base.  (tested in: Half-Life 2)
StartTouch  (en todos juegos desde Source 2007) !FGD
Behave as if the !caller entity had just entered the trigger volume. Accepts non-physical entities.
EndTouch  (en todos juegos desde Source 2007) !FGD
Behave as if !caller had just exited the trigger volume.
DisableAndEndTouch  (only in Source 2013 MultiplayerTeam Fortress 2 branch)
Disables this trigger and calls EndTouch on all currently-touching entities.

Salidas

BaseTrigger
OnStartTouch
!activator = entity that caused this output
!caller = this entity
Fired when a valid entity starts touching this trigger.
OnStartTouchAll
!activator = entity that caused this output
!caller = this entity
Fired when a valid entity starts touching this trigger, and no other entities are touching it. If there are any other entities touching the trigger when a new one begins to touch, only OnStartTouch will fire.
OnEndTouch
!activator = entity that caused this output
!caller = this entity
Fired when a valid entity stops touching this trigger.
Note.pngNota:Will also fire for entities touching it when trigger is disabled via Disable input
Warning.pngAviso:This includes entities which are deleted while inside the trigger. In this case !activator will be invalid.
Warning.pngAviso:OnEndTouch can fire before OnStartTouch under certain circumstances[Cómo?] where both are fired on the same tick and each have the same delay.
Note.pngCorrección:Add a slight delay to OnEndTouch.
OnEndTouchAll
!activator = entity that caused this output
!caller = this entity
Fired when all valid entities stop touching this trigger.
OnTouching  (en todos juegos desde Source 2007)
!activator = !caller = this entity
Fired if something is currently touching this trigger when TouchTest is fired.
OnNotTouching  (en todos juegos desde Source 2007)
!activator = !caller = this entity
Fired if nothing is currently touching this trigger when TouchTest is fired.

Véase también