Superfighters Deluxe
IPlayer Class Referenceabstract

Access to certain information and functions about a player. More...

Inheritance diagram for IPlayer:
IObject BaseObject
abstract bool IsDead [get]
 Gets if the player is dead More...
 
abstract void Kill ()
 Kills the player. More...
 
abstract void Gib ()
 Gibs the player. More...
 
abstract PlayerTeam GetTeam ()
 Gets the player team. More...
 
abstract void SetTeam (PlayerTeam team)
 Sets the player team. More...
 
abstract bool IsAIControlled [get]
 Returns if this player is AI controlled. The player is AI controlled when IsBot is true, BotBehavior.Active is true and when IsInputEnabled is true. More...
 
abstract bool IsBot [get]
 Gets if the player is a bot. More...
 
abstract bool IsValidBotEliminateTarget [get]
 Gets if this player can be targeted by other bots. More...
 
abstract void SetValidBotEliminateTarget (bool value)
 Sets if this player can be targeted by other bots. Defaults to true. Disable if you want some player to be ignored by all other bots. More...
 
abstract BotBehavior GetBotBehavior ()
 Gets current set BotBehavior. More...
 
abstract void SetBotBehavior (BotBehavior botBehavior)
 Sets the BotBehavior. This overrides any BotBehaviorSet set earlier. More...
 
abstract BotBehaviorSet GetBotBehaviorSet ()
 Gets current set BotBehaviorSet. More...
 
abstract void SetBotBehaviorSet (BotBehaviorSet botBehaviorSet)
 Sets the BotBehaviorSet. This overrides any PredefinedAI set earlier. More...
 
abstract bool GetBotBehaviorActive ()
 Gets if the BotBehavior is active. More...
 
abstract void SetBotBehaviorActive (bool value)
 Sets if the BotBehavior is active. More...
 
abstract void SetGuardTarget (IObject guardTarget)
 Sets the guard target to the defined object. This requires the bot's BotBehaviorSet.GuardRange property to be set. More...
 
abstract IObject GetGuardTarget ()
 Gets the current assigned guard target. More...
 
abstract IObject GetBotTarget ()
 Gets the current target if this is a bot. More...
 
abstract void SetForcedBotTarget (IObject target)
 Set a forced target if this is a bot, overriding any other targets. The bot will ignore everything else and only target this. Set to null to clear/reset the forced target. More...
 
abstract IObject GetForcedBotTarget ()
 Gets the forced target. Returns null if not set. More...
 
abstract bool IsUser [get]
 Gets if the player is controlled by a user. More...
 
abstract int UserIdentifier [get]
 Gets the active User's UserIdentifier for this player. Returns 0 if no active User is controlling this player. More...
 
abstract bool ChatActive [get]
 Gets if the user has the chat active. Quirk: Due to technical inheritance this property exist on the IPlayer instance and not the IUser instance. More...
 
abstract IUser GetUser ()
 Gets the active User for this player. Returns null if no active User is controlling this player. More...
 
abstract void SetUser (IUser user, bool flash=true)
 Sets the active user for this player. The user will lose control of any current player the user is controlling. More...
 
abstract IProfile GetProfile ()
 Gets the player's current profile. More...
 
abstract void SetProfile (IProfile profile)
 Applies the given profile to this player. More...
 
abstract bool SetBotName (string name)
 Updates a bot's profile name and player name. More...
 
abstract bool GetNametagVisible ()
 Gets if the nametag is visible. More...
 
abstract void SetNametagVisible (bool value)
 Sets if the nametag is visible. More...
 
abstract bool GetStatusBarsVisible ()
 Gets if the status bars (health, energy) are visible. More...
 
abstract void SetStatusBarsVisible (bool value)
 Sets if the status bars (health, energy) are visible. More...
 
abstract int FacingDirection [get]
 Gets the direction the player is currently facing (-1 for left, 1 for right) More...
 
abstract bool IsBurningInferno [get]
 Gets if the player is burning rank 2. More...
 
abstract bool IsBurnedCorpse [get]
 Gets if the corpse is burned (if the player is dead). More...
 
abstract bool IsInMidAir [get]
 Gets if the player is in mid air More...
 
abstract bool IsOnGround [get]
 Gets if the player is on ground More...
 
abstract bool IsRunning [get]
 Gets if the player is running More...
 
abstract bool IsSprinting [get]
 Gets if the player is sprinting More...
 
abstract bool IsWalking [get]
 Gets if the player is walking More...
 
abstract bool IsFalling [get]
 Gets if the player is falling More...
 
abstract bool IsCrouching [get]
 Gets if the player is crouching More...
 
abstract bool IsRolling [get]
 Gets if the player is rolling More...
 
abstract bool IsDiving [get]
 Gets if the player is diving More...
 
abstract bool IsStaggering [get]
 Gets if the player is staggering More...
 
abstract bool IsTakingCover [get]
 Gets if the player is taking cover More...
 
abstract bool IsClimbing [get]
 Gets if the player is climbing More...
 
abstract bool IsReloading [get]
 Gets if the player is reloading More...
 
abstract bool IsIdle [get]
 Gets if the player is idle More...
 
abstract bool IsDrawingWeapon [get]
 Gets if the player is drawing a weapon More...
 
abstract bool IsHipFiring [get]
 Gets if the player is hip firing More...
 
abstract bool IsManualAiming [get]
 Gets if the player is manual aiming More...
 
abstract Vector2 AimVector [get]
 Gets the player's current aiming vector when IsManualAiming is true. While diving this will return the current diving vector. While not aiming/diving it will return a vector at the direction the player is facing. More...
 
abstract bool IsKicking [get]
 Gets if the player is kicking More...
 
abstract bool IsBlocking [get]
 Gets if the player is blocking More...
 
abstract bool IsThrowing [get]
 Gets if the player is throwing More...
 
abstract bool InThrowingMode [get]
 Gets if the player is in throwing mode. More...
 
abstract bool IsJumpKicking [get]
 Gets if the player is jump kicking More...
 
abstract bool IsJumpAttacking [get]
 Gets if the player is jump attacking More...
 
abstract bool IsMeleeAttacking [get]
 Gets if the player is melee attacking. Note: Returns true when the player is using a chainsaw. More...
 
abstract bool IsLedgeGrabbing [get]
 Gets if the player is legde grabbing More...
 
abstract bool IsDeathKneeling [get]
 Gets if the player is death kneeling More...
 
abstract bool IsRecoveryKneeling [get]
 Gets if the player is recovery kneeling after a greater fall or jump attack. More...
 
abstract bool IsRecoveryRolling [get]
 Gets if the player is recovery rolling after being knocked down. Recovery roll can only be performed if being knocked down from small heights. More...
 
abstract bool IsLayingOnGround [get]
 Gets if the player is laying on the ground More...
 
abstract bool IsStunned [get]
 Gets if the player is stunned More...
 
abstract bool IsGrabbing [get]
 Gets if the player is grabbing More...
 
abstract bool IsCaughtByPlayerInDive [get]
 Gets if the player is caught by another diving player. More...
 
abstract int CaughtByPlayerInDiveID [get]
 Gets the ID of the diving player that has caught this player. 0 if none. More...
 
abstract bool IsHoldingPlayerInDive [get]
 Gets if the player has caught any other player during a dive. More...
 
abstract int HoldingPlayerInDiveID [get]
 Gets the ID of the caught player in a dive. 0 if none. More...
 
abstract bool IsCaughtByPlayerInGrab [get]
 Gets if the player is grabbed by another player. More...
 
