News:

MFG's Character of the Month: October 2026 Nominations

Main Menu

Var Help

Started by Rayavenger, January 22, 2017, 07:00:20 AM

Previous topic - Next topic

Rayavenger

I'm having problems with var. I'm trying to changestate  faster when var(11) = 10000 is activated, for example

[Statedef 1811]
movetype= A
juggle  = 4
ctrl = 0
anim = 241
sprpriority = -1
velset = 0,0

[State 253, DestroySelf]
type = changestate
triggerall = var (11) = 1000
trigger1 = time = 100
value = 1814

[State 253, DestroySelf]
type = changestate
trigger1 = time = 460
value = 1814


And I've tried this too:

[Statedef 1811]
movetype= A
juggle  = 4
ctrl = 0
anim = 241
sprpriority = -1
velset = 0,0

[State 253, DestroySelf]
type = changestate
trigger1 = time = 460+ifelse(Var(11) = 10000, 100,0)
value = 1814

but any of these worked, How can I reduce the changestate time when var is activated ? "Sorry for my bad english , i'm brazilian"

Niitris

Quote from: Rayavenger on January 22, 2017, 07:00:20 AM
[State 253, DestroySelf]
type = changestate
trigger1 = time = 460+ifelse(Var(11) = 10000, 100,0)
value = 1814
You have the wrong operator, that says to add 100 if var(11)=10000 is true. Use a minus sign instead.

Quote from: Rayavenger on January 22, 2017, 07:00:20 AM
[State 253, DestroySelf]
type = changestate
triggerall = var (11) = 1000
trigger1 = time = 100
value = 1814
Here you have var(11)=1000, that might be why nothing's happening.

Odb718

Quote from: Rayavenger on January 22, 2017, 07:00:20 AMI'm having problems with var. I'm trying to changestate  faster when var(11) = 10000 is activated, for example 
triggerall = var (11) = 1000
You can see 10,000 or 1,000.

Try something like this

[State 253, DestroySelf]
type = changestate
trigger1 = (time >= 100) && (var(11) = 10000)  ;edit this to 1000 if that's what you need
trigger2 = (time >= 460)
value = 1814
ignorehitpause=1

I added ignorehitpause because something may be catching it up at exactly time=100. So it jumps to time=101 and it wont work.
vVv Gouken718 vVv SabreTooth718 vVv


Cyanide

Is this a helper. And where is the variable actually set. Is it getting to whatever value you expect?

If it's a helper you need to redirect to the parent, or the helper needs to manage the variable itself. If it's in state -2, we need to know how it's getting to 1000. 1000 is a pretty high value in game terms if you do it in increments of 1. We're talking almost 15 seconds here, if this is in the middle of an attack that's a dang long attack.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.