You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi there!
I am tied to use whiskers-parser in my own project. I add a Control node named HUD, and a child Control node named Dialogue. The Dialogue node is as same as the node was used in whiskers project. Basic_dave.json and jump_dave.json was work in that way. However, condition_dave.json and other file that used condition node just cannot work.
I guess it happens because there is no func and variables into script. I could not found any useful documents on the gihub lol. How can I add the func and variables into it?
error output:
Invalid get index 'key' (on base: 'Dictionary').
and
E 0:00:00:0474 self can't be used because instance is null (not passed)
core/math/expression.cpp:2147 @ execute()
WhiskersParser.gd:152 @ execute_expression()
WhiskersParser.gd:110 @ handle_condition()
WhiskersParser.gd:222 @ generate_block()
WhiskersParser.gd:42 @ start_dialogue()
Dialogue.gd:37 @ init()
HUD.gd:10 @ _ready()
The text was updated successfully, but these errors were encountered:
I just was confused too, but then I realized you must pass an object as context when instancing the parser. Without this object the parser doesnt know how where to look up the variables or call the functions. So if you want it to wirk you have to instance the parser like so: WhiskersParser.new(context) where context is an object holding the functions and variables used in the dialogue. In the case of condition_dave.json it must have a variable called littleMouse which has to be a String. I don't know how you want to use it but for testing purposes you can pass self as a parameter and have the variable littleMouse in the same script. The whole thing is mentioned as the first thing in the readme.
Hi there!
I am tied to use whiskers-parser in my own project. I add a Control node named HUD, and a child Control node named Dialogue. The Dialogue node is as same as the node was used in whiskers project. Basic_dave.json and jump_dave.json was work in that way. However, condition_dave.json and other file that used condition node just cannot work.
I guess it happens because there is no func and variables into script. I could not found any useful documents on the gihub lol. How can I add the func and variables into it?
error output:
and
The text was updated successfully, but these errors were encountered: