Welcome Forums Requests Let us access actors from the hero’s “when hurt”-event Reply To: Let us access actors from the hero’s “when hurt”-event


I appreciate that you would like to help and try to find a workaround. However, I think an improvement of the hero’s access capabilities makes sense:
I mean that we cannot access the properties of a npc using the hero’s “when hurt”-event.

Imagine e. g. a vampire boss:
We can set a token as soon as the hero enters the vampir’s domain. With this we’re able to activate screenplay programmed at the hero’s when hurt event. However, when the vampire is hurting the hero and is “drinking” his/her blood, we cannot access the vampires “health value”-property from the hero’s “When hurt”-event in order to refill the vampire’s HP.

I know you can just activate a token (e. g. “VampireAttackPerformed”) using the hero’s “When hurt”-event, place invisible switches at that level everywhere and put screenplay in each “When touch”-event of the switches which is checking the “VampireAttackPerformed” token, reacting accordingly and deactivating it afterwards. As a programmer I of course know stuff like this. So, yes… we can have workarounds for almost everything. But I refuse to implement things this way. It is redundant, hard to maintain and just… ugly. We should have full access to every actor on every level from anywhere. Only then we can avoid implementations we will regret later.

Why not start to make the hero’s when hurt event better? The actors’ “when hurt”-event can access every other actor’s as well as the hero’s properties. But from the hero’s “when hurt”-event we can access almost nothing. The reason for this most probably is that the hero does not belong to a certain level. Therefore, screenplay accessing the properties of actors which belong to another level will produce errors. Best would be if we have some kind of selector for our actors like:
Vampire of level VampiresDomain health value increases with 10
This would make clear which actor is meant. Therefore, this should also be possible from the hero’s “when hurt”-event.