Okay basically for my Naruto game Shinobi world online, i need a system that when you press either W, A, S or D in a certain combination like say W,A or W,D,S,A,W,D,S then press the execute button (space bar) you do a certain jutsu (kinda like a spell) that you know, but if you press the wrong keys it just says that jutsu does not exist or something.
Im still a newb coder so i have no idea how i would go about doing this the only thing i know that needs to be used is macros.
Any help will be really great, thank you for taking the time to read this.
ID:159184
Apr 26 2009, 8:09 am
|
|
In response to Lyndonarmitage1
|
|
Sorry i know i sound like a total idiot but, i don't understand it. Could you help me more please
|
In response to Setox
|
|
if u read, maybe u would understand.
or i suggest u get a programmer in Classified Ads |
In response to Setox
|
|
Setox wrote:
(...)i don't understand it. It might prove of use if you could elaborate. What exactly do you refer to by "it"? Or, to describe it in a different way, what exactly are you struggling with? Setox wrote: Could you help me more please That depends on if you allow us to help you, by providing details. |
In response to Schnitzelnagler
|
|
Ok sorry what i mean by "it" is the whole thing, it doesnt really seem like a tutorial or anything its just shoving the code in your face and not really explaining it. It's also just advertising about the game naruto universe, basicaly it just seems like its showing off that his game has that feature.
|
In response to Frozenflake
|
|
I did read it, in fact i read it over 3 times. I just didn't learn anything or understand. And i don't want a coder i want to be the coder because i find it fun, also no one ever wants to help for Naruto games anymore.
|
In response to Setox
|
|
That's just cause there are too many Naruto games nowdays...
(Pretty useless post eh?) |
In response to Syntty
|
|
Yeah and yeah it was pointless LOL, but yeah your right but now that i think about it so is this post.
If anyone can help me with this it would be great. |
In response to Setox
|
|
I still don't know how i would go about doing this please help me.
|
In response to Setox
|
|
Well since no one else is helping, I'll give it a shot, though it won't be the best advice ever. But since people here love to correct and/or bash others, it'll be corrected in a jiffy and we can all go home.
Or to another page. If it's for a rather small combo, you could just set a variable for the pre-requisite skill, set it to 1, and after a little delay (using spawn() instead of sleep() would be preferable, as spawn() doesn't halt the whole verb, just the indented part) set it back to 0. In your second skill, the "final" part of the combo, make it see if variable is 1, if so, do the skill, set variable to 0. Downside is, it's a lot of clutterwork and eventually you'll get a shitload of variables. Especially in long combos. I think that article shows (besides being blatant attention-seeking for the game it's based upon) that the author put all needed skills (or direction, the article uses that) in a list. So for example; list 1 = Combo attack 1, Combo attack 2 list 2 = Combo attack 1, combo attack 2, combo attack 3 Now, when you use a 'combo attack', it'll delete it from the list. Use combo attack 1, and list1 will just hold "Combo Attack 2". Use 2, and 2 will be deleted. Upon using the final combo, check the length (len variable) of the list, and if it's null/empty, execute. Of course, you'd have to implement an extra check to make sure people aren't doing combos in random orders (Example: First 2, then 3, then 1) and still being able to do the final. (This is done by seeing if the attack performed matches list1[1]) And again, you'd have to be sure to 'reset' the lists after a time of non-activity. Or that's what I'd do, anyway.. :| |
Based on what you said, here is something I threw together in a few minutes:
combo Basically, the way it works is the available_combos list. It checks it to see if the input matches it. You didn't specify if you wanted it wiped after a period of time so I didn't do that all, this is a very basic system that you can easily expand upon (I think). [edit] You could be creative and make something neat like have an onscreen HUD listing the current letters input through the usage of symbols or something. |
In response to Slime Lord
|
|
Thanks Slime Lord you helped me a lot, it worked and i added in the hud idea too. And thank you too Mysame. Now i can get on with me game.
|
http://www.byond.com/members/ DreamMakers?command=view_post&post=52787
That article pretty much covers most of what you want (this is from memory I haven't re-read it yet).
You will have to figure the fine points out on your own but it shouldn't be too hard. Good luck