Note

HELP WANTED!

Most class reference pages are not fully covered yet! If you have more information, please consider Contributing!

BaseObj

Inherits: Node2D < CanvasItem < Node < Object

Inherited By: BaseProjectile, Fighter

Class containing functionality that both ^Fighter and ^BaseProjectile use.

Note: This class is missing functionality that is added by ^Fighter and ^BaseProjectile . Despite its name, all game objects that are not ^Fighter s should extend ^BaseProjectile , not ^BaseObj directly.

Overview

Properties Index

int

@export _c_MovementAttributes

0

String

@export air_friction

"0.2"

bool

@export always_parriable

false

bool

@export damages_own_team

false

bool

@export dummy

false

String

@export extra_state_variables

null

String

@export gravity

"0.8"

String

@export ground_friction

"2.5"

bool

@export has_projectile_parry_window

true

int

@export id

1

String

@export max_air_speed

"10"

String

@export max_fall_speed

"15"

String

@export max_ground_speed

"15"

Dictionary

@export throw_positions

{}

Node

@onready collision_box

$CollisionBox

Node

@onready flip

$Flip

Node

@onready hurtbox

$Hurtbox

Node

@onready particles

$"%Particles"

Node

@onready sprite

$"%Sprite"

Node

@onready state_machine

$StateMachine

bool

aerial_attack_immune

false

bool

can_update_sprite

true

int

ceiling_height

0

FGObject

chara

FGObject.new()

int

combo_count

0

Variant

creator

null

Variant

creator_name

null

int

current_tick

0

Variant

custom_hitspark

null

Variant

data

null

Variant

debug_label

null

Dictionary

default_hurtbox

{ "x":0, "y":0, "width":0, "height":0 }

bool

disabled

false

Variant

fighter_owner

null

FixedMath

fixed

FixedMath.new()

int

game_tick

0

bool

gravity_enabled

true

bool

grounded_attack_immune

false

bool

has_ceiling

false

Array

hitboxes

\[\]

int

hitlag_ticks

0

bool

initialized

false

bool

invulnerable

false

bool

is_ghost

false

int

last_hit_frame

0

String

last_object_hit

""

BetterRng

logic_rng

null

int

logic_rng_seed

0

BetterRng

logic_rng_static

null

int

logic_rng_static_seed

0

NativeMethods

native

NativeMethods.new()

Variant

obj_data

null

String

obj_name

null

Dictionary

objs_map

{}

String

previous_state

""

bool

projectile_invulnerable

false

BetterRng

rng

BetterRng.new()

Dictionary

sounds

{}

Variant

spawn_data

null

int

stage_width

0

bool

state_hit_cancellable

false

bool

state_interruptable

true

Array

state_variables

\["id", "grounded\_attack\_immune", "game\_tick", "match\_seed", "aerial\_attack\_immune", "last\_object\_hit", "can\_update\_sprite", "last\_hit\_frame", "damages\_own\_team", "ceiling\_height", "has\_ceiling", "has\_projectile\_parry\_window", "always\_parriable", "use\_platforms", "gravity", "ground\_friction", "air\_friction", "max\_ground\_speed", "max\_air\_speed", "max\_fall\_speed", "projectile\_invulnerable", "gravity\_enabled", "default\_hurtbox", "throw\_invulnerable", "creator\_name", "name", "obj\_name", "stage\_width", "hitlag\_ticks", "combo\_count", "invulnerable", "current\_tick", "disabled", "state\_interruptable", "state\_hit\_cancellable"\]

bool

throw_invulnerable

false

bool

use_platforms

false

Methods Index

void

_draw()

void

_enter_tree()

Variant

_on_hit_something(obj: Variant, hitbox: Variant)

void

_on_state_exited(state: Variant)

void

_process(delta: Variant)

void

_ready()

Variant

_spawn_particle_effect(particle_effect: PackedScene, pos: Vector2, dir: Vector2)

void

add_pushback(pushback: Variant)

Variant

apply_force(x: Variant, y: Variant)

Variant

apply_force_relative(x: Variant, y: Variant)

void

apply_forces()

void

apply_forces_no_limit()

void

apply_fric()

