Forum rules - please read before posting.

Combat Example

Hi Chris! I wanted to start by saying that the Combat Example is great starting point for making classic RE style gameplay. As everything you do it's very flexible and mostly easy to understand. However, I'm having trouble accessing player/enemy health values via action lists of AC.
Player health seems to be a global variable, however, in game, if I set health variable to 0 player isn't seem to be affected at all.

Could you please explain the logic behind it? I'm trying to create a damage trigger for things like fire. If anything with health wonders into it - it gets the damage.


  • The health of all characters (enemies incuded) is stored in the CombatCharacter class.

    The PlayerHealth variable is just a convenient way of being able to display it in the UI, but is itself synced with the Player's Health from the PlayerCombat script.

    To have the Player take damage, you call his CombatCharacter component's TakeDamage function:

    AC.KickStarter.player.GetComponent<AC.CombatExample.CombatCharacter> ().TakeDamage (50);
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.