I want the skeleton to pause for a while when player attacks and when the player is not attacking it should walk …
Nothing (Damage) happens to skeleton. Please tell me where is the problem
Sorry for low quality
Hi, in your conditions for ‘Player is in collision with Skeleton’ you require that ‘The animation of Player is attack’ and ‘The animation of Player is spin attack’. Only if all of these conditions are true your actions will be executed. That’s obviously not possible. So you need to separate the animation actions or you try the OR condition.
When I use the Or condition the skeleton touches the player and then stops …
And in case of separating the animation actions, I tried it but I did not get it…means I AM NOT ABLE TO DO IT IN THE RIGHT WAY
What I want is, that when player is performing the spin attack and attack animation the skeleton should pause for a while and the player should not jump when he is performing the above animations
If he is not performing then only he should jump
That’s exactly what you told the skeleton to do two times: in case the skeleton is in collision with the player and in case the Attack timer of Skeleton is paused (which happens when the Player collides with Skeleton). You also never unpause the timer again. Besides, I suspect that the way you have implemented the timer is not sufficient for what you actually want to do.
At the moment the Player has to collide first with the Skeleton and has to perform both attacks together to make the Skeleton wait.
I would suggest to implement one action after another. If it works you can add another one.
If you haven’t done that you could check SilverStreak’s Not a vania example GDevelop 5. It includes all the mechanics (and timer settings) you are looking for (for your Skeleton check out the DelayedChaseEnemy).
The problem I am facing is that when the player is in collision with enemy it gets damaged and the variable is subtracted by 1. Till here it’s fine but when the player touches the enemy while performing attack animation , then also it gets damaged…
I want the player to get damaged only if enemy collides with it not when player performs attack and collides with enemy.
Now I see. You want the player to take damage when he/she is in collision with spider but when player attacks and collides there should be no damage to the player. I haven’t done that (I am usually just shooting bullets) but here is a solution (not as an event sheet but a description):
If player is in collition with spider and the spider animation is “Walk2”, trigger once. Substract 1 from Player Health.
You don’t test if the player is attacking or not. If both collide, and the spider is walking, you substract 1 to Player’s health.
You can add the condition to check if the player is not attacking, so it looks like:
if player is in collition with spider and spider animation is “Walk2” and Player animation is not “attack”, trigger once. Substract 1 from Player Health.
This way, if both the spider and the player are colliding, but the player is attacking, your player will not be hurt.