abstract int CaughtByPlayerInGrabID [get]
 Gets the ID of the player that has grabbed this player. 0 if none. More...
 
abstract bool IsHoldingPlayerInGrab [get]
 Gets if the player is grabbing any other player. More...
 
abstract int HoldingPlayerInGrabID [get]
 Gets the ID of the grabbed player. 0 if none. More...
 
abstract bool IsRocketRiding [get]
 Gets if the player is currently rocket riding. More...
 
abstract int RocketRidingProjectileInstanceID [get]
 Gets the projectile instanceID of the rocket the player is currently rocket riding. More...
 
abstract bool IsDisabled [get]
 Gets if the player is disabled More...
 
abstract float GetEnergy ()
 Gets the player's current energy. More...
 
abstract float GetMaxEnergy ()
 Gets the player's max energy. More...
 
abstract PlayerHitEffect GetHitEffect ()
 Gets the player hit effect type. More...
 
abstract void SetHitEffect (PlayerHitEffect value)
 Sets the player hit effect type. More...
 
abstract bool IsStrengthBoostActive [get]
 Gets if the player has strength boost active. More...
 
abstract bool IsBoostHealthActive [get]
 Gets if the boost health is active. The player's boost health is active once the player reaches below 1 HP and has the strength boost effect active or is riding a rocket. More...
 
abstract float GetStrengthBoostTime ()
 Gets the remaining strength boost time when strength boost is active. More...
 
abstract void SetStrengthBoostTime (float time)
 Sets strength boost time. Set to 0 to deactivate. More...
 
abstract float GetBoostHealth ()
 Gets the player's current boost health. The player's boost health counts down once the player reaches below 1 HP and has the strength boost effect active or is riding a rocket. More...
 
abstract float GetCorpseHealth ()
 Gets the player's corpse health. This health starts counting once the player is dead. Once this reaches 0 and the player takes additional damage, the player will be gibbed. More...
 
abstract void SetCorpseHealth (float value)
 Sets the player's corpse health. This health starts counting once the player is dead. Once this reaches 0 and the player takes additional damage, the player will be gibbed. More...
 
abstract float GetCorpseMaxHealth ()
 Gets the player's max corpse health. This health starts counting once the player is dead. More...
 
abstract bool IsSpeedBoostActive [get]
 Gets if the player has speed boost active. More...
 
abstract float GetSpeedBoostTime ()
 Gets the remaining speed boost time when speed boost is active. More...
 
abstract void SetSpeedBoostTime (float time)
 Sets speed boost time. Set to 0 to deactivate. More...
 
abstract bool IsHoldingActiveThrowable [get]
 Gets if the player is currently holding an active/primed/ready throwable to be thrown. Use GetActiveThrowableWeaponItem() to get which weaponItem (grenade/shuriken/molotov/C4/mine) More...
 
abstract bool GiveWeaponItem (WeaponItem weaponItemToGive)
 Gives a weapon item to the player and returns if successful. More...
 
abstract void RemoveWeaponItemType (WeaponItemType weaponItemTypeToRemove)
 Removes a weapon item type from the player. More...
 
abstract WeaponItem GetActiveThrowableWeaponItem ()
 Gets if the player is currently holding an active/primed/ready throwable to be thrown and which WeaponItem it is. More...
 
abstract float GetActiveThrowableTimer ()
 Gets the remaining active timer for the current active throwable. Only applicable for grenades and it's remaining ExplosiveTimer. See also IObjectGrenadeThrown.GetExplosionTimer(). More...
 
abstract void SetActiveThrowableTimer (float ms)
 Sets the remaining active timer for the current active throwable. Only applicable for grenades and it's remaining ExplosiveTimer. See also IObjectGrenadeThrown.SetExplosionTimer(). More...
 
abstract IObject DisarmActiveThrowable ()
 Disarm override for the player to drop current active throwable. This is the active throwable when the player is holding the attack button, activating/priming/readying the throwable to be thrown. This includes primed grenade, ready shuriken, primed molotov, ready C4, primed mine. Returns null if player has no active throwable. More...
 
abstract IObject DisarmActiveThrowable (Vector2 velocity)
 Disarm override for the player to drop current active throwable. This is the active throwable when the player is holding the attack button, activating/priming/readying the throwable to be thrown. This includes primed grenade, ready shuriken, primed molotov, ready C4, primed mine. Returns null if player has no active throwable. More...
 
abstract IObjectWeaponItem Disarm (WeaponItemType weaponType)
 Disarm override for the player. Similar to dropping a weapon but there are small differences. You can use this to create disarming effects in your own scripts. Note: If the player is currently holding an active throwable (primed/ready by holding down the attack button) the player will instead drop the throwable. More...
 
abstract IObjectWeaponItem Disarm (WeaponItemType weaponType, out IObject droppedActiveThrowable)
 Disarm override for the player. Similar to dropping a weapon but there are small differences. You can use this to create disarming effects in your own scripts. Note: If the player is currently holding an active throwable (primed/ready by holding down the attack button) the player will instead drop the throwable. More...
 
abstract IObjectWeaponItem Disarm (WeaponItemType weaponType, Vector2 velocity)
 Disarm override for the player. Similar to dropping a weapon but there are small differences. You can use this to create disarming effects in your own scripts. Note: If the player is currently holding an active throwable (primed/ready by holding down the attack button) the player will instead drop the throwable. More...
 
abstract IObjectWeaponItem Disarm (WeaponItemType weaponType, Vector2 velocity, out IObject droppedActiveThrowable)
 Disarm override for the player. Similar to dropping a weapon but there are small differences. You can use this to create disarming effects in your own scripts. Note: If the player is currently holding an active throwable (primed/ready by holding down the attack button) the player will instead drop the throwable. More...
 
abstract IObjectWeaponItem Disarm (WeaponItemType weaponType, Vector2 velocity, bool ignoreHolsteredModel)
 Disarm override for the player. Similar to dropping a weapon but there are small differences. You can use this to create disarming effects in your own scripts. Note: If the player is currently holding an active throwable (primed/ready by holding down the attack button) the player will instead drop the throwable. More...
 
abstract IObjectWeaponItem Disarm (WeaponItemType weaponType, Vector2 velocity, bool ignoreHolsteredModel, out IObject droppedActiveThrowable)
 Disarm override for the player. Similar to dropping a weapon but there are small differences. You can use this to create disarming effects in your own scripts. Note: If the player is currently holding an active throwable (primed/ready by holding down the attack button) the player will instead drop the throwable. More...
 
abstract bool GetWeaponMuzzleInfo (out Vector2 worldPosition, out Vector2 direction)
 Gets the weapon muzzle positional information from the current animation from the player. This does not account for any clipping into other objects. More...
 
abstract bool GetWeaponLazerInfo (out Vector2 worldPosition, out Vector2 direction)
 Gets the weapon lazer positional information from the current animation from the player. This does not account for any clipping into other objects. More...
 
abstract WeaponItemType CurrentWeaponDrawn [get]
 Gets currently drawn weapon type. More...
 
abstract MeleeWeaponItem CurrentMeleeWeapon [get]
 Returns current melee weapon in equipment. More...
 
abstract MeleeWeaponItem CurrentMeleeMakeshiftWeapon [get]
 Returns current melee makeshift weapon in equipment. More...
 
abstract RifleWeaponItem CurrentPrimaryWeapon [get]
 Returns current primary (rifle) weapon in equipment. More...
 
