In this, the player has an attack animation which is played when fire is pressed. There is also another sword which is positioned on screen exactly where the players sword is and if it hits the enemy while the attack animation is playing the enemy gets damaged.
If you're still not sure how to get things like this to work, have a search on the ClickTeam forums. There are lots of examples that people have posted and you should be able to find info to help you out. Good luck :)
The way I did it here was to have a second active object which was just the sword, invisible, which always positions itself with the player and follows the same animation so it's always in the same place as the sword you can see. Then the collisions are done against the invisible sword.
Another way you can do it is to create the arms seperate to the body and only have collision with the arms and not the body.
thanks for the response, but i have a much simpler way of doing it. in the event editor, you say that if the character collides with the enemy,the enemy dies. then, add onto it and say that if the animation stabbing is playing, make it so, and add on a third one that says that if the character is facing in the direction of the enemy, make it so. so, your first event should say that if character is facing enemy direction, animation stabbing is playing, and collides with the enemy, the enemy dies.
I don't get how to make it slash instead of shoot. No idea what you guys are taling about...
~~Cheahjc~~
cheahjc 3 years ago
In this, the player has an attack animation which is played when fire is pressed. There is also another sword which is positioned on screen exactly where the players sword is and if it hits the enemy while the attack animation is playing the enemy gets damaged.
If you're still not sure how to get things like this to work, have a search on the ClickTeam forums. There are lots of examples that people have posted and you should be able to find info to help you out. Good luck :)
IanUter 3 years ago
seem like a donkey of sorts!
Getsuga999tenshou 4 years ago
how do you make your character actually stab and slice instead of just shooting things?
turnskit2 4 years ago
The way I did it here was to have a second active object which was just the sword, invisible, which always positions itself with the player and follows the same animation so it's always in the same place as the sword you can see. Then the collisions are done against the invisible sword.
Another way you can do it is to create the arms seperate to the body and only have collision with the arms and not the body.
Hope that made sense.
IanUter 4 years ago
thanks for the response, but i have a much simpler way of doing it. in the event editor, you say that if the character collides with the enemy,the enemy dies. then, add onto it and say that if the animation stabbing is playing, make it so, and add on a third one that says that if the character is facing in the direction of the enemy, make it so. so, your first event should say that if character is facing enemy direction, animation stabbing is playing, and collides with the enemy, the enemy dies.
turnskit2 4 years ago
Yep, that sounds much easier. I'll have to remember that for future stuff.
Cheers
IanUter 4 years ago