playMaker

Author Topic: ArrayMaker - Send Events to all GameObjects in array?  (Read 2501 times)

jess84

  • Hero Member
  • *****
  • Posts: 515
ArrayMaker - Send Events to all GameObjects in array?
« on: January 29, 2014, 05:14:22 PM »
Is it possible to send an event to only the GameObjects in a specified array?

I've looked through the actions available, but can't figure this out. (And the documentation for array actions is almost non-existant - the blue book icon linked to blank pages)

escpodgames

  • Hero Member
  • *****
  • Posts: 687
    • Assets
Re: ArrayMaker - Send Events to all GameObjects in array?
« Reply #1 on: January 29, 2014, 06:51:51 PM »
What you could do is get each gameobject (Array List Get Next action) and set it as the gameobject in the (Send Event action), send the event and repeat until the (Array List Get Next Action) has finished

Bjakuja

  • Junior Playmaker
  • **
  • Posts: 75
Re: ArrayMaker - Send Events to all GameObjects in array?
« Reply #2 on: January 30, 2014, 04:10:46 AM »
If you want to send events to all game objects then use action that LampRabbit suggest, it works great, get all from ArrayList and using get next from index 0 to 0 which is from start to end just in different state do what you want. Hovewer if you want to send events to specific objects in ArrayList you can you can use same action but use some variable check for those game objects, for example use string contains or something like that and if game objects contains that string send him event and if not, just skip it and get next game object looping through all game objects. You can also set index to get objects from specific or to specific index a lot possibilities with arrays you have ;) Hope this helps

Cheers!

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: ArrayMaker - Send Events to all GameObjects in array?
« Reply #3 on: January 30, 2014, 05:05:45 AM »
Hi,

 yeah, good point, I need to do them blue icon doc links... Added to the trello task.

https://trello.com/c/FamlVQBD/31-arraymaker-update

bye,

 Jean