Problem with code

So I am currently making a Backrooms game and there is a 0.1 percent chance of a blackout event, so each BE (Blackout Event) smilers are supposed to spawn in certain positions (maybe I’ll randomized it one day) but each time a choose a specific spot for it, it always spawns at the beginning (not to mention keeps spawning them each 2 - 3 seconds) and I need help with it.

Here is my game: https://arcade.makecode.com/S31494-81270-36504-30984

6 Likes

Welcome! Good luck with you game, IDRK how backrooms works here so I’m not sure how t help.

2 Likes

0.1 percent out of what?

I think that the problem is that you using the wrong Block for setting position

try using this one
image

The blue one sets the exact position of a sprite but this one places it on a certain tile

1 Like

Also does the Sprite Follow a path or just Slam its head into a wall I made a horror game very similar to this and I had a problem like that but I was able to fix it with an extension

“Ai” extension
https://github.com/jwunderl/arcade-tilemap-a-star

if you need any help with using this extension just msg me again!

thats because you call it every 1ms so on average once per second
what you can do is to change it to a on game update every (1000ms) block
or a

game.onUpdateInterval(1000, function () {
	
})

Uh… 100?

1 Like

out of time i guess

1 Like

Maybe it was meant as 0.1% chance every game tick