Well i have a tut right here made by maditaliano...here goes!
1. Go into common events
2. Name this event ABS Punch, make it parrallel process, and it's trigger switch 'fight'.
3. Key Input Processing: Store Key Code in Variable 'Melee'. Untick all but Decision Key (5)
4. Variable Operations: Set 'Melee' 5
5. Branch if Variable Melee: 5
In that:
6. Branch if Hero is in the Party
In that:
7. Branch if hero facing up:
In that:
8. Change Sprite Association: (Punch Part 1)
9. Wait 0.1 Seconds
10. Change Sprite Association: (Punch Part 2)
11. Wait 0.1 Seconds
12. Change Sprite Association: (Punch Part 3)
13. Wait 0.1 Seconds
14. Change Sprite Association: (Back to normal walking pose)
In Else Handler:
1. Branch If Hero Facing Right:
In that:
2. Copy Steps 8 - 14 Inclusive into here.
In Else Handler:
1. Branch If Hero Facing Down:
2. Copy Steps 8 - 14 Inclusive
In Else Handler:
1. Branch if Hero Facing Left:
2. Copy Steps 8 - 14 Inclusive.
15. Click Apply and Ok.
16. Create an event on the map called enemy.
17. Change the movement type to towards hero. Trigger Condition to Collision with hero. Event layer to same layer as hero.
18. In the event commands put: Move event, Change graphic, This Event (Punch pose 1)
19. Wait 0.1 Seconds
20 Move event, Change graphic, This event (Punch pose 2)
21. Wait 0.1 Seconds
22. Move event, Change graphic,This Event (Punch Pose 3)
23. Wait 0.1 Seconds
23.5. Change Hero Hp (anny amount of life here)
24. Move event, Change graphic,This Event (Normal walking pose)
25. Click on new page and go to it.
26. Set preconditions to variable 'Melee' equal to 5
27. Set movement type to toward hero, trigger condition to collision with hero, event layer to same layer as hero.
28. Flash sprite, this event red for 0.3 seconds.
29. Create a variable to enemy hp.
30. Variable Operations, enemy hp + 1
31. Click New page and go to that page.
32. Set Preconditions to variable enemy hp, greater than or equal to 3.
33. Movement type, toward hero, trigger condition, collision with hero, layer, same as hero.
34. In event commands put: Change Sprite Assoctiation (Death part 1)
35. Wait 0.1
36. Change Sprite Association (Death Part 2)
37. Wait 0.1
38. Change Sprite Association (Death Part 3)
39. Wait 0.1
40. Erase Event
41. Go back to the map, make an event and in the commands put: Switch operations, 'fight' turn on.
42. Erase Event
I think that was all of it...DO NOT CREDIT ME, CREDIT MADITALIANO HE MADE THIS!