#projectiles timer

5 messages · Page 1 of 1 (latest)

tulip drift
#

How to add timer to individual projectile so they wont all dissapear at the same time,but every would have their own timer

sick hazel
#

add a script to them with a timer logic

#

and if you want to make it distance based you can set a maximum distance they can travel before they disappear

#
func _physics_process(_delta: float) -> void:
    if direction != Vector2.ZERO:
        global_position += direction * speed
    
    if(global_position.distance_to(_initial_pos) >= max_distance):
        queue_free()
#

this is my bullet script