YesNoOk
avatar

Gen-like move switching (Read 1991 times)

Started by #Shaun, December 04, 2007, 07:08:23 pm
Share this topic:
Gen-like move switching
#1  December 04, 2007, 07:08:23 pm
  • *****
  • corner push pusher
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?
Re: Gen-like move switching
#2  December 04, 2007, 07:14:22 pm
  • ******
  • [E]
    • Mexico

  • Online
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.
Re: Gen-like move switching
#3  December 04, 2007, 07:17:36 pm
  • *****
  • corner push pusher
 :-\ I was afraid of that. I can't grasp variables at all.
Re: Gen-like move switching
#4  December 04, 2007, 07:37:06 pm
  • ******
    • Germany
    • valodim@gmail.com
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 = VarSet
trigger1 = 10 ; after 10 ticks, maybe the char is knocked out of it before he can do the stance change
v = 10 ; the number of your var
value = 2 ; stance 2

[State 12345, back]
type = ChangeState
trigger1 = animtime = 0 ; end of animation
value = 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 = ChangeState
triggerall = var(10) = 2
trigger1 = 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 = ChangeState
trigger1 = !time
value = ifelse(var(10) = 2, 10000, 0) ; if var(10) is 2, set to 10000, otherwise set to 0
Re: Gen-like move switching
#5  December 04, 2007, 07:48:19 pm
  • *****
  • corner push pusher
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?
Re: Gen-like move switching
#6  December 04, 2007, 07:49:19 pm
  • ******
    • Germany
    • valodim@gmail.com
Quote
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.

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
Re: Gen-like move switching
#7  December 04, 2007, 07:51:25 pm
  • *****
  • corner push pusher
 8) Right on for the help, Val. ::Saving webpage::