Hi there,
I'm making little project where I want an object to be randomly spawned outside layout but near the border, with angle that will make that object enter the layout. And so I wander if you could help me?
Thanks!
Develop games in your browser. Powerful, performant & highly capable.
Hey there, you could do that by using
Every X Seconds: Create Object at the position X: LayoutWidth and Y:random(0,LayotHeight);
You could add a bullet behavior to your objects to make them move or use the Move At Angle event. ;]
Hey, thanks for your replay, although im not sure if this will work randomly around the whole layout. I need something that would spawn an object anywhere around the layout. Will experiment with what you said thought.
There might be an easier way, but here's one way to do it:
SpawnOutsideLayout.capx (r99)
It's basically what sheepy said, but if you want to spawn from all directions you first need to pick an edge to spawn from.
Hey, thanks for your help. I took sheepy advice and expanded it and it works perfectly :)
Thanks! This was exactly what I was looking for!
Nimtrix
Can you put again the capx ?