|
Post by fuzzbeast on Sept 27, 2017 0:53:23 GMT
I'm trying to figure out how to respawn a standalone object after it has died. Does anyone have any idea how to make this happen?
Edit: I should mention I know that death is registering, as the health bar on the object cuts out when zero health is reached. I'm just not sure what needs to be triggered and where.
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Sept 27, 2017 0:58:37 GMT
I'm trying to figure out how to respawn a standalone object after it has died. Does anyone have any idea how to make this happen? I think you should be able to put it in the vGameController object. Cheers! NukeRasberry
|
|
|
Post by fuzzbeast on Sept 27, 2017 10:23:26 GMT
The game controller did't seem to work. I ended up having to run a script out of On Damage, rather than On Dead, for whatever reason, the object was never quite reaching dead at least as far as it's events were concerned, but looking to see if health <= 0 | isDead == true seemed to be a functional work around.
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Sept 27, 2017 10:35:15 GMT
The game controller did't seem to work. I ended up having to run a script out of On Damage, rather than On Dead, for whatever reason, the object was never quite reaching dead at least as far as it's events were concerned, but looking to see if health <= 0 | isDead == true seemed to be a functional work around. Awesome!! That’s unfortunate it didn’t work. Glad you found a work-around! Cheers! NukeRasberry
|
|
|
Post by vikingos on Sept 27, 2017 15:55:02 GMT
On the vCharacter standalone the on death method does not get invoked when the health is 0 or below, to fix this simply add this code the bottom of the damage void. if (currentHealth <= 0) { isDead = true; onDead.Invoke(gameObject); }
|
|