playMaker

Author Topic: How to put a game object in the global Array variable in the hierarchy  (Read 1134 times)

playmakertester

  • Full Member
  • ***
  • Posts: 211
Is it possible for Playmaker to specify a game object on the hierarchy that is not prefabbed as a Game object to be included in Array?

I've been trying, but it looks like only game objects in the Asset can be put into Array, which is a global variable.

heavygunner

  • Sr. Member
  • ****
  • Posts: 344
Re: How to put a game object in the global Array variable in the hierarchy
« Reply #1 on: October 11, 2020, 06:06:15 AM »
Add "Get Owner" and save it on a variables. Then, use Array add

playmakertester

  • Full Member
  • ***
  • Posts: 211
Re: How to put a game object in the global Array variable in the hierarchy
« Reply #2 on: October 11, 2020, 12:20:55 PM »
Thanks heavygunner!

Let me try!

playmakertester

  • Full Member
  • ***
  • Posts: 211
Re: How to put a game object in the global Array variable in the hierarchy
« Reply #3 on: October 14, 2020, 09:07:46 AM »
I'm looking at the Get owner help, but I'm not sure how to use it now.

Gets the Game Object that owns the FSM and stores it in a game object variable.

If you have a video or article that explains how to use this, please let me know.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: How to put a game object in the global Array variable in the hierarchy
« Reply #4 on: October 20, 2020, 11:26:43 AM »
Hi.
Its probably better to use Array Maker as its easier to reference.