void

apply_grav()

void

apply_grav_custom(grav: String, fall_speed: String)

void

apply_x_fric(fric: Variant)

void

apply_y_fric(fric: Variant)

Variant

can_be_thrown()

void

change_state(state_name: Variant, state_data: Variant, enter: bool, exit: bool)

void

check_params(x: Variant, y: Variant)

Variant

compare(obj: Variant)

void

copy_to(o: BaseObj)

Variant

current_state()

void

deactivate_current_hitbox()

void

deactivate_hitboxes()

Variant

debug_dict(text: Variant, dict: Variant)

void

debug_info(data: Variant)

void

debug_text()

void

detect(obj: Variant)

Variant

distance_to(object: BaseObj)

void

end_aerial_attack_invulnerability()

void

end_grounded_attack_invulnerability()

void

end_invulnerability()

void

end_projectile_invulnerability()

void

end_throw_invulnerability()

Variant

fixed_deg_to_rad(n: Variant)

String

fixed_dot(x1: String, y1: String, x2: String, y2: String)

String

fixed_inverse_lerp(a: String, b: String, v: String)

Variant

fixed_map(i_min: String, i_max: String, o_min: String, o_max: String, v: String)

Variant

get_active_hitboxes()

Variant

get_camera()

Vector2

get_center_position_float()

Dictionary

get_collision_box()

Texture

get_current_sprite_frame()

Variant

get_current_sprite_frame_number()

String

get_current_sprite_frame_path()

Variant

get_data()

Variant

get_facing()

Variant

get_facing_int()

Variant

get_fighter()

Variant

get_frames()

Variant

get_global_center()

Variant

get_hitbox_x_dir(hitbox: Variant)

Variant

get_hurtbox_center()

Variant

get_hurtbox_center_float()

Variant

get_knockback_force(hitbox: Variant)

get_facing_int

get_object_dir(obj: Variant)

Variant

get_object_dir_vec(obj: Variant)

Variant

get_opponent()

Variant

get_owner()

obj_from_name

get_p1()

obj_from_name

get_p2()

Dictionary

get_pos()

Vector2

get_pos_visual()

Variant

get_snap_to_ground()

Dictionary

get_vel()

void

global_hitlag(amount: Variant)

void

grab_camera_focus()

void

hash_rng()

void

hash_static_rng()

void

hit_by(hitbox: Hitbox)

Variant

hit_fighter_last()

Vector2

hurtbox_pos_float()

Dictionary

hurtbox_pos_relative()

Vector2

hurtbox_pos_relative_float()

Variant

init(pos: Variant)

Variant

is_grounded()

bool

is_otg()

void

limit_speed(limit: Variant)

void

limit_x_speed(limit: Variant)

void

limit_y_speed(limit: Variant)

Variant

move_directly(x: Variant, y: Variant)

Variant

move_directly_relative(x: Variant, y: Variant)

void

normal_tick()

Variant

obj_distance(obj: Variant)

Variant

obj_from_name(name: Variant)

Dictionary

obj_local_center(obj: BaseObj)

Dictionary

obj_local_pos(obj: BaseObj)

void

on_got_blocked()

void

on_got_blocked_by(who: Variant)

void

on_got_parried()

void

on_got_parried_by(who: Variant)

void

on_got_push_blocked()

void

on_hit_ceiling()

void

on_state_ended(state: Variant)

void

on_state_started(state: Variant)

Variant

play_sound(sound_name: Variant)

current_state

previous_state()

Variant

randi_()

Variant

randi_choice(choices: Array)

Variant

randi_choice_static(choices: Array)

bool

randi_percent(n: int)

bool

randi_percent_static(n: int)

Variant

randi_range(a: int, b: int)

Variant

randi_range_static(a: int, b: int)

Variant

randi_static()

Variant

randi_weighted_choice(choices: Array, weights: Array)

Variant

randi_weighted_choice_static(choices: Array, weights: Array)

void

refresh_hitboxes()

void

release_camera_focus()

void

reset_hurtbox()

void

reset_momentum()

void

reset_pushback()

void

rumble(amount: float, ticks: int)

void

