playMaker

Author Topic: Variable inside prefab gets replaced with another variable  (Read 1184 times)

SawyerK

  • Junior Playmaker
  • **
  • Posts: 99
Variable inside prefab gets replaced with another variable
« on: July 16, 2022, 04:16:35 PM »
Hi!

I have a pretty big bug in my game that just started to happen out of nowhere.
Basically a variable inside a prefab keeps getting replaced with an other one when starting the game, and making my states not work, creating some pretty serious bugs. I tried  everything, deleted and rewrite the variables deleted re-added the states nothing worked.
How can I fix this problem? I need some help pretty quick, players are getting mad xD

Thank you!



djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7618
    • jinxtergames
Re: Variable inside prefab gets replaced with another variable
« Reply #1 on: July 24, 2022, 07:24:43 PM »
Hi
Normally replacing the state always works for me.
Try making a copy from the prefab

if that does not help, can you show some images or videos.
From the actions / variables that change.
Make sure that there is no global / local name issue

SawyerK

  • Junior Playmaker
  • **
  • Posts: 99
Re: Variable inside prefab gets replaced with another variable
« Reply #2 on: July 27, 2022, 02:52:04 PM »
Thank you for the reply!

Saving the fsm, deleting then pasting back the fsm worked.

This is a pretty annoying thing, because it happened again with an another prefab, and it's impossible to test when you have 500+ prefab items all over a 16x16km map, so I can only fix it when a player reports the bug. Then I fix it, update the game on Steam and all of a sudden another item is acting up and has the same variable replace problem.