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
Thanks a lot for adding! Please also consider to add the source of an attack to the hero’s (and also every other actor’s) “when hurt”-event. Then we could have something like:
if hurt by Vampire of level VampiresDomain then …
With this we even could have different vampires and other enemys in our game and react to their attacks differently.
This also could be improved further if we think of direct access to the attacker actor as an object:
if AttackerActor.Name.StartsWith(“Vampire”) then
AttackerActor.HealthValue increases with 10
That way we could completely avoid code redundancies and are able to use mere those two lines for every vampire of every level in our game. However, this is not the way screenplay is implemented yet so you’ve to think about how something like this could be done best.