All Questions



Remote disappear when kill an enemy

When I pick up coin I can see the coin change (when I select PlayerData on remote), however when I kill an enemy it disappears. The difference between the coin and the enemy: If I kill an enemy it calls the die() function, and inside it it calls the queue_free() If I pick up a coin, it calls the pick() function, and inside it it calls (in my case) the"picked") . And we wrote a script in the animation, that contains the queue_free() function. Whats the difference? Why is the remote tab disappearing if I kill the enemy, and why not if I pick up a coin?
  • Nathan Lovato replied

    The coin should also queue_free() and disappear after it finished its fade animation.

    The difference is that in one case you have an animation so you don't want the coin to pop out of the world instantly, while in the other case, the enemy, we make it disappear instantly.