Hello all,
I’m tring to manage dialog tree. It’s no easy form me.
I have created a one branch yarn json. It’s composed with 3 lines.
To start, I would like to:
press Z and see line 1
press again Z and see line 2
press again Z and see line 3
Real simple, I think.
This in the code:
What’s happend ? Every time I press “z”, the line number 2 is displayed .
Can you please help me ?
Do you know if there is a very very simple example ?
Thanks,
J
I might be wrong but just from looking at your code it seems that your condition for releasing the z key is being called twice and being asked to perform two separate actions at once. So your seeing the result of those colliding.
i would approach it like this. create a variable called “line” and add 1 to it every time z is pressed. Make sure you set it to only do this once per time the z key is pressed.
line =0 then do begin
line =1 then do line 1
line =2 then do line 2
and when you finish just reset the line variable to 0
hope that makes sense.
Thanks, now I understand. Asap I’ll create e YT tutorial and the source in GIT.
1 Like
Of course, now I’m on holiday and I haven’t the wireless.
The tutorial is in Italian language but the example contains English comments.
Here the GIT: GitHub - jumpingjh/tut5: Tutorial 5: Dialog Tree