Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: Athin on June 29, 2020, 02:34:59 AM

Title: Array List Enable Events Sent Globally?
Post by: Athin on June 29, 2020, 02:34:59 AM
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
Title: Re: Array List Enable Events Sent Globally?
Post by: djaydino on June 29, 2020, 02:09:59 PM
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.
Title: Re: Array List Enable Events Sent Globally?
Post by: Athin on June 30, 2020, 03: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? 

 
Title: Re: Array List Enable Events Sent Globally?
Post by: djaydino on June 30, 2020, 11: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
Title: Re: Array List Enable Events Sent Globally?
Post by: Athin on July 01, 2020, 06: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 :)