• Hey! Register here to create your account, engage with the community, and talk about what is new!

how do you make it so wait times dont stack

burzza

New member
Noble
Joined
Apr 11, 2023
Messages
14
Reaction score
1
im trying to make an eerie horror game with a skeleton that spawns every 5 minutes but i dont want the Wait blocks to stack on eachother, my code is a Player Event: Join followed by a Repeat: Forever and inside it its a Control: Wait followed by a Game Action: SpawnMob, can anyone help me?
 

ARMcPro

Forum adept
Overlord
Joined
Oct 20, 2020
Messages
1,260
Reaction score
357
for it, you might need to make a Game Loop.
To make one, On Player Join Event, check if there is only 1 player using If Variable = [Player Count(game value), 1]. between the brackets place a Start Process and change the tag in the Start Process to Target Mode: With no targets. now just get a text, name it Zombie Loop, place a Process block (that will be your zombie loop) and right click with the text you have on both the Start Process and the Process blocks, now just put your Forever loop code after the Process block and you should be done!
If it doesn't work, send screenshots of your code :D
 

burzza

New member
Noble
Joined
Apr 11, 2023
Messages
14
Reaction score
1
for it, you might need to make a Game Loop.
To make one, On Player Join Event, check if there is only 1 player using If Variable = [Player Count(game value), 1]. between the brackets place a Start Process and change the tag in the Start Process to Target Mode: With no targets. now just get a text, name it Zombie Loop, place a Process block (that will be your zombie loop) and right click with the text you have on both the Start Process and the Process blocks, now just put your Forever loop code after the Process block and you should be done!
If it doesn't work, send screenshots of your code :D
this is helpful but the thing is, is that i suck at coding, so could you please like make it simpler? thaks
 

HackerDragon9999

Forum adept
Joined
Jan 18, 2023
Messages
124
Reaction score
21
Basically game loops (I used them at some point)

Code:
Player Join >>>
    If Variable ([Player Count]) = 1 {
        Start Process (GameLoop)
    }
Process (GameLoop) >>>
    Wait (. . . <arbitrary amount of time>)
    . . . <game loop>
 
Top Bottom