abstract RangedWeaponItem CurrentPrimaryRangedWeapon [get]
 Returns current primary (rifle) weapon in equipment. More...
 
abstract HandgunWeaponItem CurrentSecondaryWeapon [get]
 Returns current secondary (handgun) weapon in equipment. More...
 
abstract RangedWeaponItem CurrentSecondaryRangedWeapon [get]
 Returns current primary (rifle) weapon in equipment. More...
 
abstract PowerupWeaponItem CurrentPowerupItem [get]
 Returns current melee weapon in equipment. More...
 
abstract ThrownWeaponItem CurrentThrownItem [get]
 Returns current throw-weapon (e.g. grenades, mines, shuriken) in equipment. More...
 
abstract void SetCurrentMeleeDurability (float value)
 Sets the current melee weapon durability. Negative or zero will destroy the item (for chainsaws it will just empty the fuel). More...
 
abstract void SetCurrentMeleeMakeshiftDurability (float value)
 Sets the current melee makeshift weapon durability. Negative or zero will destroy the item. More...
 
abstract void SetCurrentPrimaryWeaponAmmo (int totalAmmo, ProjectilePowerup projectileType=ProjectilePowerup.None)
 Sets the ammo in the current primary weapon or sets the ammo for specified powerup ammo type. More...
 
abstract void SetCurrentPrimaryWeaponAmmo (int ammo, int mags, ProjectilePowerup projectileType=ProjectilePowerup.None)
 Sets the ammo in the current primary weapon or sets the ammo for specified powerup ammo type. More...
 
abstract void SetCurrentSecondaryWeaponAmmo (int totalAmmo, ProjectilePowerup projectileType=ProjectilePowerup.None)
 Sets the ammo in the current secondary weapon or sets the ammo for specified powerup ammo type. More...
 
abstract void SetCurrentSecondaryWeaponAmmo (int ammo, int mags, ProjectilePowerup projectileType=ProjectilePowerup.None)
 Sets the ammo in the current secondary weapon or sets the ammo for specified powerup ammo type. More...
 
abstract void SetCurrentThrownItemAmmo (int throwableAmmo)
 Sets the current throwable-weapon ammo. More...
 
abstract IPlayerStatistics Statistics [get]
 Gets certain player statistics. More...
 
abstract bool IsInputEnabled [get]
 Gets if input for the player is enabled. When disabled the player can't do anything and input is ignored. This allows PlayerCommands to be executed. More...
 
abstract PlayerInputMode InputMode [get]
 Gets input mode. More...
 
abstract void SetInputEnabled (bool value)
 Sets input enabled/disabled for the player. When disabled the player can't do anything and input is ignored. This allows PlayerCommands to be executed. More...
 
abstract void SetInputMode (PlayerInputMode value)
 Sets input mode. More...
 
abstract CameraFocusMode GetCameraSecondaryFocusMode ()
 Gets the default camera secondary focus mode. More...
 
abstract void SetCameraSecondaryFocusMode (CameraFocusMode value)
 Sets the default camera secondary focus mode. More...
 
abstract int PerformedCommandCount [get]
 Returns the number of performed command actions. More...
 
abstract int CurrentCommandIndex [get]
 Returns the current command action index being processed. If this equals to PerformedCommandActionsCount then no more command actions are queued. More...
 
abstract int TotalCommandCount [get]
 Total queued command actions. More...
 
abstract int AddCommand (PlayerCommand command)
 Adds a command action to the command action queue. Used to create a small sequence of movements and actions for a specific player to create scripted scenes in known situations. These commands are not intended to be used to create an AI. Incorrect use of these commands can get the player stuck in a command that's impossible to complete depending on the situation and commands performed. The ClearCommandQueue() resets the current command queue if needed. PlayerCommands only works when there are no user or AI controlling the player. Note: Any commands added will start to be processed the next update cycle. /// More...
 
abstract void ClearCommandQueue ()
 Clears the current command queue. Current command will be terminated. More...
 
abstract PlayerModifiers GetModifiers ()
 Gets current player modifier values. More...
 
abstract void SetModifiers (PlayerModifiers value)
 Sets current player modifier values. More...
 
abstract void ClearModifiers ()
 Clears current player modifier values, restoring them to defaults. More...
 
abstract bool KeyMovementIsFlipped [get]
 Gets if the movement is flipped after walking into a portal. More...
 
abstract bool KeyDoubleTapSprintEnabled [get]
 Gets if double tapping direction keys enable sprint. Note: This is only up-to-date after the first key input has been registered. More...
 
abstract bool KeyAttackAndBlockToGrabEnabled [get]
 Gets if pressing attack and block should start the grab is enabled. Note: This is only up-to-date after the first key input has been registered. More...
 
abstract bool KeyPressed (VirtualKey key)
 Gets if the virtual key is pressed for the player. More...
 

Additional Inherited Members

- Public Member Functions inherited from IObject
abstract Vector2 GetWorldPosition ()
 Gets the world position. More...
 
abstract void SetWorldPosition (Vector2 worldPosition)
 Sets the world position. More...
 
abstract void SetWorldPosition (Vector2 worldPosition, bool updateConnectedObjects)
 Sets the world position. More...
 
abstract float GetAngle ()
 Gets the current angle in radians. More...
 
abstract void SetAngle (float value)
 Sets the current angle in radians. More...
 
abstract void SetAngle (float value, bool updateConnectedObjects)
 Sets the current angle in radians. More...
 
abstract int GetFaceDirection ()
 Gets the face direction. More...
 
abstract void SetFaceDirection (int value)
 Sets the face direction. More...
 
abstract Vector2 GetLinearVelocity ()
 Gets the linear velocity. More...
 
abstract void SetLinearVelocity (Vector2 value)
 Sets the linear velocity. More...
 
abstract void SetLinearVelocity (Vector2 value, bool updateConnectedObjects)
 Sets the linear velocity. More...
 
abstract float GetAngularVelocity ()
 Gets the angular velocity. More...
 
abstract void SetAngularVelocity (float value)
 Sets the angular velocity. More...
 
abstract void SetAngularVelocity (float value, bool updateConnectedObjects)
 Sets the angular velocity. More...
 
abstract Area GetAABB ()
 Gets the world AABB for this object. More...
 
abstract BodyType GetBodyType ()
 Gets the body type. More...
 
abstract void SetBodyType (BodyType type)
 Sets the body type. More...
 
abstract float GetHealth ()
 Gets the object's current health. More...
 
abstract void SetHealth (float value)
 Sets the object's current health. This is capped to the object's maximum health. More...
 
abstract float GetMaxHealth ()
 Gets the object's maximum health. More...
 
abstract void SetMaxFire ()
 Sets the object to maximum fire level. Only objects that can burn will start to burn. More...
 
abstract void ClearFire ()
 Clears the fire on the object. More...
 
abstract void Remove ()
 Removes the object. Certain objects may override this and can't be removed. More...
 
abstract void Destroy ()
 Destroyes the object. Certain objects may override this and can't be destroyed. More...
 
abstract void DealDamage (float damage)
 Forcefully deals damage to the object. The object will be destoryed if it's destructable and health reaches 0. Runs the ObjectDamageCallback event if registered with ObjectDamageType.Other if not currently running for the specific IObject to avoid recursive traps. More...
 
abstract void DealDamage (float damage, int sourceID)
 Forcefully deals damage to the object. The object will be destoryed if it's destructable and health reaches 0. Runs the ObjectDamageCallback event if registered with ObjectDamageType.Other if not currently running for the specific IObject to avoid recursive traps. More...
 
