In my game, my character shoots bullets. I want to make things in the game that increase the firerate of his bullets. He will only shoot bullets when his shooting animation is at a certain frame, so to increase his firerate, I made events that speed up the shooting animation. When the bullets hit an enemy, each bullet will do damage because of a variable.
However, for some reason it isn’t working.
My code is:
“Repeat for Each Bullet”
Condition: Bullet is in collision with enemy + Trigger Once
Action: Do - GlobalVariable(Damage) to variable Health of Enemy.
I have the events for deleting bullets in the player’s external event as well as the Damage global variable.
I want each bullet that hits the enemy to damage it, but if the firerate is too high, I will be shooting millions of bullets at the enemy, and it won’t die (The enemy’s health is 5 btw).
For some reason, the “For Each” tool is not working like it should.
Am I doing something wrong? Any help is appreciated. Thanks in advance.