YesNoOk
avatar

How to remove variables? (Read 159 times)

Started by krissuja, March 25, 2013, 02:23:20 am
Share this topic:
How to remove variables?
#1  March 25, 2013, 02:23:20 am
  • *
  • I am listening...
    • Poland
    • shinakuma@aqq.eu
Variables turn on an AfterImage, so i have a shadow moves, but how to remove this after 3 use?
Re: How to remove variables?
#2  March 25, 2013, 02:30:26 am
  • *****
  • Video Game Veteran
    • USA
    • gcnmario.free.fr
You can't. Even unused variables are still there too.

However, you can limit the number of times the move is activated if that's what you mean.

"You must defeat my flaming
dragon punch to stand a chance."
Re: How to remove variables?
#3  March 25, 2013, 02:39:59 am
  • *
  • I am listening...
    • Poland
    • shinakuma@aqq.eu
I want him to be active all the time, until it's been used three time, then turn off
Re: How to remove variables?
#4  March 25, 2013, 02:48:55 am
  • *****
  • Video Game Veteran
    • USA
    • gcnmario.free.fr
type = changestate
trigger1 = Var(#) < 3
trigger1 = command = "this_move"

Every time you activate this move, or the character goes into this state, add 1 to this variable #.

"You must defeat my flaming
dragon punch to stand a chance."
Re: How to remove variables?
#5  March 25, 2013, 03:12:39 am
  • *
  • I am listening...
    • Poland
    • shinakuma@aqq.eu
I try that
Re: How to remove variables?
#6  March 25, 2013, 06:49:54 am
  • ******
  • I hang out tough. I'm a real boss.
    • USA
    • litotichues.com/
Give us more information. We don't know what you tried Give us the code you tried so we can see what you're doing. You have to help us help you.
Re: How to remove variables?
#7  March 25, 2013, 02:38:09 pm
  • *
  • I am listening...
    • Poland
    • shinakuma@aqq.eu
This is what I've done so far - a CB has Variables Set;

[Statedef 262, Combo Breaker]
type    = S
movetype= A
physics = S
juggle  = 3
poweradd= 80
ctrl = 0
anim = 198
sprpriority = 2
hitcountpersist = 1

[State 262, VarSet]
type = VarSet
trigger1 = time = 0
var (5) = 1

[State 262, reversalDef]
type = ReversalDef
trigger1 = hitcount > 3
reversal.attr = S,NA

[....]

those variables turn on an After image in specific moves, so they become a shadow moves;

[....]

[State 260, AfterImage]
type = AfterImage
triggerall = var(5) = 1 <--------------
trigger1 = stateno = 0
trigger2 = time = 0
time = 30
length = 7
palcolor = 0
palpostbright = 10,10,10
paladd = 0,0,0
palmul = 1,1,1
timegap = 2
framegap = 3

[....]

and this works great.

Now what i try to do is make those variables set back to 0 (turn off After image) after been used for the third time, so you have to perform CB again to turn them on again, like in original KI.  N-Mario had an idea how to do it, but I did not try it yet.


     Posted: March 25, 2013, 06:02:42 pm
Done!!!!

The code is;

Inside Combo Breaker;

[State 0, VarSet]
type = VarSet
trigger1 = time = 0
var (5) = 1000

Within each movement, that has to be in the shadow version;

[State 0, AfterImage]
type = AfterImage
triggerall = (var(5) = [1000,1002])
trigger1 = stateno = 0
trigger2 = time = 0
time = 30
length = 7
palcolor = 0
palpostbright = 10,10,10
paladd = 0,0,0
palmul = 1,1,1
timegap = 2
framegap = 3

[State 0, VarAdd]
type = VarAdd
trigger1 = time = 1
var (5) = 1

And i think everyone already know how this work?:) 

For those who don't know: After Combo Breaker the variable #5 is set to 1000, and that will turn on AfterImage. Now every time when a move with AfterImage state is used the VarAdd state in this move will add +1 to variable #5 (BTW; from 0, and even without Combo Breaker! that is why var(5) = 1000! because
"all variables' values default to 0, so if you never defined a variable before you used a varadd, it'll just be adding the value specified to 0" - Variable Tutorial by Rajaa") so it become = 1001, used again become = 1002, again = 1003, then = 1004 etc. The range is from 1000 to 1002 "triggerall = (var(5) = [1000,1002])"
so AfterImage will trigger three times:)