[SOLVED] How to create a queue of spawning game objects after one another and stopping based on a countdown timer

Thank you for pointing that out, no it wouldn’t actually make sense for it to be that big logically speaking. So I changed it to 1-10 instead, which is a lot better now, I still have to figure out how to make it not go offscreen, I wonder if it has to do with the fact I’m using rendercam so I’d have to translate from screen view to world view like with inputs. I think in the random_position method I’d have to tweak it so it converts from screen to world view.

I’m looking at the rendercam scripts and I don’t see a method like GetViewportSize(), I’ll see if I can look into it more. There’s a set_viewport() but I’m not sure if that’s what I’m looking for.

Also I just realised it’s theoretically possible to randomly generate a position and have a chance it be the same position twice, I’d probably have to make a method that checks to make sure that’s not the case and if it is, then rerandomise it.

If I do something like this,

local screen = vmath.vector3(action.x, action.y, 0)

wouldn’t it be grabbing the location of the cursor, i.e. action.x, action.y? That wouldn’t be the viewport size though.

Just going to use default camera since I’m not using orthogonal or perspective view.