playMaker

Author Topic: send Event by tag (send Event by layer)  (Read 5433 times)

dudebxl

  • Hero Member
  • *****
  • Posts: 602
send Event by tag (send Event by layer)
« on: April 13, 2015, 09:28:24 AM »
hi,

another action..  alternative to broadcast all.  Not sure if it's 'best practice' but useful to quickly control/filter the send event..

usage
  • filter by tag --> incl Layer set false --> send event to all object with equal tag
  • filter by tag --> incl Layer set true --> filter by layer --> send event to all object with equal tag + equal layer

To conclude, it always filter first by tag then layer..

Update: action + updates are on ecosystem or https://snipt.net/dudebxl/
hope it helps..  :o
« Last Edit: May 31, 2015, 04:52:52 PM by dudebxl »

rik

  • Full Member
  • ***
  • Posts: 246
Re: send Event by tag (send Event by layer)
« Reply #1 on: April 13, 2015, 09:50:06 AM »
where should we put game object make space for adding game objects as well

dudebxl

  • Hero Member
  • *****
  • Posts: 602
Re: send Event by tag (send Event by layer)
« Reply #2 on: April 13, 2015, 09:55:35 AM »
Rik,

the action is a broadcast all filtered by tag/layer

you do not need to put gameobject.. if you need to send to a gameobject, you do not need tag/layer as you already know your 'target'.  :-\

if the event name is not in the dropdown (not global, can't seem to make the drop-down show all global events) then key input (use copy/past) the event name. The broadcast (send event) is always global..

You would use this action if for example I have 100 gameobjects all with the same event (set to global) name in them (and set FSM name). I want to quickly send an event to 25 gameobjects, I use the tag filter as my 25obj out 100 have a different tag... when i need to send to all 100 gameobject, i would then use the 'send event' action set (the normal one by playmaker) to broadcast all. Anyway, this is how i use it...  :o
« Last Edit: April 13, 2015, 10:09:17 AM by dudebxl »

4ppleseed

  • Full Member
  • ***
  • Posts: 226
Re: send Event by tag (send Event by layer)
« Reply #3 on: April 13, 2015, 10:44:57 AM »
This is really useful, thanks  8)

mdotstrange

  • Hero Member
  • *****
  • Posts: 555
    • Can't code? Who cares! Make games anyway!
Re: send Event by tag (send Event by layer)
« Reply #4 on: April 13, 2015, 08:44:46 PM »
Thank you!  :D
Indie game dev and instructor at the Strange School. Learn Playmaker at the Strange School!

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: send Event by tag (send Event by layer)
« Reply #5 on: April 14, 2015, 02:49:55 PM »
Hi,

 yep, very useful, thanks for this!

 Bye,

 Jean