I read marz’s tutorial on AI but I don’t get it. What those the script mean when it says “perform the buttsquash”. Is “buttsquash” a MC or a frame.
A frame. I think the “performAttack” is like his way of saying “gotoAndStop”. When he says:
ape.performAttack(“buttSquash”);
It means:
ape.gotoAndStop(“buttSquash”);
I dont know if thats what he meant, but it worked for my fencing game. Hope that helps you.
peace
no, no, noooooo!! The buttsquash is a dance, you must perform the buttsquash to understand.
lol… Oh man guys… this was the hardest I’ve laughed in a while… Don’t take offence or feel stupid though…
it’s just an analogy on what you could possibly do with the system leoHEK… In the above situation, the buttsquash would be an attack that the ape could perform…
The performAttack is actually a Prototype.MovieClip function. You create this function to handle all of your attacks… How would you do this? Several different ways. I would love to elaborate more on this, but I need to try to go to sleep… My head is pounding and I’m a little dizzy…
Hmmm, Well, I used the “gotoAndStop” method and it worked fine.
P.S. lol, I DO feel pretty stupid :crazy:
peace
Well man… You can actually do t that way as well… But if you have characters and multiple attacks… You need to handle everything from taking off hitpoints and all of that fun stuff… An dit’s better handled in a function… That way you aren’t copying and pasting alot of code… It’ll be a series of gotoAndstop’s and some variable calls.
So don’t feel stupid.
Aaaah, I see. Yeah, the function handler sounds better then the code that I used for my fencing game (the oponent would start attacking so much, nobody could win).
peace
I think of functions as the segments that make up the logic of the flash game. Then I go through and make sure I label everything that is referenced in the function.
Once it’s working you can tweak your initialized variables, the upper/lower limits, scale and such. I personally like to work at 2x and then resize 50% so it looks more polished (also allows imported PNGs to scale up to 200% without jaggies).
Basically, the reason I dont use functions, is because I dont know how :h:
it’s cool man… Functions are extremely powerful tools… I’ll display to you some possibilities and give you a brief informative breakdown sometime.