playMaker

Author Topic: Add objects to array. Basic best practices?  (Read 1034 times)

indeed

  • Junior Playmaker
  • **
  • Posts: 85
Add objects to array. Basic best practices?
« on: October 02, 2018, 10:16:29 AM »
Hi, I'm new to arrays. I have 12 cubes in a scene that I'd like to add to an array that's inside a manager gameobject. So at runtime, I guess I'd put on fsm on each cube that told it to add itself to this array. There doesn't seem to be something like "Array Add FSM" that lets you add to an array on another GO.

I usually try to avoid global variables, but is making the array variable global what you'd do here? Or is there an easy way to do it without globals? Also, I'm currently mainly looking at the built-in "Array" actions. Should I be using arraymaker instead?