Quantcast
Channel: Questions in topic: "random spawn"
Viewing all articles
Browse latest Browse all 125

Emitting objects at a progressive rate randomly in a 2D game

$
0
0
I am planning on developing a small 2D Android and iPhone game and I need to go over a few things before I can start building. I was wondering how to build a script in Javascript to emit a prefab within a ring-like parameter in a 2D style game. I will try to explain with images. ![alt text][1] [1]: /storage/temp/11193-untitled.png In this image, The green square represents the Camera's view, and the red ring of sorts represents the parameters of which I want the enemies (those blob things) to spawn. I need help developing a script that randomly generates a position within the parameter and places an object of choice there (to be changed in the inspector tab). I also need to have the spawn rate changeable through time, as in it spawns faster over a period of time. If anyone can help me, it would be so great. I'm willing to go into further detail, so just ask if you need that. Thanks.

Viewing all articles
Browse latest Browse all 125

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>