Checking many "T/F" variables at once

Hello everyone and good afternoon.

I’m setting up some relationship variables so that players cannot romance every crew member simultaneously in my WIP.

This has a few purposes. But I am unsure how to implement them all smoothly.

*create PolanskiRel False
*create PierceRel False
*create PetersRel False
*create ClarkRel False
*create RipleyRel False
*create VelholmesRel False
*create DelacruseRel False

So these are the variables created for this purpose. One for each romance option.

I know I can do what I need to do by manually typing out *if (insert all crew member variables) for each dialogue choice and excluding the character involved. However, that is both tedious and gives a lot of room for error.

I know it’s possible to assign the crew in general a ‘crew’ variable but I’m not sure that will fit this purpose either since if any of the variables are true, the option to romance another crew member must not be capable of being chosen.

Later on these variables will be used for other scenes as well. For example, it would be a bit strange if random crew member 347 decided to show up in romantic dialogue when they aren’t the chosen RO. Likewise it would be strange for your chosen RO to suddenly dismiss your affections and state you are “with someone else” when you’re with them.

What is the cleanest (C-script) way to do this?

1 Like

Addendum:

Regarding assigning a singular variable for the entire crew; I remember something on the CSW that it can be done to avoid exactly this. Since only one variable is set to “true” I’m not sure if typing out *if (CrewRel = False) will work in this context since one of the crew members (the chosen RO) will have their Rel variable set “true” rather than false should the player decide that is their RO.

You could do something like this:

*create significant_other “Unknown”

And then just
*set significant_other "Insert name here"
whenever the MC romances a particular person. In order to check who they’re romancing, simply use:

*if (significant_other = "Billy")
    Your significant other is Billy.
*elseif (significant_other = "Tommy")
    Your significant other is Tommy.
*else
    Your significant other is not Billy or Tommy.

And so on.

And using this to check if the PC is involved with any RO would be *if (Significant_Other = Unknown) #Option is selectable?

You need to use quotes, but yes.

*choice
    *if (significant_other = "Billy") #This option will only appear if your significant other is Billy.
        Billy loves you!
        *goto date_with_billy
    *if (significant_other = "Tommy") #This option will only appear if your significant other is Tommy.
        Tommy loves you!
        *goto date_with_tommy
    #Requisite option with no *if so quick- and randomtest don't freak out.
        *goto therestofthestory

Okay. So like this?

*if ((significantother = “Joe”) and (Joe >= 70)) #Option display?

If the variable “Joe” is numeric (I’m assuming you’re representing a relationship value), then yes.

3 Likes

Yis. Yis indeed.

This topic was automatically closed 24 hours after the last reply. If you want to reopen your WiP, contact the moderators.