playMaker

Author Topic: [SOLVED] Problem with Global Variables trying to Set Dialogue Image  (Read 462 times)

JoeGameDev

  • Playmaker Newbie
  • *
  • Posts: 15
Hi everybody!

I'm trying to create a dialogue system that has an avatar in the dialogue box to indicate who's talking. I watched the tutorial by Bliz Studio on YT and followed it, I believe, to the letter. However, I've encountered a problem. Screenshots are included.

The first screen shows that my Dialogue Manager FSM creates a Global Variable called Dialogue Avatar. I am supposed to be able to use that variable in any other gameobject to change the image shown. Per my second screenshot, when I click on "Specify Game Object" I cannot specify that Global Variable as he does in the tutorial video. It only gives me the option to create a new one -- which doesn't help me at all. Also odd, when I click the = button besides the sprite window, I am given teh option to use the variable I want THERE, but again this isn't useful. In the tutorial, he specifies the game object as the global variable and then selects the desired sprite, which then populates in his dialogue box.

Any suggestions?
« Last Edit: October 21, 2022, 06:08:07 PM by JoeGameDev »

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: Problem with Global Variables trying to Set Dialogue Image
« Reply #1 on: October 20, 2022, 02:29:22 AM »
hi.
there are 2 versions of sprite, the dedicated Sprite and Object/UnityEngine/Sprite

its possible the variable type is set wrong

JoeGameDev

  • Playmaker Newbie
  • *
  • Posts: 15
Re: Problem with Global Variables trying to Set Dialogue Image
« Reply #2 on: October 21, 2022, 03:44:03 PM »
Thanks! That’s got to be it, I just need to figure out how to make sure it’s right.

JoeGameDev

  • Playmaker Newbie
  • *
  • Posts: 15
Re: Problem with Global Variables trying to Set Dialogue Image
« Reply #3 on: October 21, 2022, 06:06:34 PM »
GOT IT! Okay, so my issue was as DJ said: I was using two different global variable types that weren't compatible with the other actions. So rather than using UI Image Set Sprite in the dialogue manager and then Set Sprite in the FSM to control the image, I used UI Image Set Sprite in both, and VOILA! Works like a charm.

Thanks for your help, Jay!