letting the player choose there own name?

boxedino
29 Aug 2018, 02:30

I'm very new to squiffy and I want to know if and how I can let the player choose his/her own name I couldn't find how to do this anywhere


Belén
29 Aug 2018, 08:31

Use html+js. A combination of input/text and js to set the catch into squiffy variables. It works for me.


Padrinos
06 Sept 2018, 14:35

This is what I used for name input.

[[Enjoy]]

[[Enjoy]]:
First off, tell me your character’s name please?
Type your name here
<textarea id="text_first"></textarea><br>
[[Continue:]](cname)

[[cname]]:
        squiffy.set("textline", jQuery("#text_first").val());
Welcome {textline}, enjoy the game.<br>