Personality quiz script help!

Script

readerMessage Your choices will matter, choose wisely. with messageTitle Personality Quiz!

    NARR
Now, let's find out what type of person you are!

    NARR
What type of pet would you prefer?

choice “A cat.” {

gain catcrazy

} “A dog.” {

gain doglover

}

    NARR
You're at a club and see someones drink get roofied, what do you do?

choice “Step in and save the stranger.” {

gain heroic

} “Walk away, not my problem.” {

gain silent_witness

}

    NARR
You're studying for an important test and a small child asks you to play with them, will you?

choice “I will do both.” {

gain Multi_tasker

} “Play with the child and try study later.” {

gain easy_going

} “Focus on studying.” {

gain determination

}

    NARR
Which do you prefer?

choice “A good riddle or mystery.” {

gain detective

} “A straight forward answer.” {

gain impatient.

}

    NARR
Someone has been annoying you all day, do you?

choice “Lose your cool and get angry.” {

gain hot_headed

} “Calmly tell them they are being disruptive.” {

gain calm

}

    NARR
Please wait while we calculate your results...

@transition fade out black

if (catcrazy) {
#cat crazy
if (heroic) {
#heroic
if (Multi_tasker) {
#Multi-tasker
if (detective) {
#detective
if (hot_headed) {
#hot-headed

#hot-headed
} else {
#calm

#calm
}
#detective
} else {
#impatient
if (hot_headed) {
#hot-headed

#hot-headed
} else {
#calm

#calm
}
#impatient
}
#Multi-tasker
} elif(easy_going) {
#easy-going
if (detective) {
#detective
if (hot_headed) {
#hot-headed

#hot-headed
} else {
#calm

#calm
}
#detective
} else {
#impatient
if (hot_headed) {
#hot-headed

#hot-headed
} else {
#calm

#calm
}
#impatient
}
#easy-going
}
else {
#determination
if (detective) {
#detective
if (hot_headed) {
#hot-headed

#hot-headed
} else {
#calm

#calm
}
#detective
} else {
#impatient
if (hot_headed) {
#hot-headed

#hot-headed
} else {
#calm

#calm
}
#impatient
}
#determination
}
#heroic
} else {
#silent witness
if (Multi_tasker) {
#Multi-tasker
if (detective) {
#detective
if (hot_headed) {
#hot-headed

#hot-headed
} else {
#calm

#calm
}
#detective
} else {
#impatient
if (hot_headed) {
#hot-headed

#hot-headed
} else {
#calm

#calm
}
#impatient
}
#Multi-tasker
} elif(easy_going) {
#easy-going
if (detective) {
#detective
if (hot_headed) {
#hot-headed

#hot-headed
} else {
#calm

#calm
}
#detective
} else {
#impatient
if (hot_headed) {
#hot-headed

#hot-headed
} else {
#calm

#calm
}
#impatient
}
#easy-going
}
else {
#determination
if (detective) {
#detective
if (hot_headed) {
#hot-headed

#hot-headed
} else {
#calm

#calm
}
#detective
} else {
#impatient
if (hot_headed) {
#hot-headed

#hot-headed
} else {
#calm

#calm
}
#impatient
}
#determination
}
#silent witness
}
#cat crazy
} else {
#dog lover
if (heroic) {
#heroic
if (Multi_tasker) {
#Multi-tasker
if (detective) {
#detective
if (hot_headed) {
#hot-headed

#hot-headed
} else {
#calm

#calm
}
#detective
} else {
#impatient
if (hot_headed) {
#hot-headed

#hot-headed
} else {
#calm

#calm
}
#impatient
}
#Multi-tasker
} elif(easy_going) {
#easy-going
if (detective) {
#detective
if (hot_headed) {
#hot-headed

#hot-headed
} else {
#calm

#calm
}
#detective
} else {
#impatient
if (hot_headed) {
#hot-headed

#hot-headed
} else {
#calm

#calm
}
#impatient
}
#easy-going
}
else {
#determination
if (detective) {
#detective
if (hot_headed) {
#hot-headed

#hot-headed
} else {
#calm

#calm
}
#detective
} else {
#impatient
if (hot_headed) {
#hot-headed

#hot-headed
} else {
#calm

#calm
}
#impatient
}
#determination
}
#heroic
} else {
#silent witness
if (Multi_tasker) {
#Multi-tasker
if (detective) {
#detective
if (hot_headed) {
#hot-headed

#hot-headed
} else {
#calm

#calm
}
#detective
} else {
#impatient
if (hot_headed) {
#hot-headed

#hot-headed
} else {
#calm

#calm
}
#impatient
}
#Multi-tasker
} elif(easy_going) {
#easy-going
if (detective) {
#detective
if (hot_headed) {
#hot-headed

#hot-headed
} else {
#calm

#calm
}
#detective
} else {
#impatient
if (hot_headed) {
#hot-headed

#hot-headed
} else {
#calm

#calm
}
#impatient
}
#easy-going
}
else {
#determination
if (detective) {
#detective
if (hot_headed) {
#hot-headed

#hot-headed
} else {
#calm

#calm
}
#detective
} else {
#impatient
if (hot_headed) {
#hot-headed

#hot-headed
} else {
#calm

#calm
}
#impatient
}
#determination
}
#silent witness
}
#dog lover
}

