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

Random Spawn

$
0
0
Basically what I am trying to achieve is spawn an object at an interval of 1-2 minutes and also increase that interval in time; let's say after 30 minutes of play the interval between the spawns to be increased to 3-4 minutes. Here's the wee code I came up to (incomplete) - and this doesn't even do the first part of the job :) var BonusLifeTarget : Transform; function FixedUpdate () { BonusLifeSpawn(); } function BonusLifeSpawn(){ yield WaitForSeconds (Random.Range(10, 100)) ; Instantiate (BonusLifeTarget); } Any suggestion is very much appreciated (or links to some learning)

Viewing all articles
Browse latest Browse all 125

Trending Articles



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