Quantcast
Channel: Questions in topic: "enemy"
Viewing all articles
Browse latest Browse all 1488

Spawn game objects on a timer

$
0
0
I have this script that spawns enemies, but they only spawn once. So what I was wondering is if there is a way to add a timer or something into this script to make it so they will keep spawing. Here is the script. #pragma strict // Instantiates a prefab in a grid var prefab : GameObject; var gridX = 5; var gridY = 5; var spacing = 2.0; function Start () { for (var y = 0; y < gridY; y++) { for (var x=0;x

Viewing all articles
Browse latest Browse all 1488

Trending Articles



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