I need help with this script, It’s for my contest entry for the clue contest…
I know the codes for it etc… I’m having trouble seeing what is to what answers…

I put spaces where the outcomes are supposed to go but I can’t tell what the choices are surrounding in.

3 Likes

@Dara.Amarie

1 Like

Lmao, Dara is always the first to be pinged with these types of things. xD
Absolute queen of codes!

hehe yeah xx but if I look at the code I would say it works

1 Like

It’s not that it doesn’t work, I just can’t figure out what gains i’ve used for some of the outcomes… XD Making the outcome spaces tricky for me.

I’d change your questions a bit and instead of using gains use points. So you could have three different personality types and create some characters accordingly so every question would be a “You are in situation X what do you do?” and you would have three answers, each catering to a specific personality type. Then inside the answer branching you add the points and at the end whichever one has the most is the players personality (so don’t do an amount of questions that’s divisible by three so you rule out tied points)

2 Likes

I’m going for super complex scripting and i’m going to use points for character relationships. Plus I find gains simpler.

Moved to Directing Helps and Tips since this is about coding. Make sure to check out our Forum Tutorial for more info about where to correctly create topics, and feel to PM me if there are any questions. :wink:

1 Like

I’ve checked out the forum tutorial many times in the past, it’s just me being naturally stupid and idiotic. xD

1 Like

I’m not sure if it helps you, but maybe using and to check for conditions may reduce the nesting levels and possibly help with readability.

if (catcrazy and heroic and Multi_tasker and detective) {
  if (hot_headed) {
    #catcrazy, heroic, multi-tasker, detective & hot-headed
  } else {
    #catcrazy, heroic, multi-tasker, detective & calm
  }
} elif (catcrazy and heroic and Multi_tasker and impatient) {
  if (hot_headed) {
    #catcrazy, heroic, multi-tasker, impatient & hot-headed
  } else {
    #catcrazy, heroic, multi-tasker, impatient & calm
  }
} 
...

Though, how many different outcomes are you planning to have in total?

From what I can tell, it looks like you are trying to do all 48 possible combinations. If so, it will be very complicated regardless.

On a side note, even if you are planning to use points for character relationships later on, you can:

  1. Create extra spare characters for the purposes of the quiz.
  2. Use the existing characters but reset the points to 0 after you have the outcome of the quiz.

Naturally, this point system wouldn’t be useful if you have as many outcomes as possible options, and using gains would be the way to go.

I tried to do the script you said but it still went to the first outcome?

In the preview’s Story Modifiers > Flags, how many flags do you have that are active?

If you’re testing in the portal, deactivate each flag by clicking on it. In the app itself, you can click Navigation > Reset Story Progress. Then try again.

If you’ve been testing your script over and over, what happens is that you would have gained multiple flags for the different outcomes, so when you play it again, it would always go to the first option since you do have all those flags (gains) from previous playthroughs.

The script checks each condition in the order that is written, so if the first condition passes, it will go to the first outcome. It gets a bit weird once you jump around the script and/or replay it. This is one of the downsides of using gains. :slightly_frowning_face:

1 Like

Well mind my language.CRAP
Is it too late to possibly use points and if so how does one do that?

Are you planning on 48 outcomes? If you are, it’s probably best to stick to gains; using character points wouldn’t simplify things here.

The alternative I can think of that doesn’t require you to reset your progress each time is to use named choices, that way each playthrough would always have the correct values, though your script becomes very verbose, and you have to go back to nesting everything…

Are you having any trouble with resetting the flags? This issue only affects you when you are testing; the readers won’t have any problems.

1 Like

We’ve all been there, no worries. :grin:

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.