
Board: M.U.G.E.N Development Help
[statedef somestate]
...
[state somestate, do math loop stuff]
Type = changestate
trigger1 = 1 || fvar(0) := [value1]
trigger1 = 1 || fvar(1) := [value2]
value = Some other state that does math loop stuff
[statedef Some other state that does math loop stuff]
...
[state Some other state that does math loop stuff, Power]
type = varset
trigger1 = time = 0
fvar(2) = fvar(0) ** fvar(1)
[state Some other state that does math loop stuff, Decrease fvar(1)]
Type = varset
trigger1 = time = 0
fvar(1) = fvar(1)-1
[state Some other state that does math loop stuff, Continue the loop]
type = changestate
trigger1 = fvar(1) != 0
value = Some other state that does math loop stuff
[state Some other state that does math loop stuff, We did the math, yay. Now get the fuck out of here]
type = changestate
trigger1 = fvar(1) == 0
value = Another state that continues what somestate was doing, or even somestate itself if we change the trigger to prevent it from changing to the math loop stuff state again.
Or use the formula Vans gave you, but subtract 1 from the result since his formula includes a^0 and yours don't.