View Single Post
Old January 12th, 2009 (3:25 PM).
Liquid Shadow's Avatar
Liquid Shadow Liquid Shadow is offline
    Join Date: Mar 2008
    Posts: 224
    I just learned how to make level scripts, and everything is working fine except for one problem I'm running into. You see I set a flag in the beginning of the game to hide a sprite in one of the houses in pallet town. That flag was 112. So the sprite was hidden. Then I went and made a script that when I talk to a man he leads him to his house, and in his house I put a level script where he gives me a Pokemon (celebi). It all works fine, and I get the Celebi and everything. I made it so that the flag I set in the beginning of the game is cleared when I talk to the man, because I want the sprite in the house that he's leading me to to be visible again. So, the sprite is visible again and all works fine. HOWEVER, my problem is that when I go into the house without talking to the old man, as soon as I enter the house, the game freezes... Or at least the character freezes. I've been trying to solve this for like 2 weeks but to no avail... any help?

    Here are my 2 scripts:

    The first one, when the old man leads me to his house (this one works fine)

    #Dynamic 0x802000

    #org @start
    checkflag 0x109
    if b_true goto @done
    message @1
    boxset 5
    compare LASTRESULT 1
    if 1 goto @wierd
    message @letsgo
    boxset 6

    #org @wierd
    message @3
    boxset 6
    setflag 0x109
    applymovement 0x04 @movehouse
    applymovement 0xFF @moveplayer
    waitmovement 0x0
    setdooropened 0xF 0x7
    applymovement 0x04 @11
    applymovement 0xFF @11h
    waitmovement 0x0
    hidesprite 0x04 0x00
    applymovement 0xFF @11h2
    waitmovement 0x0
    setdoorclosed 0xF 0x7
    clearflag 0x112
    warp 0x4 0x2 0x0 0x26C 0x1000

    #org @11
    #RAW 0x11 0xFE

    #org @11h
    #RAW 0x12 0xFE

    #org @11h2
    #RAW 0x11 0xFE

    #org @1
    = Hey, do you want to come\nsee my house?

    #org @movehouse
    #RAW 0x0 0x10 0x10 0x10 0x10 0x12 0x12 0x12 0x12 0x01 0xFE

    #org @moveplayer
    #RAW 0x0 0x10 0x10 0x10 0x10 0x10 0x12 0x12 0x12 0xFE

    #org @letsgo
    = Man, you sure are wierd!

    #org @3
    = Ok, follow me!

    #org @done

    Here is the LEVEL script:

    #dynamic 0x804000

    #org @start
    checkflag 0x112
    if b_true goto @done
    checkflag 0x119
    if b_true goto @done
    movesprite 0x03 0x4 0x7
    applymovement 0x03 @moveinh
    applymovement 0xFF @moveinhp
    waitmovement 0x0
    message @give
    boxset 6
    givepokemon 0x1 0xFB 0x0 0x0 0x0 0x0
    fanfare 0x13E
    message @given
    boxset 6
    message @nickname
    boxset 5
    compare LASTRESULT 1
    if 1 gosub @name
    message @6
    boxset 6
    setflag 0x119
    setvar 0x4033 0x1

    #org @moveinh
    #RAW 0x11 0x11 0x00 0xFE

    #org @moveinhp
    #RAW 0x11 0x11 0xFE

    #org @give
    = Here, take this Pokemon as a\ngift for following me.

    #org @nickname
    = Would you like to rename Celebi?

    #org @name
    call 0x1A74EB

    #org @done

    #org @given
    = \v\h01 Received a Celebi!

    #org @6
    = \c\h01\h06\v\h01 : Thanks!

    #org @moveinh2
    #RAW 0x11 0x13 0xFE

    NOTE: I'm probably 100% sure that the problem isn't with the script, rather with the way I'm setting up the level script. The type of level script I'm using is the one "02 Validates Values, loads handler to 0x0300EB0" And I put the "Flag" as 4033 and the "Value" as 0000. Every time I try to put this same level script using a different type, the game freezes.

    Now, I have two more questions: How do I make a script where if I.. say.. for example push a button, like the one behind the poster in celadon game corner in FR, and when the button is pushed I want a staircase to appear. How would that work?

    How would I make it so each time you enter a map, different wild pokemon appear, like in GSC when you solve the puzzle and each time you solve it more unown appear in the cavern.

    4 truths of life
    1. You cannot touch all your teeth with your tongue.
    2. All idiots, after reading the first truth, will try it.
    3. And discover that the first truth is a lie.
    4. You're smiling now because you're an idiot.