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

choice meet problem when insert jumpNow in it. #207

Open
soundsofapril opened this issue Apr 24, 2022 · 2 comments
Open

choice meet problem when insert jumpNow in it. #207

soundsofapril opened this issue Apr 24, 2022 · 2 comments
Labels
bug multi-hack Issue regarding behaviour of multiple combined hacks

Comments

@soundsofapril
Copy link

DLG 0
"""
{choice
	- option one
	  result of picking optionA(jumpNow "3")
	- option two
	  result of picking optionB
  }
"""
NAME dog dialog

DLG 3
Opp
NAME opp dialog

DLG 4
Yep
NAME yep dialog

and the default example don't work either:

Greeting text{choice
  - Response one
    {a = 1}
  - Response two
    {a = 2}
}
constant part of answer{
  - a == 1 ?
    custom part based on response one
  - a == 2 ?
    custom part based on response two
}
@seleb
Copy link
Owner

seleb commented Apr 24, 2022

For the first example, you're mixing the choice hack and the jump hack in a way that causes incompatibility, but could be rewritten to avoid it. Instead of having some content inside the choice and using a {jumpNow} tag, i'd recommend having it only include a {jump} tag and putting all the content in another dialog entry.

So a corrected script would look like:

DLG 0
"""
{choice
  - option one
    (jump "3")
  - option two
    result of picking optionB
}
"""
NAME dog dialog

DLG 3
result of picking optionAOpp
NAME opp dialog

DLG 4
Yep
NAME yep dialog

For the second example, this appears to be a bug in how bitsy is parsing the scripts, but it can be fixed by slightly changing the content, e.g. if you remove the whitespace between the end of the choice block and the new text (i.e. write it like }constant ...) then it renders as expected. I'll update the example, but I don't think I can fix the parsing issue here without more info.

@seleb seleb added bug multi-hack Issue regarding behaviour of multiple combined hacks labels Apr 24, 2022
@soundsofapril
Copy link
Author

thanks ! bitsy-hacks is so cool.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug multi-hack Issue regarding behaviour of multiple combined hacks
Projects
None yet
Development

No branches or pull requests

2 participants