Timed effects

Started by Liero, November 09, 2007, 12:24:22 PM

Previous topic - Next topic

Liero

Ok so I have a character that I want to have a timed effect applied to.  Basically I want him to lose health every 3 seconds or something similar to that.  This is what I have so far in terms of code, but the problem is that it only applies to state times and it instantly makes him lose health as soon as the state changes at all.  What I want is for it to somehow override the state time and read only the actual game time so that he takes damage every 3 seconds according to the game's time and not the state time.

What should I do?

[State -3, Poison Damage]
type = LifeAdd
trigger1=var(5)=1
trigger1=TimeMod = 200, 15
trigger1=movetype!=A
value = -10
kill = 1
absolute = 1

[State -3, Poison FX]
type = PalFX
trigger1=var(5)=1
trigger1=TimeMod = 200, 15
trigger1=movetype!=A
time = 30
add = 100,0,100
mul = 120,20,124
sinadd = 85,110,55,30
invertall = 0
color = 50

jbl2000

trigger1 = gametime%3 = 0

OR

trigger1 = gametime%5 = 0 for less persistency

or whatever

dump teh time mod trigger

Liero

Oh wow I don't know how I could have missed that.  Thanks so much!

Cyanide

3 seconds = 180 ticks remember


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.