I believe I posted a discussion instead on the question forums. I need help, my bullet particles queues free as soon as bullet does, any work around this?
here is a video showing https://streamable.com/gw5whw
and here is my bullet code
extends RigidBody2D
var life_time = 2
var damage = global.player.damage
var lifesteal = (damage * 0.15)
export var bullet_speed = 1000
onready var lightanime = $AnimationPlayer
func _ready():
apply_impulse(Vector2(), Vector2(bullet_speed,0).rotated(rotation))
lightanime.play("Light")
poof()
func _process(delta):
pass
func poof():
yield(get_tree().create_timer(life_time), "timeout")
queue_free()
func _on_Bullet_body_entered(body):
get_node("CollisionShape2D").set_deferred("disabled", true)
if body.is_in_group("Enemies"):
body.OnHit(damage)
self.hide()