screen_bump(dir: Vector2, screenshake_amount: float, screenshake_time: float)

void

set_facing(facing: int)

void

set_gravity_modifier(modifier: String)

void

set_grounded(on: Variant)

Variant

set_pos(x: Variant, y: Variant)

void

set_rumble(amount: Variant)

void

set_snap_to_ground(snap: bool)

void

set_vel(x: Variant, y: Variant)

void

set_x(x: int)

void

set_y(y: int)

void

setup_hitbox_names()

bool

should_hide_rng()

Variant

sort_hitboxes(a: Variant, b: Variant)

Variant

spawn_object(projectile: PackedScene, pos_x: int, pos_y: int, relative: bool, data: Variant, local: bool)

Variant

spawn_particle_effect(particle_effect: PackedScene, pos: Vector2, dir: Vector2)

Variant

spawn_particle_effect_relative(particle_effect: PackedScene, pos: Vector2, dir: Vector2)

void

start_aerial_attack_invulnerability()

void

start_grounded_attack_invulnerability()

void

start_invulnerability()

void

start_projectile_invulnerability()

void

start_throw_invulnerability()

void

state_tick()

void

stop_particles()

Variant

stop_sound(sound_name: Variant)

void

tick()

void

tick_after()

void

turn_around()

void

update_collision_boxes()

void

update_data()

void

update_grounded()

Variant

xy_to_dir(x: Variant, y: Variant, mul: fixed, div: fixed)


Signals

global_hitlag(amount: Variant) 🔗

No description provided.


got_hit() 🔗

No description provided.


got_hit_by_fighter() 🔗

No description provided.


got_hit_by_projectile() 🔗

No description provided.


hitbox_refreshed(hitbox: Variant) 🔗

No description provided.


initialized() 🔗

No description provided.


object_spawned(object: Variant) 🔗

No description provided.


particle_effect_spawned(particle: Variant) 🔗

No description provided.


Constants

int MAX_RUMBLE = 10 🔗

No description provided.


fixed MIN_VELOCITY = "0.0001" 🔗

No description provided.


float RUMBLE_MODIFIER = 4.0 🔗

No description provided.


Property Descriptions

@export

int _c_MovementAttributes = 0 🔗

No description provided.


@export

String air_friction = "0.2" 🔗

No description provided.


@export

bool always_parriable = false 🔗

No description provided.


@export

bool damages_own_team = false 🔗

No description provided.


@export

bool dummy = false 🔗

No description provided.


@export

String extra_state_variables = null 🔗

No description provided.


@export

String gravity = "0.8" 🔗

No description provided.


@export

String ground_friction = "2.5" 🔗

No description provided.


@export

bool has_projectile_parry_window = true 🔗

No description provided.


@export

int id = 1 🔗

No description provided.


@export

String max_air_speed = "10" 🔗

No description provided.


@export

String max_fall_speed = "15" 🔗

No description provided.


@export

String max_ground_speed = "15" 🔗

No description provided.


@export

Dictionary throw_positions = {} 🔗

No description provided.


@onready

Node collision_box = $CollisionBox 🔗

No description provided.


@onready

Node flip = $Flip 🔗

No description provided.


@onready

Node hurtbox = $Hurtbox 🔗

No description provided.


@onready

Node particles = $"%Particles" 🔗

No description provided.


@onready

Node sprite = $"%Sprite" 🔗

No description provided.


@onready

Node state_machine = $StateMachine 🔗

No description provided.


bool aerial_attack_immune = false 🔗

No description provided.


bool can_update_sprite = true 🔗

No description provided.


int ceiling_height = 0 🔗

No description provided.


FGObject chara = FGObject.new() 🔗

No description provided.


int combo_count = 0 🔗

No description provided.


Variant creator = null 🔗

No description provided.


Variant creator_name = null 🔗

No description provided.


int current_tick = 0 🔗

No description provided.


Variant custom_hitspark = null 🔗

No description provided.


Variant data = null 🔗

No description provided.


Variant debug_label = null 🔗

No description provided.


Dictionary default_hurtbox = { "x":0, "y":0, "width":0, "height":0 } 🔗

No description provided.


bool disabled = false 🔗

