Log In  

hi, so i'm working on this seal game thing; it's like a burrito bison type game, where you launch the seal and get stuff so you can upgrade it and some other animals and stuff

Cart #nozoromoyi-0 | 2022-02-27 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

i just added this launch function which is supposed to stop the seal from moving and allow you to charge power to launch it, and it seemed pretty ok, but when i ran the program, literally nothing even happened

can anyone maybe look through everything and help me figure out why this is happening? i'm drawing a blank, and i really appreciate if i could have some support or whatever

also i better not see anyone saying "rename your variables they're stupid" it's my flipping game i get to type whatever the heck i want

so yeah, thanks in advance if anyone helps, or whatever ゚‿ ゚

P#107758 2022-02-27 18:42

The function time() calculates time based on the number of times update() has been called by the engine. Your repeat loop is infinite due to the return value of time() never changing. As a result, your game never reaches draw() and thus never shows what it's doing.

P#107764 2022-02-27 19:34

well isn't update() supposed to continue running while launch() is? if it doesn't, then how can i get that to happen?

P#107771 2022-02-27 20:55 ( Edited 2022-02-28 00:21)

I'm not sure how update() could continue running while launch() is. launch() is called by update(), so update() won't finish until after launch() does. If you want both to run at the same time, launch() needs to be run as a coroutine so that update() can finish.

P#107802 2022-02-28 04:58

[Please log in to post a comment]

Follow Lexaloffle:        
Generated 2022-05-04 02:58:21 | 0.008s | Q:17