Skip to main content

PlatformCreateProjectile

Callable

  • PlatformCreateProjectile(Name: string, Type: string, FaceLeft: boolean, X: number, Y: number, Force: number, Gravity?: number, Damage: number, HitAudio: any): void

  • Creates a projectile that will disappear when it hits the floor or a wall


    Parameters

    • Name: string

      The name of the projectile (Arrow, Bullet, etc.)

    • Type: string

      The type of the projectile (Wood, Iron, etc.)

    • FaceLeft: boolean

      IF the projectile is facing the left direction

    • X: number

      The X position

    • Y: number

      The Y position

    • Force: number

      The speed of the projectile

    • Gravity: number = 0.25

      The Y axis gravity pulling that projectile down (default to 0.25)

    • Damage: number

      The damage done by the projectile

    • HitAudio: any

      The damage done by the projectile

    Returns void

    • Nothing