No description provided.


Variant fighter_owner = null 🔗

No description provided.


FixedMath fixed = FixedMath.new() 🔗

No description provided.


int game_tick = 0 🔗

No description provided.


bool gravity_enabled = true 🔗

No description provided.


bool grounded_attack_immune = false 🔗

No description provided.


bool has_ceiling = false 🔗

No description provided.


Array hitboxes = \[\] 🔗

No description provided.


int hitlag_ticks = 0 🔗

No description provided.


bool initialized = false 🔗

No description provided.


bool invulnerable = false 🔗

No description provided.


bool is_ghost = false 🔗

No description provided.


int last_hit_frame = 0 🔗

No description provided.


String last_object_hit = "" 🔗

No description provided.


BetterRng logic_rng = null 🔗

No description provided.


int logic_rng_seed = 0 🔗

No description provided.


BetterRng logic_rng_static = null 🔗

No description provided.


int logic_rng_static_seed = 0 🔗

No description provided.


NativeMethods native = NativeMethods.new() 🔗

No description provided.


Variant obj_data = null 🔗

No description provided.


String obj_name = null 🔗

No description provided.


Dictionary objs_map = {} 🔗

A list of all objects spawned during a game. Starts off only containing the ^Fighter objects as ‘P1’ and ‘P2’, then every other object as ‘3’, ‘4’, etc.


String previous_state = "" 🔗

No description provided.


bool projectile_invulnerable = false 🔗

No description provided.


BetterRng rng = BetterRng.new() 🔗

No description provided.


Dictionary sounds = {} 🔗

No description provided.


Variant spawn_data = null 🔗

No description provided.


int stage_width = 0 🔗

No description provided.


bool state_hit_cancellable = false 🔗

No description provided.


bool state_interruptable = true 🔗

No description provided.


Array state_variables = \["id", "grounded\_attack\_immune", "game\_tick", "match\_seed", "aerial\_attack\_immune", "last\_object\_hit", "can\_update\_sprite", "last\_hit\_frame", "damages\_own\_team", "ceiling\_height", "has\_ceiling", "has\_projectile\_parry\_window", "always\_parriable", "use\_platforms", "gravity", "ground\_friction", "air\_friction", "max\_ground\_speed", "max\_air\_speed", "max\_fall\_speed", "projectile\_invulnerable", "gravity\_enabled", "default\_hurtbox", "throw\_invulnerable", "creator\_name", "name", "obj\_name", "stage\_width", "hitlag\_ticks", "combo\_count", "invulnerable", "current\_tick", "disabled", "state\_interruptable", "state\_hit\_cancellable"\] 🔗

No description provided.


bool throw_invulnerable = false 🔗

No description provided.


bool use_platforms = false 🔗

No description provided.


Method Descriptions

void _draw() 🔗

No description provided.


void _enter_tree() 🔗

No description provided.


Variant _on_hit_something(obj: Variant, hitbox: Variant) 🔗

No description provided.


void _on_state_exited(state: Variant) 🔗

No description provided.


void _process(delta: Variant) 🔗

No description provided.


void _ready() 🔗

No description provided.


Variant _spawn_particle_effect(particle_effect: PackedScene, pos: Vector2, dir: Vector2) 🔗

No description provided.


void add_pushback(pushback: Variant) 🔗

No description provided.


Variant apply_force(x: Variant, y: Variant) 🔗

No description provided.


Variant apply_force_relative(x: Variant, y: Variant) 🔗

No description provided.


void apply_forces() 🔗

No description provided.


void apply_forces_no_limit() 🔗

No description provided.


void apply_fric() 🔗

No description provided.


void apply_grav() 🔗

No description provided.


void apply_grav_custom(grav: String, fall_speed: String) 🔗

No description provided.


void apply_x_fric(fric: Variant) 🔗

No description provided.


void apply_y_fric(fric: Variant) 🔗

No description provided.


Variant can_be_thrown() 🔗

No description provided.


void change_state(state_name: Variant, state_data: Variant, enter: bool, exit: bool) 🔗

No description provided.


void check_params(x: Variant, y: Variant) 🔗

No description provided.


