#could someone possibly make my code better, right now its quite janky and the walljump sucks

1 messages · Page 1 of 1 (latest)

stable kettle
#

i also dont know how marker2d works so i dont know how to make the bullet shoot from there

#

thats my code

little pewter
#

Maker2D is simply a position reference. So you just get its position to instantiate your bullet there.
bullet.global_position = marker_2d.global_position

stable kettle
#

thank you

little pewter
#

you could either create your timers in the inspector or write a quick function with some parameters to create them.
something like

func create_timer(p_wait_time:float , p_on_shot:bool = true) -> Timer:
    var timer = Timer.new()
    timer.wait_time = wait_time
    timer.one_shot = p_one_shot
    add_child(timer)
    return timer

then you just need to

input_buffer = create_timer(INPUT_BUFER_PATIENCE)
coyote_timer = create_timer(COYOTE_TIME)

...

stable kettle
#

ok