Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: Rabagast on August 14, 2015, 07:23:50 AM
-
Hi!
I have a problem with Arraymaker when I'm going to send an event.
Well, this is not an Arraymaker problem.
Let me explain:
I have 10 prefabs I put in an Array List. Then I use the action Array List Get Random. Then I create an object. I loop this until all the 10 objects are placed in the scene. So far is ok. The problem is that I need to send an event to these objects in the scene I created from prefabs. It doesn't work, because it send the event to the prefabs objects. Not to the scene objects. Is this impossible to do? Or is it a way to solve this?
Hope someone can help me. :)
-
I'd create a new array list and add the instances to it as they are spawned, and then you can send them the events.
-
Hi!
How do I add instances to the objects? Maybe I didn't understand. Sorry for that!
Do you think you can explain a bit more?
-
by instance I mean the "scene object" instead of prefab.
you're already doing it! just add them to a new array right after you create them
-
Ok, thanks!
I will try that. Or else I can just add the prefabs manually to the scene and use the scene objects in the Array List. It worked.
-
It works. I just added the created object to a new Array List. Then I could send an event to that object. :)
-
You can also send event by tag.. set your gameobject tags then send the event
The action can be found on the ecosystem..
-
You can also send event by tag.. set your gameobject tags then send the event
I made it without using this, but I found it very useful, so probably I will use it later. Thanks for this. :)