public struct ScriptCollisionEvent : IEventPayload

Payload for the "ObjectCollision" event.

An event sent by the game when an object collides with another (usually a player or a projectile).


public bool HasPlayer()

Checks if the collision involved a player.

Returns: (bool) Whether this collision involved a player.


public bool HasProjectile()

Checks if the collision involved a projectile.

Returns: (bool) Whether this collision involved a projectile.


public PlayerControllerWrapper GetPlayer()

Gets the colliding player. May return nil if no player was involved (please check with "HasPlayer()").

Returns: (PlayerController) The player.


public ProjectileWrapper GetProjectile()

Gets the colliding projectile. May return nil if no projectile was involved (please check with "HasProjectile()").

Returns: (Projectile) The projectile.