GSC reference › Built-in
PushPlayer()
Built-in (engine)
Server
AI Called on: actor
Set whether this character can push the player. Don't call this unless you know what you are doing.
Signature
<actor> PushPlayer(<can push player>)
Called on an entity: actor PushPlayer(...)
Parameters
| Name | Required? | Details |
|---|---|---|
| can push player | Required | (bool) True if this character can push the player. |
Example (from Treyarch's docs)
level.elder PushPlayer( true )
Real uses in BO3's scripts
Called 10 times in the decompiled scripts. A few, zombies first:
- scripts/shared/abilities/gadgets/_gadget_clone.gsc, line 574
clone pushplayer(1); - scripts/shared/ai/archetype_human.gsc, line 454
entity pushplayer(0); - scripts/shared/ai/archetype_robot.gsc, line 952
entity pushplayer(1); - scripts/shared/ai_shared.gsc, line 628
self pushplayer(1); - scripts/mp/gametypes/escort.gsc, line 1039
robot pushplayer(1);
Related built-ins
- IsPlayer()Checks whether this entity is the player
- GetPlayers()Returns an array of the currently connected players.
- GetLocalPlayer()Get the local player predicted centity.
- PlaySoundToPlayer()Play the sound alias as if coming from the entity, so that only one player can hear it
- GetPlayerAngles()Get the player view angles
- GetLocalPlayers()Get an array of all the local players
- SetInvisibleToPlayer()Make the entity invisible to the player
- SetPlayerAngles()Set the player's view angles
- IsLocalPlayer()Returns true if the ent it's called on is a local player.
- SetHintStringForPlayer()Sets the trigger hint string for one specific player
- SetVisibleToPlayer()Make the entity visible to the player
- SetPlayerCollision()Use to turn on off the collision with the player.
New to GSC?
Start with the basics, or paste a compile error to get the fix.
Built-in descriptions, parameters and examples come from Treyarch's BO3 mod tools docs. Usage links point at shiversoftdev/t7-source (decompiled BO3 scripts).