Skip to main content

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

I might be missing something, but how do you detect whether or not the player put in the right answer to a questions? (I.E. when the secret word is apples).

(+1)

You can do this using the "Conditional Branch" event command. I usually suggest to use the "Script" section and check the variable used for registering the input. 

So you'll have:

$gameVariables.value(variable_id).toLowerCase() === "your word all lowercase". 

This way you'll make the check not case sensitive. If you need a case sensitive check remove the "toLowerCase()" function.

I'm still having issues getting what the player writes detected. Could you use the example but show what it would look like with variables placed in it? I'm clueless when it comes to scripting.

I know this is an old comment sorry but i just figured it out! In setting a variable there's a "Script" option and you store the string with quotations in the script line. So if the correct answer is bananas, you'd put "bananas" in the script line and set the correct answer variable to that and then use a conditional branch to see if the word the player types in matches the correct variable you've set.