Making a gender drop box to choose the players gender #112
Unanswered
Nightshade2285
asked this question in
Creating games with Squiffy
Replies: 2 comments
-
|
Hmm, and where is your dropboxcode? |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
This is now easy to implement in Squiffy 6. The |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am trying to code a drop box for the player to be able to choose their own gender, but it only ever comes up as "Null" every time I try to run the code.
Code:
Time to choose your gender!
[[Choose]]
[[Choose]]:
Select your gender:
--Choose-- Male Female [[Confirm]] <script> function setGender() { var gender = document.getElementById("genderSelect").value; if (gender) { squiffy.set('gender', gender); squiffy.ui.write("You selected: " + gender); } else { squiffy.ui.write("Please choose a gender."); } } </script>[[Confirm]]:
You chose {genderSelecet} do you wish to proceed?
[[Yes]]
[[No]]
[[Yes]]:
Welcome {playerInput} to The Walking Dead: Bonds of the Undead
The {genderSelect} is supposed to repeat what gender the player has selected, but it only says "Null". I'm also trying to make the part
[[No]] to make it so when it is clicked, it goes back to being able to select the gender againBeta Was this translation helpful? Give feedback.
All reactions