playMaker

Author Topic: template bug issue[solve]  (Read 1718 times)

kapoke69

  • Playmaker Newbie
  • *
  • Posts: 17
template bug issue[solve]
« on: December 18, 2017, 05:27:15 PM »
i save template
then use template to another obj
but
the global variable value in template not work propery  while other obj that use global variable(not use template) is fine.

from pic , the groundZPos should be the value from object(which are 30 in my case) but it isn work on run, so i have to use value instead.
« Last Edit: December 21, 2017, 11:14:45 PM by kapoke69 »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: template bug issue
« Reply #1 on: December 20, 2017, 01:40:54 AM »
Hi,

 It's likely because you have a local variable named exactly as the global variable and PlayMaker will use the local one on new instances. This is a known issue and is not likely to change in the near future, so make sure your global variables do not conflict with your template local variables

Also, inside template, it's likely highly preferrable to not user global variables, and instead create a variable that you expose in the inspector so that the run fsm sees it and you feed your global variable value viz this intermediate template variable.

 Bye,

 Jean

kapoke69

  • Playmaker Newbie
  • *
  • Posts: 17
Re: template bug issue
« Reply #2 on: December 21, 2017, 11:14:25 PM »
i will check it, thx u. :D
for me , i solve by add wait time to obj at first state then do the process , then everything is fine.
« Last Edit: December 21, 2017, 11:20:48 PM by kapoke69 »