playMaker

Author Topic: Send Event to parent's children (siblings)  (Read 4677 times)

damdai

  • Playmaker Newbie
  • *
  • Posts: 5
Send Event to parent's children (siblings)
« on: October 23, 2013, 09:35:02 AM »
An option to Send Event to parent's children would be useful.
« Last Edit: October 23, 2013, 10:48:00 AM by damdai »

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: Send Event to Host FSM children
« Reply #1 on: October 23, 2013, 09:37:15 AM »
Wouldn't that just be a matter of specifying the Event Target?
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

damdai

  • Playmaker Newbie
  • *
  • Posts: 5
Re: Send Event to parent's children (siblings)
« Reply #2 on: October 23, 2013, 10:47:15 AM »
I meant to say "parent" instead of "host."

There's some dynamic stuff going on that makes it impossible to preset the target. The FSM host object has siblings that may or may not exist and don't need to know about each other. When the FSM in question talks, the siblings should listen. For now, I am storing the parent in a variable and specifying "Event Target > Game Object" that way.

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: Send Event to parent's children (siblings)
« Reply #3 on: October 23, 2013, 10:58:40 AM »
I usually just Get Parent, store it, then Send Event to that variable.

Depending on how frequently it changes, this is usually pretty simple to do at startup for that object, you could run Get Parent more frequently or find a trigger to fire it when it changes (if ever).

I really doubt it is impossible to do what you're saying, if you explain the use case a little more I'm sure we can find a way to wire it up.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

bkups2003

  • Playmaker Newbie
  • *
  • Posts: 49
Re: Send Event to parent's children (siblings)
« Reply #4 on: October 23, 2013, 11:07:13 PM »
Send event has a "send to children" bool. I think you can only see it after you place a gameobject in the field. But there is no way to avoid the parent from receiving that event too. The only way is to make sure the parent does not use that event at all, and only the children do.

Anyway, from what i understand, the basic send event action should do what you want.