Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | morningkingdom |
I have instanced objects that erase themself with timer.
when they are insade a area_node(placed on enemies) code will do something, but while stil insade the area_node, instanced objects erase themselfs.
So area’s inside get empty, when its get empty, i wanna do something else, but area body_entered function not update itself like process function, so i cant get the return value, or dont know how?
area:
func _body_entered(body):
body = instance_piece
if body == instance_piece:
follow_triger = 1
if area is empty: ### ---> need to do this.
follow_triger = 0
proces:
func _physics_process(delta):
if follow_triger == 1:
print ("do someting if instanced body entered")
if follow_triger == 0:
print ("stop what you are doing if area is empty")
its allways return the follow_triger 1 value.