Page 1 of 1

If Statement for DSE isn't working

Posted: Thu Apr 03, 2014 7:15 pm
by Fenrir34
So I've got some of this down, but when Alice meets Ben for example, that means that she hasn't met Chris so if she calls Chris should should say "I don't even know who that is. But instead, even though she hasn't met him she acts like she has but hasn't. Please help

Code: Select all

# This file contains the events that will be part of the game. It's
# expected that the user will add and remove events as appropriate
# for this game.


# Some characters that are used in events in the game.


init:
    define a = Character('Alice', color="#c8ffc8")
    define c = Character('Chris', color="#c8ffc8")
    define b = Character('Ben', color="#c8ffc8")
    

init:
    $ event("beach", "act == 'beach'", event.solo(), priority=200)
    $ event("cafe", "act == 'cafe'", event.solo(), priority=200)
    $ event("study", "act == 'study'", event.solo(), priority=200)
    $ event("face", "act == 'face'", event.solo(), priority=200)
    $ event("ben", "act == 'ben'", event.solo(), priority=200)
    $ event("chris", "act == 'chris'", event.solo(), priority=200)
    
    $ event("chris2", "act == 'chris2'", event.solo(), priority=200)
    $ event("ben2", "act == 'ben2'", event.solo(), priority=200)
    
label beach:
    scene bg beach with dissolve
    "I decided to go to the beach and have some fun."
    $ benpoints += 1
    return 

label cafe:
    scene bg cafe with dissolve
    "I decided to go to the cafe and have some fun."
    $ chrispoints += 2
    return 
    
label study:
    scene bg room with dissolve
    "I didn't have school, but it's always good to keep up my smarts."
    $ intelligence += 10
    $ beauty -= 10
    return
    
label face:
    scene bg room with dissolve
    "I spend time making myself look more attractive."
    $ beauty += 10
    $ intelligence -= 10
    return 
 

label ben2:
    $ metben = False
    scene bg room with dissolve
    "I don't even know who that is."
    return 

label chris2:
    $ metchris = False
    scene bg room with dissolve
    "I don't even know who that is."
    return
    
label chris:
    $ metben = False
    scene bg room with dissolve
    $ chrispoints += 2
    "I call Chris and we have a nice chat."
    return
    
label ben:
    $ benpoints += 2
    "I call Ben and we have a nice chat."
    return
    
# Below here are special events that are triggered when certain
# conditions are true. 

# This is an introduction event, that runs once when we first go
# to class. 

init:
    $ event("introductionb", "act == 'beach'", event.once(), event.only())

label introductionb:
    $ metben = True 
    scene bg beach with dissolve 
    "I head to the beach and it's beautiful."
    "As I walk through the water, I see a boy."
    show ben 
    with dissolve 
    "He looks sad."
    a   "Excuse me, are you alright?"
    "He looks at me surprised."
    b   "Yeah. I'm just a bit down."
    return 


init:
    $ event("introductionc", "act == 'cafe'", event.once(), event.only())

label introductionc:
    $ metchris = True
    scene bg cafe with dissolve 
    "I head to the cafe and see a cute looking boy."
    show chris 
    with dissolve 
    "He smiles and me and I can't help but blush."
    c   "What's your name?"
    a   "A-Alice."
    c   "That's a pretty name."
    return

Also, I did put the code on the script before going to the events page, but it still won't read the even I want. Help greatly appreciated

Re: If Statement for DSE isn't working

Posted: Sat Apr 05, 2014 7:13 pm
by Showsni
You don't have any if statements in the code you posted; are there meant to be some?