Attention: Here be dragons

This is the latest (unstable) version of this documentation, which may document features not available in or compatible with released stable versions.

Weapon๐Ÿ”—

Inherits: Node3D

Inherited By: AutomaticWeapon, GrenadeLauncher, SpaceGun

This class defines a Weapon.

Properties๐Ÿ”—

int

ammo

int

max_ammo

int

ammo_usage

float

cooldown

1.0

Array [Node3D]

sockets

Skeleton3D

player_skeleton

Skeleton3D

weapon_skeleton

Timer

_cooldown_timer

Methoden๐Ÿ”—

void

set_ammo(new_ammo: int)

void

_ready()

void

trigger()

void

_on_primary(pressed: bool)


Signals๐Ÿ”—

triggered() ๐Ÿ”—

Emitted after trigger is called.


ammo_changed(new_ammo: int) ๐Ÿ”—

Emitted when ammo is changed (useful for HUD display).


Eigenschaftsbeschreibungen๐Ÿ”—

int ammo ๐Ÿ”—

  • void set_ammo(new_ammo: int)

The ammunition count.


int max_ammo ๐Ÿ”—

The maxmimum ammunition count.


int ammo_usage ๐Ÿ”—

The number of ammo used when triggered is emitted.


float cooldown = 1.0 ๐Ÿ”—

The cooldown until this Weapon can be triggered again.


Array [Node3D] sockets ๐Ÿ”—

There is currently no description for this property. Please help us by contributing one!


Skeleton3D player_skeleton ๐Ÿ”—

There is currently no description for this property. Please help us by contributing one!


Skeleton3D weapon_skeleton ๐Ÿ”—

There is currently no description for this property. Please help us by contributing one!


Timer _cooldown_timer ๐Ÿ”—

The internal timer to handle trigger cooldown


Methodenbeschreibungen๐Ÿ”—

void set_ammo(new_ammo: int) ๐Ÿ”—

There is currently no description for this method. Please help us by contributing one!


void _ready() ๐Ÿ”—

There is currently no description for this method. Please help us by contributing one!


void trigger() ๐Ÿ”—

This methods triggers the Weapon.


void _on_primary(pressed: bool) ๐Ÿ”—

There is currently no description for this method. Please help us by contributing one!