I'm trying to create a tease where players get to choose preferences in the beginning of the tease (e.g. "blonde", "feet", "cbt", etc.). Girls in the tease have these attributes assigned to them.
For example, if a player chooses "cbt" and "blonde", girls with those attributes appear, while others are left out.
I've tried to make it work and have seen it done in other teases, but I can't figure out how to implement this with if and when functions etc.
Any advice on how to achieve this is greatly appreciated!
Thanks!
.brain
Need help with assigning traits to girls in a tease
-
- Explorer
- Posts: 34
- Joined: Mon Feb 20, 2023 8:26 pm
- Gender: Male
- Sexual Orientation: Straight
- I am a: None of the above
Re: Need help with assigning traits to girls in a tease
Hey
Perhaps something like the following would work:
name your pages as:
GirlBlondeCBT
GirlBrunetteCBT
etc....
In the init script, have something like playerPreference = 'BlondeCBT';
replace this with what the player decides as they decide;
The a goto command where you goto a variable named page (not selecting the page): 'Girl' + playerPreference + '*' could work.
I just checked with two pages named girl1 and girl2; and could end up at either, using an eval then goto.
eval: pagetogo = 'girl*';
goto: pagetogo;
I think it'll work with greater concatenation on the pagetogo.
F
Perhaps something like the following would work:
name your pages as:
GirlBlondeCBT
GirlBrunetteCBT
etc....
In the init script, have something like playerPreference = 'BlondeCBT';
replace this with what the player decides as they decide;
The a goto command where you goto a variable named page (not selecting the page): 'Girl' + playerPreference + '*' could work.
I just checked with two pages named girl1 and girl2; and could end up at either, using an eval then goto.
eval: pagetogo = 'girl*';
goto: pagetogo;
I think it'll work with greater concatenation on the pagetogo.
F
-
- Explorer At Heart
- Posts: 265
- Joined: Thu Jan 03, 2013 4:55 pm
- Gender: Male
- Sexual Orientation: Straight
- I am a: Submissive
Re: Need help with assigning traits to girls in a tease
Starting from Faroe answer,
another possibility (I think) is disabling the pages that do not match the criteria. A disabled page cannot be generated at random.
This is all assuming the game works on random pages generation; if not, you may create transition pages where the only actions are checking which of the following "encounters" matches the current options and transitioning to them.
~Thamrill
another possibility (I think) is disabling the pages that do not match the criteria. A disabled page cannot be generated at random.
This is all assuming the game works on random pages generation; if not, you may create transition pages where the only actions are checking which of the following "encounters" matches the current options and transitioning to them.
~Thamrill
Re: Need help with assigning traits to girls in a tease
I have a solution. Create an array for each trait. Example:
var SmallTits = []
var BrownEyes = []
var Stockings = []
Now give each girl a number such as Alina is girl 1, Maria is girl 2, Cindy is girl 3 etc etc. Alina and Maria have small tits, Alina and Cindy have brown eyes and Maria and Cindy are wearing stockings to adding them to the relevant arrays looks like this:
SmallTits = [1,2]
BrownEyes = [1,3]
Stockings = [2,3]
Obviously fill up as many arrays you like with as many girls traits as you like. Create buttons for start of the tease (in this example we use 3 buttons, one for each trait). Selecting the buttons 'Brown eyes' and 'SmallTits' will add all of the girls in the relevant arrays to the total list of girls that will be shown in the tease. Make a total list of girls:
var GirlList = []
use Javascript push method to add BrownEyes array and SmallTits array to GirlList when button is pushed. This will add the girls in those lists to the total GirlList
<PLAYER PUSHES 'BROWN EYES' BUTTON> then make this happen :
GirlList.push.apply(GirlList,BrownEyes)
<PLAYER PUSHES 'SMALL TITS' BUTTON> then make this happen :
GirlList.push.apply(GirlList,SmallTIts)
The array GirlList should now look like this:
GirlList = [1,3,1,2}
Obviously you can use other Javascript functions to eliminate a girl appearing multiple times on the list. I'm afraid you're going to need to study a little Javascript to make that work. Visit the W3Schools page for great examples of Javascript functions.
var SmallTits = []
var BrownEyes = []
var Stockings = []
Now give each girl a number such as Alina is girl 1, Maria is girl 2, Cindy is girl 3 etc etc. Alina and Maria have small tits, Alina and Cindy have brown eyes and Maria and Cindy are wearing stockings to adding them to the relevant arrays looks like this:
SmallTits = [1,2]
BrownEyes = [1,3]
Stockings = [2,3]
Obviously fill up as many arrays you like with as many girls traits as you like. Create buttons for start of the tease (in this example we use 3 buttons, one for each trait). Selecting the buttons 'Brown eyes' and 'SmallTits' will add all of the girls in the relevant arrays to the total list of girls that will be shown in the tease. Make a total list of girls:
var GirlList = []
use Javascript push method to add BrownEyes array and SmallTits array to GirlList when button is pushed. This will add the girls in those lists to the total GirlList
<PLAYER PUSHES 'BROWN EYES' BUTTON> then make this happen :
GirlList.push.apply(GirlList,BrownEyes)
<PLAYER PUSHES 'SMALL TITS' BUTTON> then make this happen :
GirlList.push.apply(GirlList,SmallTIts)
The array GirlList should now look like this:
GirlList = [1,3,1,2}
Obviously you can use other Javascript functions to eliminate a girl appearing multiple times on the list. I'm afraid you're going to need to study a little Javascript to make that work. Visit the W3Schools page for great examples of Javascript functions.
Who is online
Users browsing this forum: Baidu [Spider] and 12 guests