playMaker

Author Topic: Array List Enable Events Sent Globally?  (Read 131 times)

Athin

  • Full Member
  • ***
  • Posts: 145
    • View Profile
Array List Enable Events Sent Globally?
« on: June 28, 2020, 11:34:59 PM »
Heya all,

Simple question here.  I got an array list with events on it but I was wondering if those events are fired off globally to all FSM or only the object it is attached to?  If it is globally, is there a way to localize it to only the game object it is on?

Thanks

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 5094
    • View Profile
    • jinxtergames
Re: Array List Enable Events Sent Globally?
« Reply #1 on: June 29, 2020, 11:09:59 AM »
Hi.
As far as i know, only on the object that holds the array list.
And possibly only to the top fsm on the inspector list.

Athin

  • Full Member
  • ***
  • Posts: 145
    • View Profile
Re: Array List Enable Events Sent Globally?
« Reply #2 on: June 30, 2020, 12:43:05 AM »
Heya,

I just did a simple test with this and it doesn't seem to be the case. Made one empty game object with an array list on it with an Add event "Testing".  A simple FSM action to add itself to the array in the same game object.  Had another game object just listening for the Testing event and it does seem to trigger off of the first game object adding itself to the array.

Now my question is, is that intended and if so is there a way to localize it? 

 

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 5094
    • View Profile
    • jinxtergames
Re: Array List Enable Events Sent Globally?
« Reply #3 on: June 30, 2020, 08:27:13 AM »
Hi.
I just tested and it does indeed Broadcast the event
So it does not matter on what object you have the event.

it might indeed be better if you could optional target a fsm instead.

Maybe you can request on this topic :
https://hutonggames.com/playmakerforum/index.php?topic=835.0

For now, use a unique event name.

You can use something like "Array/MyArrayRef/Added"

i use / a lot to group events/variables

Athin

  • Full Member
  • ***
  • Posts: 145
    • View Profile
Re: Array List Enable Events Sent Globally?
« Reply #4 on: July 01, 2020, 03:14:12 AM »
Heya,

Yeah I'll ask to see if it can be changed.

My issue is that I had prefabs with set events on their arrays.  I thought they only applied to the GO it was on and built a system to work that way.  Will have to re-design it another way now.

Thanks to at least confirm that its just not me losing my mind :)