Diffrent Event from Same Key

You must understand the Game Editor concepts, before post here.

Diffrent Event from Same Key

Postby GuybrushThreepwood » Wed Jan 21, 2009 8:45 pm

I'm making a Super Smash Bros. type game, and I can't figure out how to make a combo attack.
Anyone's help would be appreciated :mrgreen:
Pirate: You fight like a diary farmer!
Guybrush: How appropriate, you fight like a cow!
User avatar
GuybrushThreepwood
 
Posts: 94
Joined: Sun Jul 06, 2008 12:23 pm
Location: Melee Island
Score: 2 Give a positive score

Re: Diffrent Event from Same Key

Postby skydereign » Wed Jan 21, 2009 11:26 pm

I suggest having a variable for each hit. This is what I did for a combo technique in the game I am making. Each consecutive attack will set the variable, usually incrementing, and depending on the variable, a different stage of the combo. You can also use this to make multiple button combos and more. I'm not sure if it is the most effective way, but it works fine for me.
Last edited by skydereign on Thu Jan 22, 2009 1:06 am, edited 1 time in total.
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: Diffrent Event from Same Key

Postby GuybrushThreepwood » Thu Jan 22, 2009 12:22 am

Im not much for scripting, so it'd be nice if you could make me a demo.
Thnx :mrgreen:
Pirate: You fight like a diary farmer!
Guybrush: How appropriate, you fight like a cow!
User avatar
GuybrushThreepwood
 
Posts: 94
Joined: Sun Jul 06, 2008 12:23 pm
Location: Melee Island
Score: 2 Give a positive score

Re: Diffrent Event from Same Key

Postby skydereign » Thu Jan 22, 2009 12:25 am

I did a quick version while I was waiting... press f for the 'attack'. Set whatever sprites you want for the events. You should also add a ready event, so that you can't cheat out the combo by pressing the button quickly. To do this I would change the if statement to
Code: Select all
if (combo==1 && animation_finish==1)
{
   attack;
   animation_finish=0;
}

And upon an animation finish event
animation_finish=1;

You would also need to switch the timer to something higher, or you could activate the timer after the animation finishes, whichever you feel is better suited.
Attachments
combos.zip
(1.55 KiB) Downloaded 152 times
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: Diffrent Event from Same Key

Postby GuybrushThreepwood » Sat Jan 24, 2009 12:47 am

Like I said before, i don't know much about scripting, so i have no idea what all of this stuff means. how about i post a couple of the combo sprites, and if you could make a demo for me with those, that would be much appreciated :mrgreen:

Tahu.rar
just some random sprites I had lying around
(5.61 KiB) Downloaded 150 times
Pirate: You fight like a diary farmer!
Guybrush: How appropriate, you fight like a cow!
User avatar
GuybrushThreepwood
 
Posts: 94
Joined: Sun Jul 06, 2008 12:23 pm
Location: Melee Island
Score: 2 Give a positive score

Re: Diffrent Event from Same Key

Postby skydereign » Sat Jan 24, 2009 2:30 am

The rar you posted is empty. I'll use some of my own sprites for the demo. I have to go work right now so it will probably be done tomorrow.
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: Diffrent Event from Same Key

Postby GuybrushThreepwood » Sat Jan 24, 2009 3:04 am

hmmm... that's wierd. i don't really know how to zip it up right.thanks all the same tho :mrgreen:
Pirate: You fight like a diary farmer!
Guybrush: How appropriate, you fight like a cow!
User avatar
GuybrushThreepwood
 
Posts: 94
Joined: Sun Jul 06, 2008 12:23 pm
Location: Melee Island
Score: 2 Give a positive score

Re: Diffrent Event from Same Key

Postby skydereign » Sat Jan 24, 2009 11:28 am

Well, here it is. If you don't like the feel or timing of it, I can make it better. It gets more complex, but it is possible to make the button presses for the combo register only during certain frames. For this demo, you must press f at the end of each animation. If you have any questions feel free to ask. Oh, sorry about the sprite quality, they were from a long time ago, back when was learning how to sprite.
Attachments
combos2.zip
(28.9 KiB) Downloaded 135 times
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: Diffrent Event from Same Key

Postby GuybrushThreepwood » Sat Jan 24, 2009 8:08 pm

it doesn't seem to work. I even tried naming all my sprites the same as yours, and added the same scripts but it still wouldn't work. could ya help me out with this? It would be appreaciated :mrgreen:
Pirate: You fight like a diary farmer!
Guybrush: How appropriate, you fight like a cow!
User avatar
GuybrushThreepwood
 
Posts: 94
Joined: Sun Jul 06, 2008 12:23 pm
Location: Melee Island
Score: 2 Give a positive score

Re: Diffrent Event from Same Key

Postby skydereign » Sat Jan 24, 2009 11:09 pm

That example requires good timing, pressing the button again after the attack is finished. Or did you mean that your implementation of the scripts did not work. Give me an example of the kind of combo you want. I may need to set up a function for your combos. That is how I did it, but that is a little more complicated. An example being, if you want to just repeatedly tap the button for rapid punches, or you need to have good timing for the combos.
-Edit
Maybe this is what you want? This allows you to tap the button repeatedly for the combo.
Attachments
combos3.zip
(30.8 KiB) Downloaded 139 times
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: Diffrent Event from Same Key

Postby GuybrushThreepwood » Sat Jan 24, 2009 11:47 pm

for every script a message keeps saying there are a bunch of errors in the script and i hav no idea wat they mean. could you help me out here? And that last demo was exactly what i need.
Pirate: You fight like a diary farmer!
Guybrush: How appropriate, you fight like a cow!
User avatar
GuybrushThreepwood
 
Posts: 94
Joined: Sun Jul 06, 2008 12:23 pm
Location: Melee Island
Score: 2 Give a positive score

Re: Diffrent Event from Same Key

Postby skydereign » Sat Jan 24, 2009 11:49 pm

Did you add the variables that I added?
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: Diffrent Event from Same Key

Postby GuybrushThreepwood » Sun Jan 25, 2009 6:04 am

that was the problem. Thanx a million
+1 :mrgreen:
Pirate: You fight like a diary farmer!
Guybrush: How appropriate, you fight like a cow!
User avatar
GuybrushThreepwood
 
Posts: 94
Joined: Sun Jul 06, 2008 12:23 pm
Location: Melee Island
Score: 2 Give a positive score

Re: Diffrent Event from Same Key

Postby GuybrushThreepwood » Mon Jan 26, 2009 12:32 am

another little snag. my character can take out his sword and that has a combo and i want the combo to be the same button as the other combo plus each combo has a left and right. could you help me out :mrgreen:
Pirate: You fight like a diary farmer!
Guybrush: How appropriate, you fight like a cow!
User avatar
GuybrushThreepwood
 
Posts: 94
Joined: Sun Jul 06, 2008 12:23 pm
Location: Melee Island
Score: 2 Give a positive score

Re: Diffrent Event from Same Key

Postby skydereign » Mon Jan 26, 2009 1:13 am

Okay, this is one way of doing it. This demo does not do the left or right, but for me to help you with that, I need to know how you are doing your game. Do you already have a directional system? How do you do left and right attacks. Assuming you do have a direction variable, you would add an if statement to the draw script.
Attachments
combos4.zip
(56.61 KiB) Downloaded 146 times
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Next

Return to Advanced Topics

Who is online

Users browsing this forum: No registered users and 1 guest