so... i ran into some problems when one of my combatants couldn't punch or kick when overlapping the enemy combatant. Can someone give me and edited version of my game?
how can i attach files btw? im not allowed to post links.
replace the first *** with www and the second one with com
the one that cant attack when overlapping enemy is the blue one.
awd for blue guy movement (sub-zero), f=punch g=kick
arrow keys for yellow(scorpion) <=punch >=kick
Develop games in your browser. Powerful, performant & highly capable.
You need to use collision boxes. Like if scorpion is punching, you'd create a small box where his hand is for the punching frame. You do this by creating an imagepoint in the image editor on the frame where he punches. Then in your events, if frame = THAT FRAME, then create a collision box. Then you'd check that collision box to see if it overlaps.
There's much more to it than what I've described though. How do you cancel out the opponent's strike if you both hit at the same time? What about frame skipping.. that one frame for the collision box may not be enough, so you'll either need to create it for a few frames, or add a small delay for that frame (in the image editor, you can set delay times for each frame).. and so on..
thanks for replying! i'll try fixing dat problem with the solution of urs.
i dont get the if frame part. I created an image point on the hand when it punches. im sorry if i'm bothering you... but as my name suggests... I started just using Construct 2 yesterday -_-