Rather than using a 'Switch attack you are using, or different keys for different actions'. I wondered if its possible to use what most(all?) fighting games use.
So, is it possible. To make commands like;
<- -> (action key) does: 'Blah'
while (action key) does: 'Blah2'
and the directions on their own do the moving (done)?
** Fliint **
ID:177681
Aug 11 2002, 8:02 am
|
|
In response to Lummox JR
|
|
Console beat 'em ups, have basic controls say 'Punch' 'Kick' 'Counter/Block' etc. More (effective) moves can be used, by combining buttons and directions.
Say: quickly pressing Down, Up and 'Punch' performed an upper-cut or something. Though, being too slow in this 'combo' would simply act out each consecutive action (i.e. Down (crouch), Up (Jump), 'Punch' (A simple Punch). I'm using the center key, and the directional keys. And want to have more 'advanced' moves by combining Directions and this key. Action Key (Center key) on its own, simply Punches The direction keys on their own, move the character. In summary; Is it possible to implement a system, which allows you to create already defined combos using the directional (And in this case the 'Center()') keys. While using the basic 'verb' or 'command' already defined to that single key, by pressing that key alone; Going back to my previous example; Action Key performs a punch while <- -> [action button] (Left, Right, Action) does something completely different. The only way I can think of doing this is through, a tiny delay (allowing swift input of another 'command'), but still not sure on how to go about it. P.S. Hrmm..Sorry if this is still confusing, having a slight problem conveying/describing it. **Fliint** |
In response to Lummox JR
|
|
He means like combo attacks (for examplee, Mortal Kombat, south, southeast, east, punch = ice attack (Sub Zero)). The answer is yes, but it's very complicated. Basically, for every move you make, store it in a var. If it gains progress to a combo (if you did south, then you did southeast...) the two-button combo is saved. But if it doesn't (South then southwest) it's deleted and only southwest is saved. Each move would check the last moves to see if it forms a combo. If it does, either add it to the list, or do the combo move, and delete everything in the lsit. You also might need a timer to delete the list so you can't do moves very slowly (an 8 tick timer which is reset every time you move, that deletes the list when it reaches 0).
|
In response to Garthor
|
|
<code> combo var moves="" example_one moves="up;down;left;punch" example_two moves="left;downleft;down;kick" proc/DoCombo(mob/M) var/list/combos=list() world/New() ..() combos=new for(var/T in typesof(/combo/)-/combo/) var/combo/a=T a=new if(a:moves) combos += a:moves combos["[a:moves]"]=a else del a mob/var/list/cur_moves=list() mob/proc/PostMove(move) cur_moves += move if(list2params(cur_moves) in combos) var/combo/C=combos["[list2params(cur_moves)]"] C.DoCombo(src) cur_moves.Cut() </code>
This is all theoretical, and still requires considerable effort from you(removing moves from cur_moves after a set time, calling PostMove(name_of_move) after each move, etc). Alathon\\ |
In response to Alathon
|
|
Thanks for all the help guys. I'll experiment with what I have, and see what I come up with. :)
**Fliint** |
In response to Fliint
|
|
Fliint wrote:
Console beat 'em ups, have basic controls say 'Punch' 'Kick' 'Counter/Block' etc. More (effective) moves can be used, by combining buttons and directions. Combining keys (like Center + Left) you can't do yet--BYOND has no support for that at this time. It's likely it will have that support in the future, however. The movement combos where you quickly cycle through a few keys, though, you can do; this is a matter of timing. Getting this to work with network lag would be rough, but it can be done. Basically, you might do something like this: client Now, the heart of this will be in a mob proc called Action(). What this will do will be to look up moves in a table (one way of doing it) and act on them. The currentmove item can handle up to 4 movements in a sequence, like East+North+Center+South. For example, suppose any move ending with North+Center+South is defined as a fireball maneuver: #define FIREBALL=(NORTH<<8)|(0xF0)|(SOUTH) Now in your Action proc: mob The nice thing about this approach, you'll notice, is the built-in movement delay. Lummox JR |
I'm not sure I totally follow you here. Can you clarify that a little bit?
Lummox JR