Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

To do this, you need to grab the player actor inside EnemyBehavior:

Sup.getActor('Player Actor')

then grab the PlayerBehavior attached to that actor:

Sup.getActor('Player Actor').getBehavior(PlayerBehavior)

then call the LowerHealth method:

Sup.getActor('Player Actor').getBehavior(PlayerBehavior).LowerHealth();


[ note: I just broke down each part of the code, normally you would just type the one line:

Sup.getActor('Player Actor').getBehavior(PlayerBehavior).LowerHealth();

in order to get the desired method ]