Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | RaGeSalty |
So i have code for summoning some enemies in and its for an input button and i don’t want them to spawn in when I press the button again.
Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | RaGeSalty |
So i have code for summoning some enemies in and its for an input button and i don’t want them to spawn in when I press the button again.
Reply From: | godot_dev_ |
You could create a flag that is initially false, and when the player attempts to spawn an enemy, the enemy is only created when the flag is false. After successfully creating an enemy, set the flag to true to disable enemy creation.