I have a coin pasted in the Character's Taking Damage Animation, so when the character collides with an enemy, the character is rewarded with 1 point. The problem I'm running into, is the coin only works the first time the taking damage animation runs. So when the character and enemy collide for the first time, the character is rewarded a point. However each time after, the coin does not reward the character a point, even though it shows it is being collected. Is there any way around this so the character collects a point every time it collides with an enemy? (I understand this will work if the enemy is destroyed, I was hoping to get this to work without destroying the enemy.) Any help is appreciated, thanks.
Check out my game trailer from 0:09 Every time character bullet hit enemy there are points spawning( that gears) so the player can pick them Is that something you want to make ?
Lamora, thank you for your response. Not exactly like that. I need the character to be rewarded 1 point every time it collides with an enemy. I pasted a coin that rewards the player with 1 point into the character's taking damage animation. I gave the character 1000 health points. Every time the enemy collides with the character, that triggers the character's taking damage animation. The character collects the coin for the first time that animation is triggered, however each time after that the coin is shown in the damage animation, but not rewarded. I would like the character to be rewarded 1 point every time the character and enemy come in contact. Thanks.
I think you can try make it other way around like this Enemy--->Advanced movement---->Mathematical operation(set to add)--->Event(Collision)---->All characters In Animation Editor past your coin set it spawn permanently---- timer to 1. animation set frames 2 and speed 1 Set the linear velocity of the spawning coin in the direction of character and set that coin opacity to 0 if you dont want player to see it
Hmm, it might work. However, I don't see an option to spawn the coin. If I drag an object in there those I can add a spawning component, but not a coin.
Ok i get it now You need to make one object that will be host for the coin, so you need to copy your coin from game scene like click on that coin/action and CTRL+C then go the host object go to animation editor and paste there this coin/action by CTRL+V And then instead of putting your coin into enemy you put your object that have this coin inside. and make spawn, valocity, opacity etc on this object There was a post about this on forum which describes it more clearly
Lamora, thanks for the suggestion. I got it working, but maybe 1 out of every 4 collisions it does not work. I noticed that I get different results when I change the spawn rate, speed, and frames. I'm playing around with those settings to try to find that magic number to get it to work every time.