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

Multiline functions are executed all at once #13

Closed
2shady4u opened this issue Nov 28, 2019 · 2 comments
Closed

Multiline functions are executed all at once #13

2shady4u opened this issue Nov 28, 2019 · 2 comments
Labels
bug Something isn't working

Comments

@2shady4u
Copy link
Contributor

2shady4u commented Nov 28, 2019

Describe the bug
Putting multiple functions on different lines results in all these functions being executed at once without any respect for the new line.

To Reproduce

  • Make a new Godot project
  • Download and activate the inkgd plugin from the Asset Store
  • Download the examples-folder from the Github repository
  • Take the minimum ink-file I supplied below and copy-paste it into the "Interceptor.ink" and rebuild the JSON using inklecate
  • Change the "bind_externals" function (found in ink_runner.gd) to:
func _bind_externals():
    story.observe_variables(["currentActor"], self, "_observe_variables")
    #story.bind_external_function("should_show_debug_menu", self, "_should_show_debug_menu")
  • Run the ink_runner.tscn and see what happens.

OUTPUT in game:

It's Philippe!

It's Andre!

It's Andre!

choose Andre

It's Philippe!

(story complete)

Expected behavior
As seen in both Quill and Inky I expect the function, that is part of the new line to only be executed AFTER the current line, and thus give following output for the script given below:

It's Philippe!

It's Andre!

It's Philippe!

choose Andre

It's Philippe!

(story complete)

Ink files

VAR currentActor = "player"

VAR s = -> set_actor
-> start

===function set_actor(x)
{ x:
- "P": ~ currentActor = "Philippe"
- "A": ~ currentActor = "Andre"
- else: ~ currentActor = "player"
}

=== start ===
{s("P")} It's {currentActor}!
{s("A")} It's {currentActor}!
{s("P")} It's {currentActor}!
{s("A")}
+ choose {currentActor}
    {s("P")} It's {currentActor}!
    -> END
+ choose {currentActor}
    {s("A")} It's {currentActor}!
    -> END

Environment:

  • OS: Windows
  • Inklecate version: 0.9.0
  • inkgd version: 0.1.3

Additional context
I currently don't have a work-around for this problem....

@ephread ephread added the bug Something isn't working label Dec 1, 2019
@ephread
Copy link
Owner

ephread commented Dec 1, 2019

Thanks for reporting the issue @2shady4u, I won’t have access to a computer before the 18th of December, but I’ll investigate as soon as I’m back from my little trip. This is a significant issue.

@ephread
Copy link
Owner

ephread commented Apr 11, 2020

Seems to be fixed on master, I tested with files from both inklecate 0.8.3 and 0.9.0 and compared with Inky's output.

@ephread ephread closed this as completed Apr 11, 2020
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

No branches or pull requests

2 participants