abstract bool GetTargetAIEnabled ()
 Gets if this object is enabled for bots to target. Note: For players, this is the same as IPlayer.IsValidBotEliminateTarget. More...
 
abstract void SetTargetAIEnabled (bool targetAIEnabled)
 Sets if this object is enabled for bots to target. Note: For players, this is the same as IPlayer.SetValidBotEliminateTarget(bool value). More...
 
abstract ObjectAITargetData GetTargetAIData ()
 Gets current target data for bots. Note: Use GetTargetAIEnabled() to see if target data is enabled. More...
 
abstract void SetTargetAIData (ObjectAITargetData targetAIData, bool targetAIEnabled=true)
 Sets target data for bots and enables this object to be targeted by bots. Note: The team parameter is ignored for Players and Streetsweepers - as they handle Teams differently! Note: Bots will attack this target even if it's undestructable - you must make sure the object is a valid target for bots to try to attack. Note: For objects consisting of many tiles/fixtures/parts it's much better to cover the entire object with an invisible no-collision block with some extra margin of 4 to 8 world units that the bot can target and perform ranged weapon LOS checks against. In this way, the bot only sees one targetable object that's not blocked by anything instead of many individual fixtures that can block each other. More...
 
abstract Point GetSizeFactor ()
 Gets the size factor on the object. More...
 
abstract void SetSizeFactor (Point size)
 Sets the size factor on the object. More...
 
abstract Point GetBaseSize ()
 Gets the base tile size of this object. More...
 
abstract Point GetSize ()
 Gets the current total size on the object. This is BaseSize * SizeFactor. More...
 
abstract int GetAnimationFrame ()
 Gets the current animation frame index. More...
 
abstract int GetTotalAnimationFrames ()
 Gets the total animation frames for the object. More...
 
abstract void SetAnimationFrame (int frame)
 Sets the current animation frame index. More...
 
abstract void SetAnimationFrame (int frame, bool paused)
 Sets the current animation frame index. More...
 
abstract bool IsAnimationPaused ()
 Gets if the current animation is paused. More...
 
abstract void PauseAnimation ()
 Pauses the current animation. More...
 
abstract void PlayAnimation ()
 Resumes the current animation from a paused state. More...
 
abstract void TrackAsMissile (bool value)
 Track the object as a missile. Missile objects can collide with players and deal damage based on velocity even if collision is disabled. Normally used for smaller objects being thrown. Once the object collides with the world it will lose it's missile status. More...
 
abstract void SetStickyFeet (bool value)
 Sets if the object should have sticky feet activated. Sticky feet will make the player stick to the object even if it changes velocity suddenly. Good for elevators. More...
 
abstract bool GetStickyFeet ()
 Gets if the object has sticky feet activated. Sticky feet will make the player stick to the object even if it changes velocity suddenly. More...
 
abstract float GetMass ()
 Gets the box2D mass for the object. More...
 
abstract void SetMass (float mass)
 Sets the box2D mass for the object. Only affects dynamic objects. More...
 
abstract CollisionFilter GetCollisionFilter ()
 Gets the total collision filter for all fixtures for this object. Note that some objects consist of multiple fixtures with different collisions. More...
 
abstract void SetCollisionFilter (CollisionFilter value)
 Sets the collision filter for all fixtures for this object. This overrides the default collision filters for each fixture in the body. This does nothing for players. Use with care! More...
 
abstract RayCastResult RayCast (Vector2 start, Vector2 end)
 Performs a ray cast on this specific object, returning the hit result. Always returns a false hit if the object is disposed or removed. More...
 
abstract RayCastResult RayCast (Vector2 start, Vector2 end, bool includeOverlap)
 Performs a ray cast on this specific object, returning the hit result. Always returns a false hit if the object is disposed or removed. More...
 
abstract bool HitTest (Vector2 position)
 Performs a hittest on this object. More...
 
abstract PhysicsLayer GetPhysicsLayer ()
 Gets the physics layer this object belongs to. Returns None if the object is removed. More...
 
abstract string GetColorPaletteName ()
 Gets the color palette for this object. More...
 
abstract string[] GetColors ()
 Gets the names of the primary, secondary and tertiary ColorPackage in the ColorPalette for this object item. Returns a fixed 3-element string array. More...
 
abstract string GetColor1 ()
 Gets the name of the primary ColorPackage in the ColorPalette for this object item. This is the same as the first item of the GetColors function: GetColors()[0]. More...
 
abstract string GetColor2 ()
 Gets the name of the secondary ColorPackage in the ColorPalette for this object item. /// This is the same as the second item of the GetColors function: GetColors()[1]. More...
 
abstract string GetColor3 ()
 Gets the name of the tertiary ColorPackage in the ColorPalette for this object item. This is the same as the third item of the GetColors function: GetColors()[2]. More...
 
abstract bool SetColors (string[] colorPackages)
 Sets the names of the primary, secondary and tertiary ColorPackage in the ColorPalette for this object item. Returns true if any color was applied. False if no color was applied (the colors must be defined in the color palette for this object). More...
 
abstract bool SetColor1 (string colorPackage)
 Sets the name of the primary ColorPackage in the ColorPalette for this object item. Returns true if the color was applied (the color must be defined in the color palette for this object). More...
 
abstract bool SetColor2 (string colorPackage)
 Sets the name of the secondary ColorPackage in the ColorPalette for this object item. Returns true if the color was applied (the color must be defined in the color palette for this object). More...
 
abstract bool SetColor3 (string colorPackage)
 Sets the name of the tertiary ColorPackage in the ColorPalette for this object item. Returns true if the color was applied (the color must be defined in the color palette for this object). More...
 
- Properties inherited from IObject
abstract string Name [get]
 Gets the object's map name More...
 
abstract string CustomID [get, set]
 Gets or Sets the object's custom ID More...
 
abstract int UniqueID [get]
 Gets the unique ID for this object. More...
 
abstract bool IsBurning [get]
 If this object is burning. More...
 
abstract bool CanBurn [get]
 If this object can burn. More...
 
abstract bool IsRemoved [get]
 Gets if the object is completely removed. More...
 
abstract bool RemovalInitiated [get]
 Gets if this body is about to be removed next clean-cycle. More...
 
abstract bool DestructionInitiated [get]
 Gets if this object is about to be destroyed next clean-cycle. More...
 
abstract bool Destructable [get]
 Gets if this object is destructable (initial health > 0). This does not account for any possible modifiers. Always returns true for players. More...
 
abstract SizeableType Sizeable [get]
 Gets the SizeableType enum of the object that tells how the object can be sized. More...
 
abstract bool IsMissile [get]
 Gets if the object currently is tracked as a missile. Missile objects can collide with players and deal damage based on velocity even if collision is disabled. Normally used for smaller objects being thrown. Once the object collides with the world it will lose it's missile status. More...
 

Detailed Description

Access to certain information and functions about a player.

Member Function Documentation

◆ AddCommand()

abstract int AddCommand ( PlayerCommand  command)
pure virtual

Adds a command action to the command action queue. Used to create a small sequence of movements and actions for a specific player to create scripted scenes in known situations. These commands are not intended to be used to create an AI. Incorrect use of these commands can get the player stuck in a command that's impossible to complete depending on the situation and commands performed. The ClearCommandQueue() resets the current command queue if needed. PlayerCommands only works when there are no user or AI controlling the player. Note: Any commands added will start to be processed the next update cycle. ///