Variant compare(obj: Variant) 🔗

No description provided.


void copy_to(o: BaseObj) 🔗

Used for copying property values from an object to its prediction ghost


Variant current_state() 🔗

No description provided.


void deactivate_current_hitbox() 🔗

No description provided.


void deactivate_hitboxes() 🔗

No description provided.


Variant debug_dict(text: Variant, dict: Variant) 🔗

No description provided.


void debug_info(data: Variant) 🔗

No description provided.


void debug_text() 🔗

No description provided.


void detect(obj: Variant) 🔗

No description provided.


Variant distance_to(object: BaseObj) 🔗

No description provided.


void end_aerial_attack_invulnerability() 🔗

No description provided.


void end_grounded_attack_invulnerability() 🔗

No description provided.


void end_invulnerability() 🔗

No description provided.


void end_projectile_invulnerability() 🔗

No description provided.


void end_throw_invulnerability() 🔗

No description provided.


Variant fixed_deg_to_rad(n: Variant) 🔗

No description provided.


String fixed_dot(x1: String, y1: String, x2: String, y2: String) 🔗

No description provided.


String fixed_inverse_lerp(a: String, b: String, v: String) 🔗

No description provided.


Variant fixed_map(i_min: String, i_max: String, o_min: String, o_max: String, v: String) 🔗

No description provided.


Variant get_active_hitboxes() 🔗

No description provided.


Variant get_camera() 🔗

No description provided.


Vector2 get_center_position_float() 🔗

No description provided.


Dictionary get_collision_box() 🔗

No description provided.


Texture get_current_sprite_frame() 🔗

No description provided.


Variant get_current_sprite_frame_number() 🔗

No description provided.


String get_current_sprite_frame_path() 🔗

No description provided.


Variant get_data() 🔗

No description provided.


Variant get_facing() 🔗

No description provided.


Variant get_facing_int() 🔗

No description provided.


Variant get_fighter() 🔗

No description provided.


Variant get_frames() 🔗

No description provided.


Variant get_global_center() 🔗

No description provided.


Variant get_hitbox_x_dir(hitbox: Variant) 🔗

No description provided.


Variant get_hurtbox_center() 🔗

No description provided.


Variant get_hurtbox_center_float() 🔗

No description provided.


Variant get_knockback_force(hitbox: Variant) 🔗

No description provided.


get_facing_int get_object_dir(obj: Variant) 🔗

No description provided.


Variant get_object_dir_vec(obj: Variant) 🔗

No description provided.


Variant get_opponent() 🔗

No description provided.


Variant get_owner() 🔗

No description provided.


obj_from_name get_p1() 🔗

No description provided.


obj_from_name get_p2() 🔗

No description provided.


Dictionary get_pos() 🔗

No description provided.


Vector2 get_pos_visual() 🔗

No description provided.


Variant get_snap_to_ground() 🔗

No description provided.


Dictionary get_vel() 🔗

No description provided.


void global_hitlag(amount: Variant) 🔗

No description provided.


void grab_camera_focus() 🔗

No description provided.


void hash_rng() 🔗

No description provided.


void hash_static_rng() 🔗

No description provided.


void hit_by(hitbox: Hitbox) 🔗

No description provided.


Variant hit_fighter_last() 🔗

No description provided.


Vector2 hurtbox_pos_float() 🔗

No description provided.


Dictionary hurtbox_pos_relative() 🔗

No description provided.


Vector2 hurtbox_pos_relative_float() 🔗

No description provided.


Variant init(pos: Variant) 🔗

No description provided.


Variant is_grounded() 🔗

No description provided.


bool is_otg() 🔗

No description provided.


void limit_speed(limit: Variant) 🔗

No description provided.


void limit_x_speed(limit: Variant) 🔗

No description provided.


void limit_y_speed(limit: Variant) 🔗

No description provided.


Variant move_directly(x: Variant, y: Variant) 🔗

Sets an object’s position relative to itself. For setting position relative to the stage, see ^set_pos()


Variant move_directly_relative(x: Variant, y: Variant) 🔗

Same as ^move_directly() , except relative to the object’s facing, positive will always be forward, negative will always be backward


