Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Hi, thank you for the response :D

Yes the branching part I did and is working fine.

But I am also trying to implement like in your example that you only have 1 talk with the NPC. After that if you talk to him he will react according to the talk you had.

The way I implemented now, based on your documentation, the talk will always restart.

Oh okay hmm - then I'd guess it might just be a misplaced/missing bracket somewhere. Just make sure that you set an option for ALL the possible dialogue choices. If there's two dialogue choices, there should be two values it's going to change to. 

myChangeVars[dialogue_line_number] = [obj_id, "choice_variable_as_string", ["value1", "value2"]];

If you're still having trouble could you send me a screenshot of the code where you declare this?


still struggling, even checked your example project trying to figure it out :/


I also created this pastebin: https://pastebin.com/ynHyW0Ed


thx! :)

Ah okay I think this wasn't clear in the documentation - for lines where there is a choice but you DON'T change any variables (BUT on other lines in the dialogue you HAVE) then you need to set:

myChangeVars[1] = -1; 

for those lines. That basically means there won't be any variables changing in those lines. 

Also, for the changing variable thing to work, you have to give a SPECIFIC instance ID in that argument. You'd given just an object_index, but the function variable_instance_set requires an instance ID. So at the very top when you set the diretor to an object, you can use instance_find to get the ID (hopefully there's just one instance of that object. If not, you can use "ID" to refer to itself).

Also as a note, you'd forgotten to put the "breaks" after your other cases :)

I've put all the changes into this pastebin:

https://pastebin.com/TURyKsdr

Thank you very much for your help sir :D 

you are awesome! Hope to show you the results someday (in english!)