/*
 // Example use:
 IPlayer player = Game.CreatePlayer(Vector2.Zero);
 player.AddCommand(new PlayerCommand(PlayerCommandType.StartMoveToPosition, new Vector2(100f, 0f))); // player will start to move to world position X = 100
 player.AddCommand(new PlayerCommand(PlayerCommandType.Walk)); // player will walk instead of run
 player.AddCommand(new PlayerCommand(PlayerCommandType.WaitDestinationReached)); // wait for destination reached
 player.AddCommand(new PlayerCommand(PlayerCommandType.Jump, PlayerCommandFaceDirection.Left)); // jump after destination reached and face left
 player.AddCommand(new PlayerCommand(PlayerCommandType.WaitLand)); // wait to land after jump
 player.AddCommand(new PlayerCommand(PlayerCommandType.Dive, PlayerCommandFaceDirection.Left)); // dive to the left
 // other actions
 player.AddCommand(new PlayerCommand(PlayerCommandType.StartTakeCover, Game.GetSingleObjectByCustomID("BarrelWithCustomID").UniqueID)); // take cover behind object with custom ID "BarrelWithCustomID" (this also makes the player move to the cover if the player is too far away).
 player.AddCommand(new PlayerCommand(PlayerCommandType.DrawHandgun)); // draws the handgun (if the player has a handgun)
 player.AddCommand(new PlayerCommand(PlayerCommandType.StartCrouch)); // makes the player start crouching (until PlayerCommandType.StopCrouch is called)
*/
///
Returns
Action sequence count

◆ ClearCommandQueue()

abstract void ClearCommandQueue ( )
pure virtual

Clears the current command queue. Current command will be terminated.

◆ ClearModifiers()

abstract void ClearModifiers ( )
pure virtual

Clears current player modifier values, restoring them to defaults.

◆ Disarm() [1/6]

abstract IObjectWeaponItem Disarm ( WeaponItemType  weaponType)
pure virtual

Disarm override for the player. Similar to dropping a weapon but there are small differences. You can use this to create disarming effects in your own scripts. Note: If the player is currently holding an active throwable (primed/ready by holding down the attack button) the player will instead drop the throwable.

Parameters
weaponTypeWeapon type to drop
Returns
Dropped item. Returns null if no item exist to disarm.

◆ Disarm() [2/6]

abstract IObjectWeaponItem Disarm ( WeaponItemType  weaponType,
out IObject  droppedActiveThrowable 
)
pure virtual

Disarm override for the player. Similar to dropping a weapon but there are small differences. You can use this to create disarming effects in your own scripts. Note: If the player is currently holding an active throwable (primed/ready by holding down the attack button) the player will instead drop the throwable.

Parameters
weaponTypeWeapon type to drop
Returns
Dropped item. Returns null if no item exist to disarm.
Parameters
droppedActiveThrowableThe dropped active throwable if the player was holding an active throwable and WeaponType to disarm was Thrown. You can also use IPlayer.DisarmActiveThrowable() separatly for disarming active throwables.

◆ Disarm() [3/6]

abstract IObjectWeaponItem Disarm ( WeaponItemType  weaponType,
Vector2  velocity 
)
pure virtual

Disarm override for the player. Similar to dropping a weapon but there are small differences. You can use this to create disarming effects in your own scripts. Note: If the player is currently holding an active throwable (primed/ready by holding down the attack button) the player will instead drop the throwable.

Parameters
weaponTypeWeapon type to drop
Returns
Dropped item. Returns null if no item exist to disarm.

◆ Disarm() [4/6]

abstract IObjectWeaponItem Disarm ( WeaponItemType  weaponType,
Vector2  velocity,
bool  ignoreHolsteredModel 
)
pure virtual

Disarm override for the player. Similar to dropping a weapon but there are small differences. You can use this to create disarming effects in your own scripts. Note: If the player is currently holding an active throwable (primed/ready by holding down the attack button) the player will instead drop the throwable.

Parameters
weaponTypeWeapon type to drop
powerthe power modifier of the drop, new Vector2(1f) to use default velocity for the dropped weapon
ignoreHolsteredModelbool if the holstered model should be ignored, usefull if the player dies or is disarmed
Returns
Dropped item. Returns null if no item exist to disarm.

◆ Disarm() [5/6]

abstract IObjectWeaponItem Disarm ( WeaponItemType  weaponType,
Vector2  velocity,
bool  ignoreHolsteredModel,
out IObject  droppedActiveThrowable 
)
pure virtual

Disarm override for the player. Similar to dropping a weapon but there are small differences. You can use this to create disarming effects in your own scripts. Note: If the player is currently holding an active throwable (primed/ready by holding down the attack button) the player will instead drop the throwable.

Parameters
weaponTypeWeapon type to drop
powerthe power modifier of the drop, new Vector2(1f) to use default velocity for the dropped weapon
ignoreHolsteredModelbool if the holstered model should be ignored, usefull if the player dies or is disarmed
Returns
Dropped item. Returns null if no item exist to disarm.
Parameters
droppedActiveThrowableThe dropped active throwable if the player was holding an active throwable and WeaponType to disarm was Thrown. You can also use IPlayer.DisarmActiveThrowable() separatly for disarming active throwables.

◆ Disarm() [6/6]

abstract IObjectWeaponItem Disarm ( WeaponItemType  weaponType,
Vector2  velocity,
out IObject  droppedActiveThrowable 
)
pure virtual

Disarm override for the player. Similar to dropping a weapon but there are small differences. You can use this to create disarming effects in your own scripts. Note: If the player is currently holding an active throwable (primed/ready by holding down the attack button) the player will instead drop the throwable.

Parameters
weaponTypeWeapon type to drop
Returns
Dropped item. Returns null if no item exist to disarm.
Parameters
droppedActiveThrowableThe dropped active throwable if the player was holding an active throwable and WeaponType to disarm was Thrown. You can also use IPlayer.DisarmActiveThrowable() separatly for disarming active throwables.

◆ DisarmActiveThrowable() [1/2]

abstract IObject DisarmActiveThrowable ( )
pure virtual

Disarm override for the player to drop current active throwable. This is the active throwable when the player is holding the attack button, activating/priming/readying the throwable to be thrown. This includes primed grenade, ready shuriken, primed molotov, ready C4, primed mine. Returns null if player has no active throwable.

Returns
The dropped/disarmed active throwable.

◆ DisarmActiveThrowable() [2/2]

abstract IObject DisarmActiveThrowable ( Vector2  velocity)
pure virtual

Disarm override for the player to drop current active throwable. This is the active throwable when the player is holding the attack button, activating/priming/readying the throwable to be thrown. This includes primed grenade, ready shuriken, primed molotov, ready C4, primed mine. Returns null if player has no active throwable.

Parameters
velocityVelocity to drop the active throwable
Returns
The dropped/disarmed active throwable.

◆ GetActiveThrowableTimer()

abstract float GetActiveThrowableTimer ( )
pure virtual

Gets the remaining active timer for the current active throwable. Only applicable for grenades and it's remaining ExplosiveTimer. See also IObjectGrenadeThrown.GetExplosionTimer().

Returns
float time in ms

◆ GetActiveThrowableWeaponItem()

abstract WeaponItem GetActiveThrowableWeaponItem ( )
pure virtual

Gets if the player is currently holding an active/primed/ready throwable to be thrown and which WeaponItem it is.

Returns

◆ GetBoostHealth()

abstract float GetBoostHealth ( )
pure virtual

