Hi, I don’t understand why but when I take damage, it constantly drops down.
This is my damage method
public void damagePlayer(int amount) {
GameObject.Find ("PlayerCondition").GetComponent<PlayerCondition> ().playerHealth = GameObject.Find("PlayerCondition").GetComponent<PlayerCondition>().playerHealth - amount ;
}
(It’s pretty basic, I’m a begginer here :3 )
and this is my test method.
void State_ReputationTest1 () {
if (GameObject.Find ("PlayerCondition").GetComponent<PlayerCondition> ().playerReputation <= 5)
text.text = "This person hates you";
else if (GameObject.Find ("PlayerCondition").GetComponent<PlayerCondition> ().playerReputation > 5)
damagePlayer(1) ;
text.text = "This person likes you";
}
^^^^^^^^^^^ this is a test.
thanks for the attention, guys!