|
Post by camperjohn on Mar 1, 2020 22:18:34 GMT
Upon death, I do not want the scene to restart...I want to respawn the player to a different location keeping all inventory items with him. I assume (??) part of the code is in vGameController so as not to Destroy the character. Anyone know where or what exactly I might need to look to try and get this to happen? Any help would be greatly appreciated.
Could I somehow just turn off (SetActive = False) the player, and then move its location (via transform) and turn it back on? Wondering if this might work...thoughts?
|
|
|
Post by camperjohn on Mar 2, 2020 0:56:10 GMT
OK...got the respawn to new location working, however, player respawns with zero health. Trying to find where to give the player just a little health...I thought currentController.currentHealth = 50 would do the trick, but getting errors. ??
I guess is there a way to add health within the vGameController.cs
|
|
|
Post by Invector on Mar 2, 2020 18:10:13 GMT
Use the method ChangeHealth instead, you can increase or decrease health with it
|
|
|
Post by camperjohn on Mar 3, 2020 3:02:53 GMT
Got it...I was just trying to set the wrong thing...this worked
currentController.ChangeHealth(25);
|
|