playMaker

Author Topic: Send event to multiple objects  (Read 3320 times)

TommyA

  • Playmaker Newbie
  • *
  • Posts: 26
Send event to multiple objects
« on: March 14, 2012, 02:50:28 AM »
Hi
First of all, I'm completely newbie to Playmaker.

I'm trying to send event to particular game objects (multiple object) but all action states which related with event have only one target column.
I found "Broadcast event" action state but I don't want to broadcast event to all of my objects.

Thank you.

Sorry for my bad English.  ;)

justifun

  • 1.2 Beta
  • Sr. Member
  • *
  • Posts: 280
Re: Send event to multiple objects
« Reply #1 on: March 14, 2012, 12:31:48 PM »
You could create a separate unique event for just those objects, so that when you broadcast, only they hear it.

Or are you trying to do something like....

All prefab enemies within a certain distance from the player need to receive the event only?

How are you determining which objects need to receive the broadcast?

I would be cool if broadcast event had a drop down for a specific tag type, ill add it as a suggestion.




jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Send event to multiple objects
« Reply #2 on: March 15, 2012, 03:06:46 AM »
Hi,

 yes broadcasting by tag would be cool actually.

 The issue you are having TommyA is very common, to add to the very good suggestion by Justifin,you can also fill the event data with some meaningful variable and then broadcast the even. When a state is received this global event check the event data and react or ignore this event. This one other solution if you want to keep One global event for this.

 Bye,

 Jean


TommyA

  • Playmaker Newbie
  • *
  • Posts: 26
Re: Send event to multiple objects
« Reply #3 on: March 15, 2012, 04:59:38 AM »
Thank you for replying.

I will try to make separated unique event each by object.
And..how I set the tag for object in broadcast event action?
There is no tag column in broadcast event.

Thank you again.
Playmaker is pretty cool!  ;)
« Last Edit: March 15, 2012, 05:03:30 AM by TommyA »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Send event to multiple objects
« Reply #4 on: March 15, 2012, 08:56:08 AM »
hi,

 Broadcasting by tag is not implemented. So you can't.

 Bye,

 Jean