playMaker

Author Topic: Can't Drag Scene Object to Arrays (Global Variable)  (Read 84 times)

rechronicle

  • Playmaker Newbie
  • *
  • Posts: 25
  • Medievaliant
    • View Profile
    • Indie RPG Creator
Can't Drag Scene Object to Arrays (Global Variable)
« on: April 06, 2019, 04:53:29 AM »
Hello,
I was following the tutorial 'Intro to using Arrays in Playmaker' https://www.youtube.com/watch?v=yOZK8yr3IKo.
In the tutorial, he can drag the object from the scene into the Array variable (2:41).

But I can't do that, instead, it requires me to put game object/prefabs from the asset folder.

This is causing the value (of GameObject inside the Array) in inspector not updating in-game, and only updates after Testing Mode ends.

Any new workflow using Arrays?
Or should I just avoid using Global Variable?

Thank you!


Haven't tried it yet with ArrayMaker. Not sure if the problem will persist.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 4106
    • View Profile
    • jinxtergames
Re: Can't Drag Scene Object to Arrays (Global Variable)
« Reply #1 on: April 07, 2019, 08:11:34 AM »
Hi.
You will need to populate the array @runtime if its global indeed.

But you should minimize using globals (read this wiki page)

You can use Get/Set Fsm actions to get or set things from other fsms/gameobjects.

on the Ecosystem you can find even more actions, like 'fsm bool test'  and 'fsm int add' for example.