void normal_tick() 🔗

No description provided.


Variant obj_distance(obj: Variant) 🔗

No description provided.


Variant obj_from_name(name: Variant) 🔗

No description provided.


Dictionary obj_local_center(obj: BaseObj) 🔗

No description provided.


Dictionary obj_local_pos(obj: BaseObj) 🔗

No description provided.


void on_got_blocked() 🔗

No description provided.


void on_got_blocked_by(who: Variant) 🔗

No description provided.


void on_got_parried() 🔗

No description provided.


void on_got_parried_by(who: Variant) 🔗

No description provided.


void on_got_push_blocked() 🔗

No description provided.


void on_hit_ceiling() 🔗

No description provided.


void on_state_ended(state: Variant) 🔗

No description provided.


void on_state_started(state: Variant) 🔗

No description provided.


Variant play_sound(sound_name: Variant) 🔗

No description provided.


current_state previous_state() 🔗

No description provided.


Variant randi_() 🔗

No description provided.


Variant randi_choice(choices: Array) 🔗

No description provided.


Variant randi_choice_static(choices: Array) 🔗

No description provided.


bool randi_percent(n: int) 🔗

No description provided.


bool randi_percent_static(n: int) 🔗

No description provided.


Variant randi_range(a: int, b: int) 🔗

No description provided.


Variant randi_range_static(a: int, b: int) 🔗

No description provided.


Variant randi_static() 🔗

No description provided.


Variant randi_weighted_choice(choices: Array, weights: Array) 🔗

No description provided.


Variant randi_weighted_choice_static(choices: Array, weights: Array) 🔗

No description provided.


void refresh_hitboxes() 🔗

No description provided.


void release_camera_focus() 🔗

No description provided.


void reset_hurtbox() 🔗

No description provided.


void reset_momentum() 🔗

No description provided.


void reset_pushback() 🔗

No description provided.


void rumble(amount: float, ticks: int) 🔗

No description provided.


void screen_bump(dir: Vector2, screenshake_amount: float, screenshake_time: float) 🔗

No description provided.


void set_facing(facing: int) 🔗

No description provided.


void set_gravity_modifier(modifier: String) 🔗

No description provided.


void set_grounded(on: Variant) 🔗

No description provided.


Variant set_pos(x: Variant, y: Variant) 🔗

Sets an object’s position relative to the stage. For setting position relative to the object, see ^move_directly()


void set_rumble(amount: Variant) 🔗

No description provided.


void set_snap_to_ground(snap: bool) 🔗

No description provided.


void set_vel(x: Variant, y: Variant) 🔗

No description provided.


void set_x(x: int) 🔗

No description provided.


void set_y(y: int) 🔗

No description provided.


void setup_hitbox_names() 🔗

No description provided.


bool should_hide_rng() 🔗

No description provided.


Variant sort_hitboxes(a: Variant, b: Variant) 🔗

No description provided.


Variant spawn_object(projectile: PackedScene, pos_x: int, pos_y: int, relative: bool, data: Variant, local: bool) 🔗

No description provided.


Variant spawn_particle_effect(particle_effect: PackedScene, pos: Vector2, dir: Vector2) 🔗

No description provided.


Variant spawn_particle_effect_relative(particle_effect: PackedScene, pos: Vector2, dir: Vector2) 🔗

No description provided.


void start_aerial_attack_invulnerability() 🔗

No description provided.


void start_grounded_attack_invulnerability() 🔗

No description provided.


void start_invulnerability() 🔗

No description provided.


void start_projectile_invulnerability() 🔗

No description provided.


void start_throw_invulnerability() 🔗

No description provided.


void state_tick() 🔗

No description provided.


void stop_particles() 🔗

No description provided.


Variant stop_sound(sound_name: Variant) 🔗

No description provided.


void tick() 🔗

No description provided.


void tick_after() 🔗

No description provided.


void turn_around() 🔗

No description provided.


void update_collision_boxes() 🔗

No description provided.


void update_data() 🔗

No description provided.


void update_grounded() 🔗

No description provided.


Variant xy_to_dir(x: Variant, y: Variant, mul: fixed, div: fixed) 🔗

No description provided.