Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incrementing values in an autoload dictionary does not work. #2129

Closed
coffeestains opened this issue Mar 8, 2024 · 1 comment · Fixed by #2134
Closed

Incrementing values in an autoload dictionary does not work. #2129

coffeestains opened this issue Mar 8, 2024 · 1 comment · Fixed by #2134
Labels
Bug 🐞 Something isn't working

Comments

@coffeestains
Copy link

Changing values of a dictionary using dialogic fails silently.

Describe the bug
I've reported this on the discord but thought I'd open an issue here as well. If you use a GDScript autoload that holds values in a dictionary instead of variables, and try to increment it using dialogic, it fails to increment without a warning.

To Reproduce

Autoload:

var follower: {
"friendship": 10
}

dialogic text editor:

Follower: I feel like dropping out of the guild and trying adventuring was a <bad/horrible/terrible> <idea/plan>.
I know but I will help you as much as I can.
  set {Globals.follower['friendship']} += 5
  Follower: I'm so happy you believe in me!
Tough luck. I hope you find a way to make things right.
  set {Globals.follower['friendship']} -= 5
  Follower: Right, that's the plan.

Expected behavior
Friendship should increment to 15 or 5 depending on selection but it stays at 10.

System (please complete the following information):

  • OS: Windows
  • Godot Version: 4.2.1
  • Dialogic Version: 2.0 Alpha1

Solutions

Workaround

Using call events for now as a workaround.

@CakeVR CakeVR added the Bug 🐞 Something isn't working label Mar 8, 2024
@CakeVR CakeVR added this to the Version 2.0 (beta) milestone Mar 8, 2024
@CakeVR
Copy link
Collaborator

CakeVR commented Mar 8, 2024

As mentioned on the Discord, I was able to reproduce this bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug 🐞 Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants