Technical advice: keeping score.

All about the past, current and future webteases and the art of webteasing in general.
---
Post Reply
User avatar
PoetBird
Explorer At Heart
Explorer At Heart
Posts: 197
Joined: Wed Mar 04, 2020 2:11 pm
Gender: Male
Sexual Orientation: Open to new ideas!

Technical advice: keeping score.

Post by PoetBird »

Hi. I am looking to create a tease that involves keeping track of various variables. Similarly to a personality test, I'd like to give options and keep track of answers. "Mostly As, Mostly Bs" kind of things. Does anyone know how to accomplish this in EOS? My coding skills a very rudimentary but I've taken formal logic classes.
undeniable_denial
Explorer
Explorer
Posts: 96
Joined: Sat Aug 24, 2019 11:42 am
Gender: Male
Location: Germany

Re: Technical advice: keeping score.

Post by undeniable_denial »

I'm not familiar with what you're describing, but a quick googling tells me that it's just counting how many As, Bs, Cs etc you choose and the highest wins?

If that is accurate, then I believe it's enough to just do `a++;` when you press the button with answer A. In the end you would have to figure out which variable holds the highest number. If there aren't too many letters you can do it with a bunch of comparisons. If there are many letters, you might need a sorting algorithm.
User avatar
PlayfulGuy
Explorer At Heart
Explorer At Heart
Posts: 792
Joined: Sat Jul 07, 2012 10:08 pm
Gender: Male
Sexual Orientation: Bisexual/Bi-Curious
I am a: Switch
Dom/me(s): No domme
Sub/Slave(s): No sub
Location: British Columbia, Canada

Re: Technical advice: keeping score.

Post by PlayfulGuy »

I made a quick demo for you. Basic Counting

You can download the JSON to have a look here: Basic Counting JSON

The value of the three variables A, B and C is initialized in the init script (under Options in the tease editor).
Each button increments the counter for the respective variable, then goes to some other page. In this demo they all just go back to the start page.

Good luck!

PG
Post Reply

Who is online

Users browsing this forum: Baidu [Spider], Devluhk and 25 guests