Hierarchy (view full)

Constructors

Properties

current_weapon: string = "self getcurrentweapon()"
current_zone: string = "self get_current_zone()"
health: string = "self.health"
kills: string = "self.kills"
origin: string = "self.origin"
score: string = "self.score"

Methods

  • Parameters

    • text: string

    Returns string[]

  • Parameters

    • event_name: string

    Returns string

  • Parameters

    • field: string

    Returns string

    Description

    Returns the value of a player variable

    Example

    export const init_functions = [
    Core.log(Player.get_value("name"))
    ];
  • Parameters

    • weapon_name: string

    Returns string[]

  • Parameters

    • perk_name: string

    Returns string[]

    Description

    Gives a perk to the player

    Example

    import Player from './lib/player';
    import Perks from './lib/lists/perks';

    export const init = [
    Player.givePerk(Perks.juggernog),
    ]
  • Parameters

    • weapon_name: string

    Returns string[]

    Description

    Gives a weapon to the player

    Example

    import Weapons from './lib/lists/weapons';

    export const init = [
    player.giveWeapon(Weapons.mp40_zm)
    ]
  • Parameters

    • perk_name: string

    Returns string

    Description

    Returns wether or not the player has a certain perk

    Example

    export const init_functions = [
    Core.log(Player.has_perk(Perks.juggernog))
    ]
  • Parameters

    • text: string

    Returns string[]

  • Parameters

    • text: string

    Returns string[]

    Description

    Prints bold text on the top middle of the screen.

    Example

    export const init = [
    player.iPrintLnBold(`"Your score:" + self.score`)
    ]
  • Parameters

    • flag: string

    Returns string[]

    Description

    Notify the player of an event

    Example

    export const init_functions = [
    Player.notify("event_name")
    ]
  • Parameters

    • function_call: string

    Returns string[]

    Description

    Run a function on the player

    Example

    export const init_functions = [
    Player.run_function('custom_function()')
    ]
  • Parameters

    • field: string
    • arr: any[]

    Returns string[]

    Description

    Sets an array field on the player with the contents arr. If is_string = true then the items will be added to the array as strings.

    Example

    const items = [
    "test",
    "test2",
    "test3"
    ]

    export const init = [
    player.setArray("test_items", items, true)
    ]
  • Parameters

    • field: string
    • value: string | number

    Returns string[]

    Description

    Sets a variable field on the player to value.

    Example

    export const init_functions = [
    Player.set_value("name", `"xXCool_NameXx"`)
    ];
  • Returns string[]

  • Returns string[]

    Description

    Takes the current weapon from the player

    Example

    import Player from './lib/player';

    export const init_functions = [
    Player.takeCurrentWeapon()
    ]
  • Parameters

    • weapon_name: string

    Returns string[]

    Description

    Takes a weapon from the player

    Example

    import Player from './lib/player';
    import Weapons from './lib/lists/weapons';

    export const init_functions = [
    Player.takeWeapon(Weapons.c96_zm)
    ]
  • Returns string[]

    Description

    Upgrades the weapon the player is holding

    Example

    export const init = [
    player.upgrade_held_weapon()
    ]
  • Parameters

    • event_name: string
    • target: string

    Returns string[]

Generated using TypeDoc