Topic category: Advanced modding
I am making a procedure that will ask the player a question and they will answer with 1, 2, 3.
i have a procedure that will detect and return the answers from chat, but now when i try to test it, i have this procedure:
set a local variable for the response to the return of the other procedure, and use if statements to determine what to do.
now, the procedure that checks the response is triggered by a player typing anything into chat, and that will give me a "text" dependency to work with, but if i try to call this procedure from another procedure, i no longer have access to the text as a dependency.
so not only do i need a way to return the value while still having the "text" dependency, but i also need it to stop executing the procedure until an answer is given, then it should resume
i could try using a while loop with a wait block in it, and have the condition only return false after the response has returned, with the setting it to true before asking the question, and setting it to false in the other procedure, right before the return blocks
Interesting. Can you send me a photo of your procedure?
https://imgur.com/a/BXErG7Z
https://imgur.com/a/jH5AqDa
a lot of this is me trying to make it wait until the player answers.
the functioning code is mostly in the if statements
Get rid of custom code snippet, and add a different block
i dont think that that is the problem, i just put that there to make it not throw an error with an empty wait loop.
i need to find a way to get the text dependency while triggering it from the other procedure, and to have the procedure wait until it gets a return value to continue executing