Hello,
This is a pretty basic thing I am trying to achieve. Still, I can't manage to do it properly. I even thought about posting it in beginner's questions forum but well...
So I have a family "allies" with 4 object in it : "knight", "berserker", "archer" and "sorcerer". There is a "char" family instance variable, and I defined it to the exact name of the object. So to be clear the "knight" object's "char" variable is defined to "knight", and same for the 3 other objects.
Now all I want to do is select one of the alive allies at random and know its char value in order to apply a function to him.
I do :
Allies health > 0 ("health" is another family instance variable of course)
(in a subevent) Pick a random allies instance (up to there everything is working fine, I have checked in the debugger)
(subevents of the previous subevent) Allies char = "knight" --> do something
Allies char = "berserker" --> do something
Allies char = "archer" --> do something
Allies char = "sorcerer" --> do something
If I'm correct, the "do something" part should apply only to the instance picked at random, but it actually never triggers, for none of the allies.
Any idea of what I am doing wrong and how I could fix it?
Thanks in advance!