Gets the player's current boost health. The player's boost health counts down once the player reaches below 1 HP and has the strength boost effect active or is riding a rocket.

Returns

◆ GetBotBehavior()

abstract BotBehavior GetBotBehavior ( )
pure virtual

Gets current set BotBehavior.

BotBehavior can only control players if Active, IPlayer.IsBot is true and IPlayer.IsInputEnabled is true.

Returns
BotBehavior

◆ GetBotBehaviorActive()

abstract bool GetBotBehaviorActive ( )
pure virtual

Gets if the BotBehavior is active.

◆ GetBotBehaviorSet()

abstract BotBehaviorSet GetBotBehaviorSet ( )
pure virtual

Gets current set BotBehaviorSet.

BotBehaviorSet can only control players if Active, IPlayer.IsBot is true and IPlayer.IsInputEnabled is true.

Returns
BotBehaviorSet

◆ GetBotTarget()

abstract IObject GetBotTarget ( )
pure virtual

Gets the current target if this is a bot.

Returns

◆ GetCameraSecondaryFocusMode()

abstract CameraFocusMode GetCameraSecondaryFocusMode ( )
pure virtual

Gets the default camera secondary focus mode.

◆ GetCorpseHealth()

abstract float GetCorpseHealth ( )
pure virtual

Gets the player's corpse health. This health starts counting once the player is dead. Once this reaches 0 and the player takes additional damage, the player will be gibbed.

Returns
float corpse health.

◆ GetCorpseMaxHealth()

abstract float GetCorpseMaxHealth ( )
pure virtual

Gets the player's max corpse health. This health starts counting once the player is dead.

Returns
float max corpse health

◆ GetEnergy()

abstract float GetEnergy ( )
pure virtual

Gets the player's current energy.

◆ GetForcedBotTarget()

abstract IObject GetForcedBotTarget ( )
pure virtual

Gets the forced target. Returns null if not set.

Returns
IObject, null if not set

◆ GetGuardTarget()

abstract IObject GetGuardTarget ( )
pure virtual

Gets the current assigned guard target.

Returns
IObject

◆ GetHitEffect()

abstract PlayerHitEffect GetHitEffect ( )
pure virtual

Gets the player hit effect type.

◆ GetMaxEnergy()

abstract float GetMaxEnergy ( )
pure virtual

Gets the player's max energy.

◆ GetModifiers()

abstract PlayerModifiers GetModifiers ( )
pure virtual

Gets current player modifier values.

Returns
PlayerModifiers

◆ GetNametagVisible()

abstract bool GetNametagVisible ( )
pure virtual

Gets if the nametag is visible.

◆ GetProfile()

abstract IProfile GetProfile ( )
pure virtual

Gets the player's current profile.

Returns

◆ GetSpeedBoostTime()

abstract float GetSpeedBoostTime ( )
pure virtual

Gets the remaining speed boost time when speed boost is active.

◆ GetStatusBarsVisible()

abstract bool GetStatusBarsVisible ( )
pure virtual

Gets if the status bars (health, energy) are visible.

◆ GetStrengthBoostTime()

abstract float GetStrengthBoostTime ( )
pure virtual

Gets the remaining strength boost time when strength boost is active.

◆ GetTeam()

abstract PlayerTeam GetTeam ( )
pure virtual

Gets the player team.

◆ GetUser()

abstract IUser GetUser ( )
pure virtual

Gets the active User for this player. Returns null if no active User is controlling this player.

Returns
Active User for the player.

◆ GetWeaponLazerInfo()

abstract bool GetWeaponLazerInfo ( out Vector2  worldPosition,
out Vector2  direction 
)
pure virtual

Gets the weapon lazer positional information from the current animation from the player. This does not account for any clipping into other objects.

Parameters
worldPositionout Vector2 worldPosition
directionout Vector2 rotation/direction
Returns
bool true if weapon specific information used, false if default information used (like not currently having a weapon drawn)

◆ GetWeaponMuzzleInfo()

abstract bool GetWeaponMuzzleInfo ( out Vector2  worldPosition,
out Vector2  direction 
)
pure virtual

Gets the weapon muzzle positional information from the current animation from the player. This does not account for any clipping into other objects.

Parameters
worldPositionout Vector2 worldPosition
directionout Vector2 rotation/direction
Returns
bool true if weapon specific information used, false if default information used (like not currently having a weapon drawn)

◆ Gib()

abstract void Gib ( )
pure virtual

Gibs the player.

◆ GiveWeaponItem()

abstract bool GiveWeaponItem ( WeaponItem  weaponItemToGive)
pure virtual

Gives a weapon item to the player and returns if successful.

Parameters
weaponItemToGiveweapon item to give

◆ KeyPressed()

abstract bool KeyPressed ( VirtualKey  key)
pure virtual

Gets if the virtual key is pressed for the player.

Returns
bool

◆ Kill()

abstract void Kill ( )
pure virtual

Kills the player.

◆ RemoveWeaponItemType()

abstract void RemoveWeaponItemType ( WeaponItemType  weaponItemTypeToRemove)
pure virtual

Removes a weapon item type from the player.

Parameters
weaponItemTypeToRemoveweapon item type to remove

◆ SetActiveThrowableTimer()

abstract void SetActiveThrowableTimer ( float  ms)
pure virtual

Sets the remaining active timer for the current active throwable. Only applicable for grenades and it's remaining ExplosiveTimer. See also IObjectGrenadeThrown.SetExplosionTimer().

Parameters
msfloat time in ms, min allowed 1 (will make the grenade explode next frame). Values under 1f will set this to 1f.

◆ SetBotBehavior()

abstract void SetBotBehavior ( BotBehavior  botBehavior)
pure virtual

Sets the BotBehavior. This overrides any BotBehaviorSet set earlier.

BotBehavior can only control players if Active, IPlayer.IsBot is true and IPlayer.IsInputEnabled is true.

Parameters
botBehaviorNew bot type

◆ SetBotBehaviorActive()

abstract void SetBotBehaviorActive ( bool  value)
pure virtual

Sets if the BotBehavior is active.

◆ SetBotBehaviorSet()

abstract void SetBotBehaviorSet ( BotBehaviorSet  botBehaviorSet)
pure virtual

Sets the BotBehaviorSet. This overrides any PredefinedAI set earlier.

BotBehaviorSet can only control players if Active, IPlayer.IsBot is true and IPlayer.IsInputEnabled is true.

Parameters
botBehaviorSetNew bot behavior set

◆ SetBotName()

abstract bool SetBotName ( string  name)
pure virtual

Updates a bot's profile name and player name.

Parameters
nameNew name. Must be at least 2 none-whitespace characters.
Returns
True if name was updated.

◆ SetCameraSecondaryFocusMode()

abstract void SetCameraSecondaryFocusMode ( CameraFocusMode  value)
pure virtual

Sets the default camera secondary focus mode.

Parameters
valueCameraFocusMode

◆ SetCorpseHealth()

abstract void SetCorpseHealth ( float  value)
pure virtual

Sets the player's corpse health. This health starts counting once the player is dead. Once this reaches 0 and the player takes additional damage, the player will be gibbed.

Parameters
valuefloat corpse health

◆ SetCurrentMeleeDurability()

abstract void SetCurrentMeleeDurability ( float  value)
pure virtual

Sets the current melee weapon durability. Negative or zero will destroy the item (for chainsaws it will just empty the fuel).

Parameters
valueDurability value [0-1]

◆ SetCurrentMeleeMakeshiftDurability()

abstract void SetCurrentMeleeMakeshiftDurability ( float  value)
pure virtual

