Godot Version
4
Question
I want an enemy to drop some loot when it dies but I don't know how to spawn things
4
I want an enemy to drop some loot when it dies but I don't know how to spawn things
Just spawn them the same way you spawn the enemies. Instantiate, set the position, add to the parent scene.
b-but I don’t know how to spawn enemies, I was using that as an example…
I suggest reading the documentation on how to use the ResourceLoader class.
Once you load the scene that is your “loot” or anything you want, you can instantiate the scene.
Once you did that, you may set it’s position through code to be the same as where the enemy object “died”.