playMaker

Author Topic: Arraymaker and Send Event[SOLVED]  (Read 1797 times)

Rabagast

  • Hero Member
  • *****
  • Posts: 683
    • View Profile
    • Homepage
Arraymaker and Send Event[SOLVED]
« on: August 14, 2015, 04: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. :)
« Last Edit: August 16, 2015, 10:56:15 AM by jeanfabre »
Check out our homepage. http://www.walsberg.no
Or my personal game blog for news about my games. http://retro-tetro.walsberg.no

terri

  • Sr. Member
  • ****
  • Posts: 373
    • View Profile
    • terrivellmann.tumblr.com
Re: Arraymaker and Send Event
« Reply #1 on: August 14, 2015, 05:38:01 AM »
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.

Rabagast

  • Hero Member
  • *****
  • Posts: 683
    • View Profile
    • Homepage
Re: Arraymaker and Send Event
« Reply #2 on: August 14, 2015, 05:50:37 AM »
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?
Check out our homepage. http://www.walsberg.no
Or my personal game blog for news about my games. http://retro-tetro.walsberg.no

terri

  • Sr. Member
  • ****
  • Posts: 373
    • View Profile
    • terrivellmann.tumblr.com
Re: Arraymaker and Send Event
« Reply #3 on: August 14, 2015, 05:55:07 AM »
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

Rabagast

  • Hero Member
  • *****
  • Posts: 683
    • View Profile
    • Homepage
Re: Arraymaker and Send Event
« Reply #4 on: August 14, 2015, 06:31:05 AM »
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.
Check out our homepage. http://www.walsberg.no
Or my personal game blog for news about my games. http://retro-tetro.walsberg.no

Rabagast

  • Hero Member
  • *****
  • Posts: 683
    • View Profile
    • Homepage
Re: Arraymaker and Send Event
« Reply #5 on: August 14, 2015, 07:11:33 AM »
It works. I just added the created object to a new Array List. Then I could send an event to that object. :)
Check out our homepage. http://www.walsberg.no
Or my personal game blog for news about my games. http://retro-tetro.walsberg.no

dudebxl

  • Hero Member
  • *****
  • Posts: 602
    • View Profile
Re: Arraymaker and Send Event
« Reply #6 on: August 14, 2015, 07:55:38 AM »
You can also send event by tag.. set your gameobject tags then send the event

The action can be found on the ecosystem..
« Last Edit: August 14, 2015, 08:09:35 AM by dudebxl »

Rabagast

  • Hero Member
  • *****
  • Posts: 683
    • View Profile
    • Homepage
Re: Arraymaker and Send Event
« Reply #7 on: August 15, 2015, 02:44:37 PM »
Quote
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. :)
Check out our homepage. http://www.walsberg.no
Or my personal game blog for news about my games. http://retro-tetro.walsberg.no