UUPDirector [Lexaloffle Blog Feed]https://www.lexaloffle.com/bbs/?uid=73885 Help: Timing for an Intro Sequence <p>So I'm fairly new to PICO-8, and while I have a <em>basic</em> (very lightly said, lol) understanding of making a game on the program, I'm having difficulties finding any guides or tutorials about how to use time properly - particularly with making an intro sequence for a game.</p> <p>Example: After the game starts up, I want to have the music start after 1 second (along with my logo) into the game, but from the methods I've tried, it results in the first note of the track playing in a continuous loop. </p> <div> <div class=scrollable_with_touch style="width:100%; max-width:800px; overflow:auto; margin-bottom:12px"> <table style="width:100%" cellspacing=0 cellpadding=0> <tr><td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> <td background=/gfx/code_bg0.png> <div style="font-family : courier; color: #000000; display:absolute; padding-left:10px; padding-top:4px; padding-bottom:4px; "> <pre>if (time()-last)&gt;1 then music(0) spr(192,48,48,4,4) end</pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <p>I know the problem is that it repeats the desired action with every value past 1, but I don't know how to only have this happen <strong>once</strong>. </p> <p>If there's anyone that knows of any guides/tutorials or has some tips or solutions to this, it would be greatly appreciated.</p> <p>Thank you!</p> https://www.lexaloffle.com/bbs/?tid=51397 https://www.lexaloffle.com/bbs/?tid=51397 Sat, 28 Jan 2023 15:50:43 UTC