Sets the current melee makeshift weapon durability. Negative or zero will destroy the item.

Parameters
valueDurability value [0-1]

◆ SetCurrentPrimaryWeaponAmmo() [1/2]

abstract void SetCurrentPrimaryWeaponAmmo ( int  ammo,
int  mags,
ProjectilePowerup  projectileType = ProjectilePowerup.None 
)
pure virtual

Sets the ammo in the current primary weapon or sets the ammo for specified powerup ammo type.

Parameters
ammoWeapon ammo count
magsWeapon mags (count towards total ammo based on magsize for the weapon)
projectileProjectile type. Note: Only one powerup ammo type can be active at any time for one weapon.

◆ SetCurrentPrimaryWeaponAmmo() [2/2]

abstract void SetCurrentPrimaryWeaponAmmo ( int  totalAmmo,
ProjectilePowerup  projectileType = ProjectilePowerup.None 
)
pure virtual

Sets the ammo in the current primary weapon or sets the ammo for specified powerup ammo type.

Parameters
totalAmmoTotal ammo count
projectileProjectile type. Note: Only one powerup ammo type can be active at any time for one weapon.

◆ SetCurrentSecondaryWeaponAmmo() [1/2]

abstract void SetCurrentSecondaryWeaponAmmo ( int  ammo,
int  mags,
ProjectilePowerup  projectileType = ProjectilePowerup.None 
)
pure virtual

Sets the ammo in the current secondary weapon or sets the ammo for specified powerup ammo type.

Parameters
ammoWeapon ammo count
magsWeapon mags (count towards total ammo based on magsize for the weapon)
projectileProjectile type. Note: Only one powerup ammo type can be active at any time for one weapon.

◆ SetCurrentSecondaryWeaponAmmo() [2/2]

abstract void SetCurrentSecondaryWeaponAmmo ( int  totalAmmo,
ProjectilePowerup  projectileType = ProjectilePowerup.None 
)
pure virtual

Sets the ammo in the current secondary weapon or sets the ammo for specified powerup ammo type.

Parameters
totalAmmoTotal ammo count
projectileProjectile type. Note: Only one powerup ammo type can be active at any time for one weapon.

◆ SetCurrentThrownItemAmmo()

abstract void SetCurrentThrownItemAmmo ( int  throwableAmmo)
pure virtual

Sets the current throwable-weapon ammo.

Parameters
throwableAmmoAmmo amount. Zero or negative will removed the item. Ammo will be capped at the max ammo capacity of the item.

◆ SetForcedBotTarget()

abstract void SetForcedBotTarget ( IObject  target)
pure virtual

Set a forced target if this is a bot, overriding any other targets. The bot will ignore everything else and only target this. Set to null to clear/reset the forced target.

Parameters
targetNew target. Use null to clear/reset this.

◆ SetGuardTarget()

abstract void SetGuardTarget ( IObject  guardTarget)
pure virtual

Sets the guard target to the defined object. This requires the bot's BotBehaviorSet.GuardRange property to be set.

Parameters
guardTargetGuard target

◆ SetHitEffect()

abstract void SetHitEffect ( PlayerHitEffect  value)
pure virtual

Sets the player hit effect type.

Parameters
valuePlayerHitEffect

◆ SetInputEnabled()

abstract void SetInputEnabled ( bool  value)
pure virtual

Sets input enabled/disabled for the player. When disabled the player can't do anything and input is ignored. This allows PlayerCommands to be executed.

Parameters
value

◆ SetInputMode()

abstract void SetInputMode ( PlayerInputMode  value)
pure virtual

Sets input mode.

Parameters
valuePlayerInputMode.

◆ SetModifiers()

abstract void SetModifiers ( PlayerModifiers  value)
pure virtual

Sets current player modifier values.

Returns
PlayerModifiers

◆ SetNametagVisible()

abstract void SetNametagVisible ( bool  value)
pure virtual

Sets if the nametag is visible.

◆ SetProfile()

abstract void SetProfile ( IProfile  profile)
pure virtual

Applies the given profile to this player.

Parameters
profile

◆ SetSpeedBoostTime()

abstract void SetSpeedBoostTime ( float  time)
pure virtual

Sets speed boost time. Set to 0 to deactivate.

Parameters
timeTime in in-game milliseconds.

◆ SetStatusBarsVisible()

abstract void SetStatusBarsVisible ( bool  value)
pure virtual

Sets if the status bars (health, energy) are visible.

◆ SetStrengthBoostTime()

abstract void SetStrengthBoostTime ( float  time)
pure virtual

Sets strength boost time. Set to 0 to deactivate.

Parameters
timeTime in in-game milliseconds.

◆ SetTeam()

abstract void SetTeam ( PlayerTeam  team)
pure virtual

Sets the player team.

Parameters
team

◆ SetUser()

abstract void SetUser ( IUser  user,
bool  flash = true 
)
pure virtual

Sets the active user for this player. The user will lose control of any current player the user is controlling.

Parameters
userUser to let control the player.
flashIf the player should flash when the new user is assigned. The flashing is only visible to the user itself.

◆ SetValidBotEliminateTarget()

abstract void SetValidBotEliminateTarget ( bool  value)
pure virtual

Sets if this player can be targeted by other bots. Defaults to true. Disable if you want some player to be ignored by all other bots.

Parameters
valuebool is valid target

Property Documentation

◆ AimVector

abstract Vector2 AimVector
get

Gets the player's current aiming vector when IsManualAiming is true. While diving this will return the current diving vector. While not aiming/diving it will return a vector at the direction the player is facing.

◆ CaughtByPlayerInDiveID

abstract int CaughtByPlayerInDiveID
get

Gets the ID of the diving player that has caught this player. 0 if none.

◆ CaughtByPlayerInGrabID

abstract int CaughtByPlayerInGrabID
get

Gets the ID of the player that has grabbed this player. 0 if none.

◆ ChatActive

abstract bool ChatActive
get

Gets if the user has the chat active. Quirk: Due to technical inheritance this property exist on the IPlayer instance and not the IUser instance.

◆ CurrentCommandIndex

abstract int CurrentCommandIndex
get

Returns the current command action index being processed. If this equals to PerformedCommandActionsCount then no more command actions are queued.

◆ CurrentMeleeMakeshiftWeapon

abstract MeleeWeaponItem CurrentMeleeMakeshiftWeapon
get

Returns current melee makeshift weapon in equipment.

◆ CurrentMeleeWeapon

abstract MeleeWeaponItem CurrentMeleeWeapon
get

Returns current melee weapon in equipment.

◆ CurrentPowerupItem

abstract PowerupWeaponItem CurrentPowerupItem
get

Returns current melee weapon in equipment.

◆ CurrentPrimaryRangedWeapon

abstract RangedWeaponItem CurrentPrimaryRangedWeapon
get

Returns current primary (rifle) weapon in equipment.

◆ CurrentPrimaryWeapon

abstract RifleWeaponItem CurrentPrimaryWeapon
get

Returns current primary (rifle) weapon in equipment.

◆ CurrentSecondaryRangedWeapon

abstract RangedWeaponItem CurrentSecondaryRangedWeapon
get

Returns current primary (rifle) weapon in equipment.

◆ CurrentSecondaryWeapon

abstract HandgunWeaponItem CurrentSecondaryWeapon
get

Returns current secondary (handgun) weapon in equipment.

◆ CurrentThrownItem

abstract ThrownWeaponItem CurrentThrownItem
get

Returns current throw-weapon (e.g. grenades, mines, shuriken) in equipment.

◆ CurrentWeaponDrawn

abstract WeaponItemType CurrentWeaponDrawn
get

Gets currently drawn weapon type.

◆ FacingDirection

abstract int FacingDirection
get

Gets the direction the player is currently facing (-1 for left, 1 for right)

◆ HoldingPlayerInDiveID

abstract int HoldingPlayerInDiveID
get

Gets the ID of the caught player in a dive. 0 if none.

◆ HoldingPlayerInGrabID

abstract int HoldingPlayerInGrabID
get

Gets the ID of the grabbed player. 0 if none.

◆ InputMode

abstract PlayerInputMode InputMode
get

Gets input mode.

◆ InThrowingMode

abstract bool InThrowingMode
get

Gets if the player is in throwing mode.

◆ IsAIControlled

abstract bool IsAIControlled
get

Returns if this player is AI controlled. The player is AI controlled when IsBot is true, BotBehavior.Active is true and when IsInputEnabled is true.

◆ IsBlocking

abstract bool IsBlocking
get

Gets if the player is blocking

◆ IsBoostHealthActive

abstract bool IsBoostHealthActive
get

Gets if the boost health is active. The player's boost health is active once the player reaches below 1 HP and has the strength boost effect active or is riding a rocket.

◆ IsBot

abstract bool IsBot
get

Gets if the player is a bot.

◆ IsBurnedCorpse

abstract bool IsBurnedCorpse
get

Gets if the corpse is burned (if the player is dead).

◆ IsBurningInferno

abstract bool IsBurningInferno
get

Gets if the player is burning rank 2.

◆ IsCaughtByPlayerInDive

abstract bool IsCaughtByPlayerInDive
get

Gets if the player is caught by another diving player.

◆ IsCaughtByPlayerInGrab

abstract bool IsCaughtByPlayerInGrab
get

Gets if the player is grabbed by another player.

◆ IsClimbing

abstract bool IsClimbing
get

Gets if the player is climbing

◆ IsCrouching

abstract bool IsCrouching
get

Gets if the player is crouching

◆ IsDead

abstract bool IsDead
get

Gets if the player is dead

◆ IsDeathKneeling

abstract bool IsDeathKneeling
get

Gets if the player is death kneeling

◆ IsDisabled

abstract bool IsDisabled
get

Gets if the player is disabled

◆ IsDiving

abstract bool IsDiving
get

Gets if the player is diving

◆ IsDrawingWeapon

abstract bool IsDrawingWeapon
get

Gets if the player is drawing a weapon

◆ IsFalling

abstract bool IsFalling
get

Gets if the player is falling

◆ IsGrabbing

abstract bool IsGrabbing
get

Gets if the player is grabbing

◆ IsHipFiring

abstract bool IsHipFiring
get

Gets if the player is hip firing

◆ IsHoldingActiveThrowable

abstract bool IsHoldingActiveThrowable
get

Gets if the player is currently holding an active/primed/ready throwable to be thrown. Use GetActiveThrowableWeaponItem() to get which weaponItem (grenade/shuriken/molotov/C4/mine)

◆ IsHoldingPlayerInDive

abstract bool IsHoldingPlayerInDive
get

Gets if the player has caught any other player during a dive.

◆ IsHoldingPlayerInGrab

abstract bool IsHoldingPlayerInGrab
get

Gets if the player is grabbing any other player.

◆ IsIdle

abstract bool IsIdle
get

Gets if the player is idle

◆ IsInMidAir

abstract bool IsInMidAir
get

Gets if the player is in mid air

◆ IsInputEnabled

abstract bool IsInputEnabled
get

Gets if input for the player is enabled. When disabled the player can't do anything and input is ignored. This allows PlayerCommands to be executed.

Returns

◆ IsJumpAttacking

abstract bool IsJumpAttacking
get

Gets if the player is jump attacking

◆ IsJumpKicking

abstract bool IsJumpKicking
get

Gets if the player is jump kicking

◆ IsKicking

abstract bool IsKicking
get

Gets if the player is kicking

◆ IsLayingOnGround

abstract bool IsLayingOnGround
get

Gets if the player is laying on the ground

◆ IsLedgeGrabbing

abstract bool IsLedgeGrabbing
get

Gets if the player is legde grabbing

◆ IsManualAiming

abstract bool IsManualAiming
get

Gets if the player is manual aiming

◆ IsMeleeAttacking

abstract bool IsMeleeAttacking
get

Gets if the player is melee attacking. Note: Returns true when the player is using a chainsaw.

◆ IsOnGround

abstract bool IsOnGround
get

Gets if the player is on ground

◆ IsRecoveryKneeling

abstract bool IsRecoveryKneeling
get

Gets if the player is recovery kneeling after a greater fall or jump attack.

◆ IsRecoveryRolling

abstract bool IsRecoveryRolling
get

Gets if the player is recovery rolling after being knocked down. Recovery roll can only be performed if being knocked down from small heights.

◆ IsReloading

abstract bool IsReloading
get

Gets if the player is reloading

◆ IsRocketRiding

abstract bool IsRocketRiding
get

Gets if the player is currently rocket riding.

◆ IsRolling

abstract bool IsRolling
get

Gets if the player is rolling

◆ IsRunning

abstract bool IsRunning
get

Gets if the player is running

◆ IsSpeedBoostActive

abstract bool IsSpeedBoostActive
get

Gets if the player has speed boost active.

◆ IsSprinting

abstract bool IsSprinting
get

Gets if the player is sprinting

◆ IsStaggering

abstract bool IsStaggering
get

Gets if the player is staggering

◆ IsStrengthBoostActive

abstract bool IsStrengthBoostActive
get

Gets if the player has strength boost active.

◆ IsStunned

abstract bool IsStunned
get

Gets if the player is stunned

◆ IsTakingCover

abstract bool IsTakingCover
get

Gets if the player is taking cover

◆ IsThrowing

abstract bool IsThrowing
get

Gets if the player is throwing

◆ IsUser

abstract bool IsUser
get

Gets if the player is controlled by a user.

◆ IsValidBotEliminateTarget

abstract bool IsValidBotEliminateTarget
get

Gets if this player can be targeted by other bots.

◆ IsWalking

abstract bool IsWalking
get

Gets if the player is walking

◆ KeyAttackAndBlockToGrabEnabled

abstract bool KeyAttackAndBlockToGrabEnabled
get

Gets if pressing attack and block should start the grab is enabled. Note: This is only up-to-date after the first key input has been registered.

◆ KeyDoubleTapSprintEnabled

abstract bool KeyDoubleTapSprintEnabled
get

Gets if double tapping direction keys enable sprint. Note: This is only up-to-date after the first key input has been registered.

◆ KeyMovementIsFlipped

abstract bool KeyMovementIsFlipped
get

Gets if the movement is flipped after walking into a portal.

◆ PerformedCommandCount

abstract int PerformedCommandCount
get

Returns the number of performed command actions.

◆ RocketRidingProjectileInstanceID

abstract int RocketRidingProjectileInstanceID
get

Gets the projectile instanceID of the rocket the player is currently rocket riding.

◆ Statistics

abstract IPlayerStatistics Statistics
get

Gets certain player statistics.

◆ TotalCommandCount

abstract int TotalCommandCount
get

Total queued command actions.

◆ UserIdentifier

abstract int UserIdentifier
get

Gets the active User's UserIdentifier for this player. Returns 0 if no active User is controlling this player.