Scripting and others questions
Posted: Mon Jan 15, 2018 4:46 pm
Hi Tony, happy new year !
First of all, I want to thank you for this asset. I don't know how do you find the time to answer all questions in this forum !
I didn't purchase Dialogue System, cause.. lack of money in this end of month, but I will.
I read the tutorial, and I would be dumb, but I don't manage to script in LUA with a dialogue.
I put in a script called "Player" a public void method called "GagnerEXPTRUC() { truc = truc +1}
In Start method i put Lua.RegisterFunction("GagnerEXPTRUC", null, typeof(DialogueLua).GetMethod("GagnerEXPTRUC"));
In my scene test, I made a dialogue Database, made a tree conversation, and put in the player's answer a LUA code " GagnerEXPTRUC();". And nothing happen, my variable "truc" didn't get +1. I didn't called my fonction.
I think I didn't understand your tutorial...
My second question : I want to call GagnerEXPTRuc() only one time. If I repeat this dialogue and I chose the same answer, my variable would increase each time I chose this answer. Do you know how can I destroy this fonction for this specific conversation answer after utilization ? I want to allowed the player to read the same dialogue, but I don't want him to earn more "Truc". It's a frequent glitch in RPG !
I use unity 2017.2
An another question : I want to use a inventory asset. Do you advise S-Inventory or Inventory-Pro ?
Thank you for all, and forgive me for this questions.
Molina
NB : "Truc" mean "Something in French !
First of all, I want to thank you for this asset. I don't know how do you find the time to answer all questions in this forum !
I didn't purchase Dialogue System, cause.. lack of money in this end of month, but I will.
I read the tutorial, and I would be dumb, but I don't manage to script in LUA with a dialogue.
I put in a script called "Player" a public void method called "GagnerEXPTRUC() { truc = truc +1}
In Start method i put Lua.RegisterFunction("GagnerEXPTRUC", null, typeof(DialogueLua).GetMethod("GagnerEXPTRUC"));
In my scene test, I made a dialogue Database, made a tree conversation, and put in the player's answer a LUA code " GagnerEXPTRUC();". And nothing happen, my variable "truc" didn't get +1. I didn't called my fonction.
I think I didn't understand your tutorial...
My second question : I want to call GagnerEXPTRuc() only one time. If I repeat this dialogue and I chose the same answer, my variable would increase each time I chose this answer. Do you know how can I destroy this fonction for this specific conversation answer after utilization ? I want to allowed the player to read the same dialogue, but I don't want him to earn more "Truc". It's a frequent glitch in RPG !
I use unity 2017.2
An another question : I want to use a inventory asset. Do you advise S-Inventory or Inventory-Pro ?
Thank you for all, and forgive me for this questions.
Molina
NB : "Truc" mean "Something in French !