I want to implement a series of targets that when destroyed by a bullet will imideatly open a door, how can I do it?
Hello, I am new myself so this may not be what you mean. I have a platformer project where I require X amount of coins to be held to use the portal. Perhaps you could set X amount of targets killed. The counter is on Globals for the total overall and on the instance of the door I set the requirement of how many.
@export var coins_needed = 0
func teleport():
if MyGlobals.coins_collected >= coins_needed:
get_tree().change_scene_to_packed(next_scene)
print("debug portal triggered")
1 Like