Quantcast
Channel: Super Mario Bros. X Forums
Viewing all articles
Browse latest Browse all 3024

LunaLua Help • Re: [Question] About Wait Times/Cooldowns in luna.lua Scripts

$
0
0
I recently tried to make a script while messing around in the editor, but realized that certain code would instantly repeat itself and cause the character to move at extremely high speeds for simple scripts that just add +1 to the character's height or speed. Is there any way to create a wait() command or other sort of cooldown to balance out scripts that do things like this?
You're not being very clear on what exactly you mean by "certain code", maybe try posting an example here and me or someone else can show you the intended way of solving that problem.

To broadly answer your question though, you can utilize the global function onTick, which is ran once for every game tick (~1/65th of a second) or use Routine.wait/Routine.waitFrames.

Statistics: Posted by WildW — Sun Oct 13, 2024 8:49 pm



Viewing all articles
Browse latest Browse all 3024

Trending Articles