I have a wip with which I want to have the same stances/atk moves switching like Street Fighter's Gen. How do I do this?
normally, you set a var to specific values depending on the current stance, in the cmd you check for that var to trigger the apropiate moves, and in the common1,cns you overwrite and check that var in case you need to alter the basic animations for moving around.
It's really quite simple. For example:[mcode]; state like a regular move (with cmd etc) for stance change[Statedef 12345]anim = 12345 ; stance-change-animation; yada, yada[State 12345, set]type = VarSettrigger1 = 10 ; after 10 ticks, maybe the char is knocked out of it before he can do the stance changev = 10 ; the number of your varvalue = 2 ; stance 2[State 12345, back]type = ChangeStatetrigger1 = animtime = 0 ; end of animationvalue = 0[/mcode]After that, you can use var(10) in triggers and it will result in 2. for example in cmd, for a move for that stance only:[mcode][State -1, cmd]type = ChangeStatetriggerall = var(10) = 2trigger1 = command = "QCF_x"value = X[/mcode]to change back, make a second statedef with change-back-state to show the different stance in the common states, override them. for example[State 0, stance anim]type = ChangeStatetrigger1 = !timevalue = ifelse(var(10) = 2, 10000, 0) ; if var(10) is 2, set to 10000, otherwise set to 0
So the varset basically just sets up a variable number, 10 in v = 10 actually becomes the var # itself, and the var(10) in the cmd enables the move.And the trigger1 = X amount of time to take before switching to new stance.Is the 10000, 0 in the common state override suppose to represent the action numbers in the air file?
QuoteSo the varset basically just sets up a variable number, 10 in v = 10 actually becomes the var # itself, and the var(10) in the cmd enables the move.Yes -- the var(10) in the cmd evaluates to 2 (because it was set to that before), comparing that to 2 results in a true expression (2 = 2) so the move triggers. if var(10) is 1 or 0 because no stance change has occured yet, the expression will be (1 = 2) which is false, so the move does not trigger.0 would be the regular stance animation, 10000 would be the animation number of stance 2