|
Post by Strider on Oct 4, 2017 16:12:23 GMT
i wanted to use a object with v character standalone script to have something (like a wall or a generator) to punish to bits in order to progess in the game, i see that with the update the v character standalone script now has events, but it seems it doesn't work, can't turn objects off with it.
|
|
|
Post by Invector on Oct 4, 2017 19:18:51 GMT
That's because the event is not being called, the vCharacterStandalone is just a simple example that you can use to start a new character.
To call the OnDead event, simple add it in the TakeDamage method.
if (currentHealth <= 0) onDead.Invoke(gameObject);
|
|
|
Post by Strider on Oct 5, 2017 2:43:36 GMT
That's because the event is not being called, the vCharacterStandalone is just a simple example that you can use to start a new character. To call the OnDead event, simple call it in the TakeDamage method. if (currentHealth <= 0) onDead.Invoke(gameObject); Thanks!
|
|