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

Gameobject Respawn

$
0
0
I was attempting to make my enemies disapeer and come back in say. 60 seconds. I tried to use transform.active = false; inside of a waitforseconds Coroutine but the object never came back.. so all Im trying to do is make the gameobject after it hits 0 life to disapeer for 60 seconds and come back with full life. thank you in advance! if (curHealth == 0) { //DISAPEER FOR 60 SECONDS //COME BACK. transform.position = respawnhere; curHealth = maxHealth; PlayerAttack ZS = (PlayerAttack)target.GetComponent ("PlayerAttack"); ZS.DeselectTarget (); ZS.SpawnEXP(); PlayerHealth eh = (PlayerHealth)target.GetComponent ("PlayerHealth"); eh.AdjustCurrentEXP (20); }

Viewing all articles
Browse latest Browse all 1488

Trending Articles



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