WatchNon-threaded

Forums » Advanced Editor Forum » Read Message

Talk about it. Ask for help on it. Compliment it.

Coding question

one month ago
Okay, so I can code things relating to one variable, ie:

%%GENDER%=%1%I have a raging boner right now!%%GENDER%=%2%My titties are jiggling with excitement!%%

But is it possible to code things relating to 2 separate variables? ie:

IF GENDER = 1
And
SEXUALITY = 37
Then
"I have a raging boner for furry purple fox creatures!"

... Something like that.

Anybody know if it's possible to code that using the whole %% thingy, and how? :p

Coding question

one month ago
I may be wrong, in which case someone will correct me, but I'm pretty sure that you cannot use the %% on-page scripting for more than one variable.

As an alternative, I think something like:

IF GENDER = 1
AND
SEXUALITY = 37
THEN
$PageText := $PageText + "I have a raging boner for furry purple fox creatures!"

Issue with this is that it is harder to get it in the correct spot, as this method works best for adding text at the start/end of a page.


What I'd do personally is have one variable which just acts as an in between, so like:
IF GENDER = 1
THEN IF
SEXUALITY = 37
THEN
SPECIAL = 1

That way, for that specific combo of the two variables, %%SPECIAL%=%1%would give this text%%.
This can be rather tedious if you have many combinations, and it will likely lead to some text duplication for any similarities, which is why trying to split it up might work better instead (depending on what you are exactly trying to do).

%%VAR1%=%1%And so he said,%%%%VAR1%=%2%And so she said,%% %%VAR2%=%1%"Screw you bastard!"%%%%VAR2%=%2%"Screw you bitch!"%%

Altho, in this case, you can take out the duplicate text that will always show and have:
And so %%VAR1%=%1%he%%%%VAR1%=%2%she%% said, "Screw you %%VAR2%=%1%bastard%%%%VAR2%=%2%bitch%%!"


However, both these things might not be good enough, in which case someone else might have a better solution.

Coding question

one month ago
Thanks. All good suggestions. In the end I did go for the $PageText thingy. Was hoping not to use code, 'cos it's been really awkward with me so far... But it seems to be working for this at least. ^_^

Coding question

one month ago
Combine the two is really the best way. Via the page script:

IF %GENDER = 1 THEN %RESULT := 1
IF %GENDER = 2 THEN %RESULT := 2
IF %SEXUALITY = 37 THEN RESULT = %RESULT := %RESULT + 37

[Or something like that, depends on how many combos]

Then on the page:

%%RESULT%=%1%I have a raging boner right now!%%RESULT%=%2%My titties are jiggling with excitement!%%%%RESULT%=%38%I have a raging boner for furry purple fox creatures!%%

Coding question

one month ago
Page script it is ^_^