If you use the array approach, don't forget to also have an interval expiring items of off the array constantly, otherwise someone could carry out a combo over the course of ten seconds (not exactly what you want, I expect).
Cheers,
ZE.
Printable View
If you use the array approach, don't forget to also have an interval expiring items of off the array constantly, otherwise someone could carry out a combo over the course of ten seconds (not exactly what you want, I expect).
Cheers,
ZE.
here's a start
http://www.angelfire.com/punk3/fosphertoons/fight.html
tell me if you like :)
(sorry verisign screwed me over so i my site is down for a while --- so im using angelfire)
Can I just use movie clips for my character instead of gif animations?
DAMN! my computer just seriously crashed!
i saved miraculously all my files, but i had to re-install all... hey, i was panicked, i don't want to lose all my flash files and all my roms! (i know, back-up, back-up...) ^^
zeroEra
mmmmok... i'm not experienced at all with arrays... i found a post that speak about arrays and combos...
it looks like:
the fact is, i don't understand all for the moment. if someone can explain better, maybe?Code://init routine
moves = new Array()
moves[0]=new Array(key.LEFT,key.RIGHT,key.SPACE)
moves[1]=new Array(key.UP,key.DOWN,key.SPACE)
moves[2]=new Array(key.UP,key.LEFT,key.RIGHT,key.DOWN)
movecounter=new Array()
actions=new Array("jump","fireWeapon","selfdestruct")
//key check probably in some loop on a different frame
for (var ii=0;ii<moves.length;ii++){
if (Key.isDown(moves[ii][movecounter[ii]]){
movecounter[ii]++
if (movecounter[ii]==moves[ii].length){
for (var j=0;j<moves.length;j++)
movecounter[j]=0
gotoAndPlay(actions[ii])
}
}
}
fospher.com
hey, it looks very american... ^^ well, i just say: why not?
i said that game will be a mix, so i was expecting a wide variety of different sprites. ok, fospher... do what you do the best ^^
Drummadude2002
you mean, inside your MCs, you have gif images? well, if the MCs are already done, that's cool.
current list of characters
1) ryu (some missing moves)
2) little akuma (some missing moves)
3) mai shiranui (a lot of moves missing)
4)son goku (mmmh... maybe missing moves, but i have enough ^^. thanks sfpiano)
5) fospher.com's character (project)
6) spiderman (probably missing moves)
7) bowser (project. one and only move ^^)
Sorry Marmotte, that I didn't reply sooner, different timezone :D
I have to work right now, if I have time later on I'll make an example if you still need it!
i´d like to help. the example looks great. unfortunately i don´t know how to rip sprites :(
let me know if i could help on any other thing.
k.
MTEV
i'll be more than happy if you can either explain me the code i posted several posts before (i don't understand all), either give me an example or a sample of yours. as soon as the battle engine will be ok, i'll put other characters. ^^ thanks for your help. hope i don't take too much of your freetime.
kay_siegert
maybe i can explain how to rip a sprite?
i don't know if there's a specific program that allow you to rip sprites easily. but that's how i did with rocky and my current fight game: i play a game (rom) with an emulator, take some screenshots, and then use photoshop to cut the sprites. i think some emulators PC (i'm using a mac) have the ability to put out backgrounds when you play, so ripping is a lot faster...
also, go to http://www.gsarchives.com or http://www.gifs-world.be.tf/ and complete the missing moves of some sprites...
can anybody tell me some names of emulators that i should look for?
k.
Ok, I'll give it a try:
Code://init routine
moves = new Array() Well in this array all the moves are stored as you can see below of course
moves[0]=new Array(key.LEFT,key.RIGHT,key.SPACE)
moves[1]=new Array(key.UP,key.DOWN,key.SPACE)
moves[2]=new Array(key.UP,key.LEFT,key.RIGHT,key.DOWN)
For every move that you have, you add one line to the array, with the corresponding key sequence
movecounter=new Array() This array checks how many keys of a certain move you have already performed
actions=new Array("jump","fireWeapon","selfdestruct") This array is just a combination of labels, you can use to play the appropriate frame in your character mc
//key check probably in some loop on a different frame
for (var ii=0;ii<moves.length;ii++){ So as long as ii < the length of the moves array (in this case 3), add 1 to ii and do the following...(so you perform a check for each line in your moves array)
if (Key.isDown(moves[ii][movecounter[ii]]){ If the key that is currently pressed is the beginning of one the combos in the moves array...
movecounter[ii]++ Then add 1 to the movecounter array for this move..so the next loop you will check the second key in the moves array for this move and so on
if (movecounter[ii]==moves[ii].length){ if the counter is equal to the number of keys in a certain combo...
for (var j=0;j<moves.length;j++) Then reset the counter...
movecounter[j]=0
gotoAndPlay(actions[ii]) And play the correct animation
}
}
Go back to the top
}
I bet this only confuses you more...right? :D
Well maybe somebody else is better at explaining this!
kay_siegert
there are so many emulation sites... try for example this one: http://www.wwemu.com/
you can download emulators here. but you'll need roms (i mean, roms are games). if you were used to play super nintendo or genesis console, or whatever, you'll be more than happy to play these games again, believe me ^^
MTEV
thanks... let me take a look at this ^^
i'll inform you if i end up with something interesting with this...
okay ... i´ll see what i can do next week ;)
k.
I'd like to help, do you know of any rom sites? I already have an emulator, i use zsnes. It has the function to get rid of the backgrounds, very helpful. I think I might have a street fighter rom, I'll go check, and maybe i can post it...
MTEV
well, i begin to understand. it's a very interesting piece of code...
but i still cannot get it to work. i tried to trace every part of it, but no value ever changed. for example, when i trace (ii), the value is 3, no matter if i press the desired keys...
my other intention was to use variables... it will take more time to do, but i know i can have good results...
but well, the array things is a lot shorter...
if you have the time, can you make an hadoken example? (down, down&&left, left) (the "down&&left" part will be maybe tricky)
also, i didn't forget that key presses are reversed if you are at the left or right of the player two...
kay_siegert
ok. thank you.
ziplockkitty
are you looking for a rom in particular? either i can give you the desired rom, either i can post links. (btw i will in no way do some roms traffic)
the best looking and best animated sprites, you can find them by playing neo-geo games or capcom cps2 games...
Hi Marmotte,
I don't have time right now, cause I'm at work, but I'll have a look later on (might be tomorrow)...
Did you make sure that you had the whole piece of code in a loop, otherwise it won't work?
EDIT: ow and of course ii will be 3, but that is only a variable to count the loops and the position in the different arrays...you should check the movecounter array for all the moves (1,2,3 in this case)
If movecounter[ii] > 0 than you have initialised the first move of a combo!
onClipEvent, yesQuote:
Did you make sure that you had the whole piece of code in a loop
it doesn't work maybe because of all the other code i already put in order to control the characters... i'll check that possibility
Since I'm basically building my character from scratch, should the special move be physical, like a punch, or like the hadouken, with a fireball-thing?
Hey Marmotte,
Did you put the top part under onClipEvent Load, because you only need to declare the arrays once, but you have to check for new keypresses every frame (onClipEvent enterFrame)?
Grtz,
Maikel
MTEV
oups... sorry, by onClipEvent, i meant enterFrame.
yes, it's true, i didn't think of it: i'll put the part of the code that need to be only declared in the Load frame... and see if it's working. thanks. if i end up with something, i'll tell you.
Drummadude2002
well it can be both... it depend on the character's ability, some throw hadokens, some punch, some do both...
but please, focus on ripped characters instead of original characters... i want to make a mix game with already known characters, that was my very first intention... but thanks anyway ^^
ok, the combo mode is still obscure for me...
i can't really work with the array code i posted earlier, unfortunately. there's surely a little something missing, but i don't know what yet... i'll work with it...
little update, anyway
old version:
http://www.marmotte.levillage.org/example.html
little new version
http://www.marmotte.levillage.org/example2.html
there are some improvments, if you are interested, please take a look ^^
well i understand if you just want sprites to keep the game's style. do you want me to continue on with my project? (i can make the guy into a sprite if you want)Quote:
but please, focus on ripped characters instead of original characters... i want to make a mix game with already known characters, that was my very first intention... but thanks anyway ^^
(so far i got a punch and a crouch and a stand)