YesNoOk
avatar

Loop trigger (Read 4753 times)

Started by Creamy_Goodness, June 01, 2014, 08:25:16 pm
Share this topic:
Loop trigger
#1  June 01, 2014, 08:25:16 pm
  • ***
    • USA
    • creamyg.jdluke.com/

> 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.
= = = = = = = = = =
Jason "Creamy Goodness" Tenn
http://creamyg.jdluke.com/
Re: Loop trigger
#2  June 01, 2014, 09:53:58 pm
  • ******
  • Hedgehog Whisperer
  • Red Bull addict
    • Spain
    • xgargoyle.mgbr.net
trigger1 = gametime%3
XGargoyle: Battle posing since 1979
http://xgargoyle.mgbr.net
http://www.pandorabots.com/pandora/talk?botid=e71c0d43fe35093a  <-- Please click that link
http://paypal.me/XGargoyle  <-- Donations welcome!
Re: Loop trigger
#3  June 01, 2014, 10:11:41 pm
  • ******
  • Video Game Veteran
  • Can you do it? SUREYOUCAN!
    • USA
    • gcnmario.free.fr
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?

"You must defeat my flaming
dragon punch to stand a chance."
Re: Loop trigger
#4  June 02, 2014, 01:07:49 am
  • ***
    • USA
    • creamyg.jdluke.com/

@XGargoyle

"trigger1 = gametime%3"

> Thanks XG, I'll give it a shot.
= = = = = = = = = =
Jason "Creamy Goodness" Tenn
http://creamyg.jdluke.com/
Re: Loop trigger
#5  June 02, 2014, 05:28:21 am
  • ******
  • [E]
    • Mexico
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...
Re: Loop trigger
#6  June 02, 2014, 05:28:28 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
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.


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.
Re: Loop trigger
#7  June 02, 2014, 08:28:48 am
  • ***
    • USA
    • creamyg.jdluke.com/

@Cyanide

> trigger1 = Time%3 = 0 did the trick, thank you very much. But tell me, what does the "0" do?
= = = = = = = = = =
Jason "Creamy Goodness" Tenn
http://creamyg.jdluke.com/
Last Edit: June 02, 2014, 06:28:39 pm by Creamy_Goodness
Re: Loop trigger
#8  June 02, 2014, 04:43:16 pm
  • ******
  • [E]
    • Mexico
% 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
Re: Loop trigger
#9  June 02, 2014, 06:28:20 pm
  • ***
    • USA
    • creamyg.jdluke.com/

@[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. :)
= = = = = = = = = =
Jason "Creamy Goodness" Tenn
http://creamyg.jdluke.com/