What I mean is that I want to know how to make 2 things in a script happen at once, or at least close to simultaneous. For example, a player presses a, and objects are moving on the screen while you press a. Once you press a, something happens, but the objects continue to move.
you would just put it all in the loop, so it will all keep going unless you tell it to stop, so the loop if you didn't know makes everything continue without stopping, an example would be like lets say you have a code that moves an item down on the screen or just randomly around, then you would put it in the loop and it would always go, also you can put an if statement to stop it, heres an example
WHILE 1 'THIS MAKES IT LOOP BTW
VSYNC 'THIS MAKES IF RUN AT THE RIGHT SPEED
(Code for moving would go here)
IF MOVING==TRUE THEN (MOVE)
IF MOVING==FALSE THEN (DONT MOVE)
WEND
something along those lines, I cant put all the code just because it would take a long time but I have ane more thing to show (tbc)
*one not ane.. lol oops.
anyways if you wanted say a menu to come up when you pressed A then I would use a function.
something like:
DEF MENU
WHILE B=>#A (I think I did that wrong but idk how it went)
(Menu code here)
WEND
END
so now when you call it, it would do the menu until you pressed A again then bring you back to where you left off.
calling it is a simple
IF BUTTON() AND #A THEN MENU