I have trouble setting up this action. Once my character get the invincibility action, and touches the enemy, the character dies. I made sure that the duration is long enough. What would be the issue?
I've not used invincibility, but I would imagine it's probably the 'collision shape' of your image you're using whilst invincible. Also make sure to check where the animation placement is if you're using an animation whilst invincible. It can also help to have 'debug mode' switched on whilst in preview so you can see all the collision states of everything on screen, that should help identify why your characters getting killed.
@Phill Mason I checked the collision shape while on debug mode, and the collision shape of the shield ignores the enemy. Once the character touches the enemy and not the shield, it dies. The Animation Placement is set on Character. I have absolutely no idea whats wrong.
It may worth it to play with the health settings of the enemies. I can imagine if you have something higher than 1 (or including 1) the shield is not enough to kill the enemies.
@Christoph I've got another problem now If my character touches the enemy without any shield, just the character, then both the character and enemy will die. This is because the health of the enemy is 0. This is really frustrating haha Doesn't anyone else have this action in one of their games that could help me out?
I think I found the problem. The Default Animation has a collision shape. But the Action Animation has no collision shape so that's perhaps why the character dies when it touches the enemy. I can't put the Action Animation as an object because the Shield around my character will not follow and stick to my character (correct me if I'm wrong). Really getting a headache of this
Then try to put 1 in the health and 1 in the damage. This should kill the enemy with 1 bullet or in your case with 1 touch when using the invincibility action. Or try with 1 in the health and 2 in damage. Or with 1 in the health and 0 in damage. As you see I'm not sure with these setting either but it should work. Makibot for example uses this feature.
No, you drop a sprite or a series of sprites if that is a real animation onto the Action Animation. The collision shape is independent of that sprite/animation. But what shield are you talking about? Did you create a "shield object" that you are trying to "glue" to your character? Invincibility is a state. Normally you do not need a separate shield or magic force. When you hit the Action, if the action is Invincibility then during the duration your character will be invincible and your character will kill the enemy, no matter how healthy the enemy or how many bullets it gets, and how much damage that enemy or bullet makes...
@trudnai The shield I'm talking about is just an image of a shield that will be shown once the character hits the action. Should've said this earlier, sorry! It doesn't work, the health and the damage of the enemy is 1. Once the character hits the Invincibility Action, and then hits the enemy, the character will just die. I seriously have no idea how or why it does this
Just thinking out loud: Could it be that you have 2 Invincibility actions on top of each others and they interfere each others? For example if you hit the first where invincibility lasts for 3 seconds, but then you hit the next invincibility which then cancels the first immediately, and depending on that one something happens. Maybe on that the timing is off so by the time you arrive to the enemy the invincibility is over...
@trudnai Nope there is just 1 action that lasts for 60 seconds so that I can have enough time to test it on the enemy