The Mugen Fighters Guild
M.U.G.E.N Central => Development => Topic started by: Creamy_Goodness on June 01, 2014, 08:25:16 pm
-
> Is there a way to set up a trigger so that an event is repeated at regular intervals? I'm trying to have a projectile appear on every third tick of a state, and I understand that I can do this with trigger1 = Time = 3, trigger2 = Time = 6, trigger3 = Time = 9, etc. But I don't want to have to repeat this one hundred times, and it would be far more convenient to do this with one trigger.
-
trigger1 = gametime%3
-
Is there a difference between using trigger1 = gametime%3, or TimeMod = 3,0? Is timemod based on state time, and gametime is based on any time given?
-
@XGargoyle
"trigger1 = gametime%3"
> Thanks XG, I'll give it a shot.
-
Is there a difference between using trigger1 = gametime%3, or TimeMod = 3,0? Is timemod based on state time, and gametime is based on any time given?
yes, several ; timemod is deprecated so it might be dropped in future revisions of mugen; being practical about it it means very little, tho. a more practical difference is that gametime is based on the overall time of the round, while timemod is based on state time; so using game time mean that the first time the projectile will trigger does not necesarily mean it will be on time = 0, for the state, same for time=3,6, etc...
-
gametime is based on the game itself, i've had it go stupid on me a couple of times.
timemod is deprecated
time%3 = 0 would be every 3 ticks
Alternatively
time >= 0
persistent = 3
Will also work.
-
@Cyanide
> trigger1 = Time%3 = 0 did the trick, thank you very much. But tell me, what does the "0" do?
-
% returns the remainder of the division, so tick by tick it will return 0,1,2,0,1,2 etc... so = 0 means to trigger then time%3 is returning 0
-
@[MFG]maximilianjenus
"% returns the remainder of the division, so tick by tick it will return 0,1,2,0,1,2 etc... so = 0 means to trigger then time%3 is returning 0"
> OK I think I get it now, thanks. :)