Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Montasir Raihan |
Hello guys, I’m making a top down survival shooter game. I configured my player, enemies, environments and all of them are working perfectly. But I want to make my code more logical. I mean, when the player reaches 25, 50, 75, 100, … kills, enemies will leave an item for the player. But the problem is, the enemies stop leaving items after a certain amount of kill. I don’t want that. So, Please help me or give me some advice.
Here is a short amount of code:
if player.kill == 25 or player.kill == 2*25:
var ammo = ammunition.instance()
world.add_child_below_node(path, ammo, true)
ammo.position = body.position
body.queue_free()
Thank you for everything.
If you need to check more of my code, just ask me. Thank you.
Montasir Raihan | 2020-10-11 21:14