Get info from other's actor behaviour

Almakos

  • Posts: 632
Hi,
I am trying to get some numbers to one actor, from another.
Currently I am using block as in attachment. But seems that is not precise, 'cause I get 0 sometimes, but number is actually not 0 at all. On top of that, this method is quite slow to process.
Is there any more efficient way to retrieve number from other actor's behaviour?
Thank you.
Fishing Fantasy Trailer


rob1221

  • *
  • Posts: 9472
You can use a custom block on the other actor's behavior that returns the attribute you want to use, but I don't know if that is better for performance or not.  It does make the code easier to read though, which is why I sometimes use custom blocks to replace the Behavior category blocks.

Almakos

  • Posts: 632
nopies,...I am still afraid of custom blocks because don't fully understand their nature.
But it is a brilliant idea to leave obvious trace on that side. I think I will stay with game attributes for the time being and some days later will start using custom blocks =)
Thank you, that was a helpful suggestion!
Fishing Fantasy Trailer