[SOLVED] How to send messages between behaviors?

Almakos

  • Posts: 632
Hey guys,
I've read on stencylpedia, that messages can be sent between behaviors. But how to do that? I've tried to search the forum, but with no luck...

I want to trigger some action in current behavior, when something happened in another behavior.

« Last Edit: June 10, 2012, 10:17:43 pm by Almakos »
Fishing Fantasy Trailer


Xietao

  • Posts: 725
To trigger the messege in events Code -> Custom Event to hear Behavior -> Triggers to trigger
Free Time:
Monday, Wednesday, Friday: 13h
Tuesday, Thursday, Saturday, Sunday: 7h
Loving Linux...

Almakos

  • Posts: 632
Ok, but what should I put inside this block? (if I understood which block is needed correctly)
Fishing Fantasy Trailer


hansbe

  • Posts: 262
if you put "bossFight" inside that field,
then all scene behaviors that have a custom event "when bossFight happens" will run that event.

Almakos

  • Posts: 632
That was the first thing I tried to put there, but I've got this error:
Code: [Select]
Behavior: Design_21_21_Shipbombexplode at line 48
Call to a possibly undefined method Bossfight.
                        Bossfight();
At least now I understand in which direction to look.
Thank you guys.


Updated: everything works beautifully now =)

« Last Edit: June 10, 2012, 10:17:22 pm by Almakos »
Fishing Fantasy Trailer