Hey all! Currently, I’m trying to make an engine for a fighting game that utilizes combos. Right now, I’m marking the cutoff point from an action that leads into a combo (which will cut through the ending animation of the previous attack) between a non-combo (which will require the attack animation to run to completion) with an number specified in the code.
char.cut = 7;
if(char._currentframe >= char.cut){
//next action;
}
What I would like to do, to make it easier to make small adjustments in attack lengths without having to change every detail is to label the cutoff frame. But I don’t know how to compare _currentframe (a number) to frame label (a string).
if(char._currentframe >= char.label){
//next action;
}
Clearly, a direct comparison is not possible; but is there any way to associate the frame’s label with its number? Any help or advice would be much appreciated. Otherwise I’ll have to do it the long way
Thanks in advance!