Page 1 of 1

'if not' label [solved]

Posted: Sat Jun 16, 2018 5:12 am
by Project_Astro
Well I was writing my script and something came in mind.
Is it possible to make a label that will run only if it's not already done ?
I know you can do something like this :

Code: Select all

play music "investigation.wav"
label enquêtepart1:
    menu:
        "Investigate" if not inspecter:
            play sound "choice sound.wav"
            $ preuve = True
            jump insp1
        "present" if preuve == True:
            play sound "choice sound.wav"
            $ move2 = True
            jump présenter1
        " Talk":
            play sound "choice sound.wav"
            $ move = True
            jump AndroQ1
        " Move" if move and move2:
            play sound "choice sound.wav"
            $ chi = False
            jump move1
label enquêtepart1_done:
    
label insp1:
$ inspecter = True
hide AndroSerious
with dissolve
But is it possible to make something that would look like this ? :

Code: Select all

label Corpseuh if not I11:
     play sound "choice sound.wav"
     $ I11 = True
h "Alors voilà notre homme..."
show AndySerious at center:
    yalign 0.3
a "Oui."
a "Il s'appelle Joan Feder, {w=0.3}c'est un écrivain."
h "Autre chose sur lui ?"
(I know that the second one doesn't work)
So do we have to make a menu for this ? Or is there an other way to do it ?

Or (I'm getting annoying I know) is it possible to jump to another label when the first is done so we won't have the same text and all ? (because in "Corpseuh" label, the player receives a paper, but it's a screen, so they can click on it anytime they want but I would like them to reveive it once, not twice and so on)

Re: 'if not' label

Posted: Sat Jun 16, 2018 9:20 am
by gas
You can just use a variable to register if the player had seen the label, if he does jump to another.

Code: Select all

default seen =False
label example:
    if seen == True:
        jump elsewhere
    e "Salut!"
    $ seen = True
This example label is executed only the first time, all further times jump instead to "elsewhere"

Re: 'if not' label

Posted: Sat Jun 16, 2018 10:06 am
by Project_Astro
Oh yes, I see ! Thank you very much, I'm gonna try this !

Re: 'if not' label

Posted: Sat Jun 16, 2018 10:30 am
by Project_Astro
Thank you very much as I said. It works perfectly !