0
Started

Character instantiates with a 0 Attribute value

Crispy 10 months ago in Stats updated by Marti (Lead Developer) 10 months ago 1

After killing a zombie, any further zombies that spawn will spawn in with 0 health.

https://streamable.com/k7po3

The Actions I'm using for decreasing health:

Unity version:
2018.4.12f1
Game Creator version:
1.0.5

Answer

+1
Answer
Started

This is probably because the Stats automatically saves the state of the prefab of ZombieFemale when it is destroyed. Instantiating new ones reloads the previous state, which was 0 at the moment, because all prefabs and prefab instances share the same ID.

We'll be adding a "Save" checkbox under the Stats component on the next update that you should untick. This will disable saving and loading the previous State values.

+1
Answer
Started

This is probably because the Stats automatically saves the state of the prefab of ZombieFemale when it is destroyed. Instantiating new ones reloads the previous state, which was 0 at the moment, because all prefabs and prefab instances share the same ID.

We'll be adding a "Save" checkbox under the Stats component on the next update that you should untick. This will disable saving and loading the previous State values.