ROM Hacking Need a helping hand? You can get help on any ROM Hacking-related problems or questions you have here.

Closed Thread
 
Thread Tools
  #5726    
Old June 16th, 2011 (6:17 PM).
DrFuji's Avatar
DrFuji DrFuji is offline
Heiki Hecchara‌‌
  • Crystal Tier
 
Join Date: Sep 2009
Location: Downia-upside
Age: 24
Gender: Male
Nature: Jolly
Posts: 1,328
Quote:
Originally Posted by Anselection View Post
This is also for Fire Red. I made this script for the first rival battle, and when I go to debug or compile it, XSE closes itself out. I've tried redownloading XSE and it didn't work.

Code:
#dynamic 0x800000
 
#org @start
checkflag 0x1001
if 0x1 goto @done1
lock
applymovement 0x01 @move2
waitmovement 0x0
trainerbattle 0x1 0x001 0x0 @before @after @later
 
#org @later
msgbox @BeforeWalkingAway 0x6
applymovement 0x01 @move3
waitmovement 0x0
hidesprite 0x1
setflag 0x1001
release
end
 
#org @done1
release
end
 
#org @before
=  Well, hey there stranger.\nWhat are you doing around here in\lthe wild? Oh, you are a Pokémon\ltrainer, too? We should battle!\lYeah, come on!
 
#org @after
= Whoa! You're really strong!
 
#org @BeforeWalkingAway
= Whoa, that Pokémon is quite\nthe fighter. My name is [RIVAL]. And\lyou are? … Oh, your name is\l[PLAYER]? Look, I can’t stay long. I\lgotta go beat the gym leader in\lAsidia City if I wanna become\lthe final Elite Four Champion.\lSee ya!
 
#org @move2
#raw 0x62
#raw 0x11
#raw 0x13
#raw 0x13
#raw 0x11
#raw 0x11
#raw 0xFE
 
#org @move3
#raw 0x1E
#raw 0x1E
#raw 0x1E
#raw 0x1F
#raw 0x1F
#raw 0x1F
#raw 0x1F
#raw 0x1F
#raw 0x1F
#raw 0x1F
#raw 0xFE
So, to whoever can fix this: thank you. SO much.
Corrections in red.

Since you want the script to continue after you've had a trainer battle, you need to change the trainerbattle type to 0x1 and add a new address where the script can continue from.

EDIT: Beaten ;_;
__________________

Relevant Advertising!

  #5727    
Old June 16th, 2011 (10:51 PM).
Satoshi Ookami's Avatar
Satoshi Ookami Satoshi Ookami is offline
Memento Mori
  • Gold Tier
 
Join Date: Jul 2008
Location: Abyss of Time, Great Seal
Age: 24
Gender: Male
Nature: Calm
Posts: 14,477
Quote:
Originally Posted by PaulGR View Post
The command disappear 0x1 is not working why?
Disappear command is very buggy... you shouldn't use it.
It's better if you make person disappear by using hidden movement.
__________________
ROM hacking FAQ - Read before asking how to play a hack.

Anime List | PSN Trophy List
  #5728    
Old June 17th, 2011 (8:10 AM).
Whispeon's Avatar
Whispeon Whispeon is offline
Newfound Ghosttype Eeveelution
     
    Join Date: Apr 2010
    Location: In the place near the thing with the people
    Gender: Male
    Nature: Gentle
    Posts: 15
    Can someone please answer my question in the last page? I'm super sorry I'm bugging you all like this, but it hasn't been answered, and it really is a problem.
      #5729    
    Old June 17th, 2011 (1:13 PM). Edited June 17th, 2011 by Spherical Ice.
    Spherical Ice's Avatar
    Spherical Ice Spherical Ice is online now
    • Moderator
    • Silver Tier
     
    Join Date: Nov 2007
    Location: Bristol, UK
    Age: 19
    Posts: 5,180
    I'm afraid you're chances of getting your question answered are low as, I think it's safe to say, Pokéscript is obsolete compared to languages like those present in XSE. Sorry. >:

    I seem to have some trouble with this trigger script.

    XSE, FireRed, Trigger Script
    Spoiler:
    #dynamic 0x800000

    #org @start
    checkflag 0x1205
    if 0x1 goto @end
    lock
    clearflag 0x902
    showsprite 0x7
    showsprite 0x8
    showsprite 0x9
    msgbox @1 0x6
    fadesong 0x14b // Mt Ember, tbr
    applymovement 0xFF @shock
    applymovement 0x7 @grunt1
    applymovement 0x8 @grunt2
    applymovement 0x9 @lilith1
    waitmovement 0x0
    msgbox @2 0x6
    fadescreen 0x1
    msgbox @3 0x4
    closeonkeypress
    setweather 0xD
    fadescreen 0x0
    doweather
    applymovement 0x9 @lshock
    waitmovement 0x0
    msgbox @4 0x6
    fadescreen 0x3
    cry 0xFE 0x0
    waitcry
    spriteface 0xFF 0x3
    spriteface 0x7 0x3
    spriteface 0x8 0x3
    spriteface 0x9 0x3
    fadescreen 0x2
    clearflag 0x901
    showsprite 0x10
    msgbox @5 0x6
    applymovement 0x9 @lilith3
    waitmovement 0x0
    msgbox @6 0x6
    clearflag 0x905

    showsprite 0x11
    hidesprite 0x10
    setflag 0x901
    hidesprite 0x11
    setflag 0x905
    spriteface 0xFF 0x1
    spriteface 0x7 0x2
    spriteface 0x8 0x2
    applymovement 0x9 @movelil
    applymovement 0x7 @movegrunt
    applymovement 0x8 @movegrunt1
    waitmovement 0x0
    hidesprite 0x9
    hidesprite 0x8
    hidesprite 0x7
    setflag 0x902
    fadedefault
    setflag 0x1205
    release
    end

    #org @end
    release
    end

    movements and text removed


    Spoiler:

    ...
    hidesprite 0x10
    setflag 0x901
    hidesprite 0x11
    setflag 0x905
    ...

    Okay, so what's meant to happen in this portion of the script is basically: screen fades to white, Raikou's cry is heard, the player, and events 7, 8 and 9 face left, the screen fades back to normal. Up to here works. Until, when I want Person # 10 and Person ID 901 to appear as it doesn't appear. Afterwards, a message is shown, person nine moves, more text is shown, which all works, until Person # 11 and Person ID 905 appears, followed by the hiding of #10, which also doesn't work. The pause for half a second works, but then, lo and behold, the hiding of #11 doesn't work.

    The second spoiler shows part of the level script which hides #10 and #11 to begin with. The rest of this level script works, so I don't think that's the problem.

    This is really annoying me. Any ideas why it's happening?

    e: Although the rest of the script works, if I exit and re-enter the map, the script executes again, but if I stay in the map and walk over the tile, nothing happens. I have put flags in, so I dunno why that happens either. >:
    __________________

    A Pokemon that is discriminated!
    Support squirtle and make it everyone's favourite.
      #5730    
    Old June 17th, 2011 (2:56 PM).
    DrFuji's Avatar
    DrFuji DrFuji is offline
    Heiki Hecchara‌‌
    • Crystal Tier
     
    Join Date: Sep 2009
    Location: Downia-upside
    Age: 24
    Gender: Male
    Nature: Jolly
    Posts: 1,328
    Quote:
    Originally Posted by Spherical Ice View Post
    I'm afraid you're chances of getting your question answered are low as, I think it's safe to say, Pokéscript is obsolete compared to languages like those present in XSE. Sorry. >:

    I seem to have some trouble with this trigger script.

    XSE, FireRed, Trigger Script
    Spoiler:
    #dynamic 0x800000

    #org @start
    checkflag 0x1205
    if 0x1 goto @end
    lock
    clearflag 0x902
    showsprite 0x7
    showsprite 0x8
    showsprite 0x9
    msgbox @1 0x6
    fadesong 0x14b // Mt Ember, tbr
    applymovement 0xFF @shock
    applymovement 0x7 @grunt1
    applymovement 0x8 @grunt2
    applymovement 0x9 @lilith1
    waitmovement 0x0
    msgbox @2 0x6
    fadescreen 0x1
    msgbox @3 0x4
    closeonkeypress
    setweather 0xD
    fadescreen 0x0
    doweather
    applymovement 0x9 @lshock
    waitmovement 0x0
    msgbox @4 0x6
    fadescreen 0x3
    cry 0xFE 0x0
    waitcry
    spriteface 0xFF 0x3
    spriteface 0x7 0x3
    spriteface 0x8 0x3
    spriteface 0x9 0x3
    fadescreen 0x2
    clearflag 0x901
    showsprite 0x10
    msgbox @5 0x6
    applymovement 0x9 @lilith3
    waitmovement 0x0
    msgbox @6 0x6
    clearflag 0x905
    showsprite 0x11
    hidesprite 0x10
    setflag 0x901
    hidesprite 0x11
    setflag 0x905
    spriteface 0xFF 0x1
    spriteface 0x7 0x2
    spriteface 0x8 0x2
    applymovement 0x9 @movelil
    applymovement 0x7 @movegrunt
    applymovement 0x8 @movegrunt1
    waitmovement 0x0
    hidesprite 0x9
    hidesprite 0x8
    hidesprite 0x7
    setflag 0x902
    fadedefault
    setflag 0x1205
    release
    end

    #org @end
    release
    end

    movements and text removed


    Spoiler:

    ...
    hidesprite 0x10
    setflag 0x901
    hidesprite 0x11
    setflag 0x905
    ...

    Okay, so what's meant to happen in this portion of the script is basically: screen fades to white, Raikou's cry is heard, the player, and events 7, 8 and 9 face left, the screen fades back to normal. Up to here works. Until, when I want Person # 10 and Person ID 901 to appear as it doesn't appear. Afterwards, a message is shown, person nine moves, more text is shown, which all works, until Person # 11 and Person ID 905 appears, followed by the hiding of #10, which also doesn't work. The pause for half a second works, but then, lo and behold, the hiding of #11 doesn't work.

    The second spoiler shows part of the level script which hides #10 and #11 to begin with. The rest of this level script works, so I don't think that's the problem.

    This is really annoying me. Any ideas why it's happening?

    e: Although the rest of the script works, if I exit and re-enter the map, the script executes again, but if I stay in the map and walk over the tile, nothing happens. I have put flags in, so I dunno why that happens either. >:
    FRom what I'm assuming, you're using a sequential order for your person event, so should be using the HEX numbers for people #10 and #11 (0xA and 0xB), that may be why they're not appearing - I do this all the time as well. I'm not sure why the script executes itself again after you reenter the map because you're setting and checking a flag, but hopefully this will help will help with your person problem.
    __________________
      #5731    
    Old June 18th, 2011 (6:04 PM).
    Arcticblast's Avatar
    Arcticblast Arcticblast is offline
       
      Join Date: May 2011
      Gender: Male
      Posts: 43
      This is going to sound like a really dumb question, I know. Bear with me.

      I'm using the newest version of XSE to edit scripts in my Ruby ROM. If I go to "Open Script" in Advance Map and edit from there, how do I save the edited script to the ROM?
        #5732    
      Old June 18th, 2011 (8:15 PM).
      isaiahbob isaiahbob is offline
         
        Join Date: Jun 2011
        Posts: 19
        if i am understanding your question, you just have to press the compile button (the one that looks like two gears)
          #5733    
        Old June 18th, 2011 (8:18 PM).
        DrFuji's Avatar
        DrFuji DrFuji is offline
        Heiki Hecchara‌‌
        • Crystal Tier
         
        Join Date: Sep 2009
        Location: Downia-upside
        Age: 24
        Gender: Male
        Nature: Jolly
        Posts: 1,328
        Quote:
        Originally Posted by Arcticblast View Post
        This is going to sound like a really dumb question, I know. Bear with me.

        I'm using the newest version of XSE to edit scripts in my Ruby ROM. If I go to "Open Script" in Advance Map and edit from there, how do I save the edited script to the ROM?
        You need to compile the script again (The two blue cogs on the top of XSE). This method will be fine if you're making the script shorter/ keeping it the same length, but if you are making it longer would be best to change the offsets in the script so it doesn't overwrite anything.

        EDIT: Beaten ;_;
        __________________
          #5734    
        Old June 18th, 2011 (8:26 PM). Edited June 19th, 2011 by giradialkia.
        isaiahbob isaiahbob is offline
           
          Join Date: Jun 2011
          Posts: 19
          I have an applymovement script that I need help on. It goes like this:
          Spoiler:

          #dynamic 0x71A248

          #org @start
          goto @moved
          release end

          #org @tut
          = WHAT!

          #org @moved
          applymovement 0x1 @?
          pause 0x40
          applymovement 0x1 @turn
          pause 0x30
          applymovement 0x1 @!
          waitmovement 0x1
          applymovement 0x1 @recoil
          message @tut
          boxset 6
          applymovement 0x1 @run
          release
          end

          #org @?
          #raw 0x63
          #raw 0xFE

          #org @turn
          #raw 0x4a
          #raw 0x4c
          #raw 0xFE

          #org @!
          #raw 0x62
          #raw 0xFE

          #org @recoil
          #raw 0x20
          #raw 0x20
          #raw 0xFE

          #org @run
          #raw 0x4d
          #raw 0x20
          #raw 0x20
          #raw 0x20
          #raw 0x20
          #raw 0x20
          #raw 0x20
          #raw 0x20
          #raw 0x20
          #raw 0x20
          #raw 0x20
          #raw 0x20
          #raw 0x20
          #raw 0xFE




          Everything works until after the person talks, then nothing happens. It's like the script stops. It won't go past that point. (I'm trying to make the guy run away after he says @tut.)
            #5735    
          Old June 18th, 2011 (8:52 PM).
          Binary's Avatar
          Binary Binary is offline
          え?
             
            Join Date: Aug 2007
            Age: 22
            Posts: 3,993
            Quote:
            Originally Posted by isaiahbob View Post
            I have an applymovement script that I need help on. It goes like this:

            #dynamic 0x71A248

            #org @start
            goto @moved
            release end

            #org @tut
            = WHAT!

            #org @moved
            applymovement 0x1 @?
            pause 0x40
            applymovement 0x1 @turn
            pause 0x30
            applymovement 0x1 @!
            waitmovement 0x1
            applymovement 0x1 @recoil
            message @tut
            boxset 6
            applymovement 0x1 @run
            release
            end

            #org @?
            #raw 0x63
            #raw 0xFE

            #org @turn
            #raw 0x4a
            #raw 0x4c
            #raw 0xFE

            #org @!
            #raw 0x62
            #raw 0xFE

            #org @recoil
            #raw 0x20
            #raw 0x20
            #raw 0xFE

            #org @run
            #raw 0x4d
            #raw 0x20
            #raw 0x20
            #raw 0x20
            #raw 0x20
            #raw 0x20
            #raw 0x20
            #raw 0x20
            #raw 0x20
            #raw 0x20
            #raw 0x20
            #raw 0x20
            #raw 0x20
            #raw 0xFE




            Everything works until after the person talks, then nothing happens. It's like the script stops. It won't go past that point. (I'm trying to make the guy run away after he says @tut.)

            Code:
            #dynamic 0x71A248
            
            #org @start
            goto @moved   'I'd recommend just putting the movements here, but eh.. your choice.
            release 
            end
            
            #org @tut
            = WHAT!
            
            #org @moved
            applymovement 0x1 @?
            pause 0x40
            applymovement 0x1 @turn
            pause 0x30
            applymovement 0x1 @!
            waitmovement 0x1
            applymovement 0x1 @recoil
            waitmovement 0x0
            message @tut    'shouldn't it be message @tut 0x6 or something? :/
            boxset 6
            applymovement 0x1 @run
            waitmovement 0x0
            release
            end
            
            #org @?
            #raw 0x63
            #raw 0xFE
            
            #org @turn
            #raw 0x4a
            #raw 0x4c
            #raw 0xFE
            
            #org @!
            #raw 0x62
            #raw 0xFE
            
            #org @recoil
            #raw 0x20
            #raw 0x20
            #raw 0xFE
            
            #org @run
            #raw 0x4d
            #raw 0x20
            #raw 0x20
            #raw 0x20
            #raw 0x20
            #raw 0x20
            #raw 0x20
            #raw 0x20
            #raw 0x20
            #raw 0x20
            #raw 0x20
            #raw 0x20
            #raw 0x20
            #raw 0xFE
            I'd recommend just using waitmovement 0x0, but as long as you're using the commands correctly, you're fine.
            __________________
              #5736    
            Old June 18th, 2011 (9:21 PM). Edited June 18th, 2011 by isaiahbob.
            isaiahbob isaiahbob is offline
               
              Join Date: Jun 2011
              Posts: 19
              IT WORKS NOW!

              Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you.
                #5737    
              Old June 18th, 2011 (11:44 PM).
              Satoshi Ookami's Avatar
              Satoshi Ookami Satoshi Ookami is offline
              Memento Mori
              • Gold Tier
               
              Join Date: Jul 2008
              Location: Abyss of Time, Great Seal
              Age: 24
              Gender: Male
              Nature: Calm
              Posts: 14,477
              Quote:
              Originally Posted by DrFuji View Post
              EDIT: Beaten ;_;
              I read that very often from you :D

              isaiahbob: Binary pretty much explained everything but I'd add this: don't use boxset I think it's pokescript command so use the msgbox command in a way Binary showed you =)
              __________________
              ROM hacking FAQ - Read before asking how to play a hack.

              Anime List | PSN Trophy List
                #5738    
              Old June 19th, 2011 (11:21 AM).
              SOOZ SOOZ is offline
                 
                Join Date: Jun 2011
                Posts: 4
                Hi, I have a problem with my wildbattle script. The pokemon doesn't disappeared after the fight, i don't know what to do...

                Here is my script:

                '---------------
                #org 0xE3CF70
                lockall
                checksound
                cry 0x97 0x2
                pause 0x28
                waitcry
                setwildbattle 0x97 0xA 0x0
                setflag 0x8C1
                special 0x13A
                waitstate
                clearflag 0x8C1
                special2 0x800D 0xB7
                compare 0x800D 0x1
                if 0x1 goto 0x8E3D0B0
                compare 0x800D 0x4
                if 0x1 goto 0x8E3D180
                compare 0x800D 0x5
                if 0x1 goto 0x8E3D180
                setflag 0x1C0
                releaseall
                end

                '---------------
                #org 0xE3D0B0
                setflag 0x1C0
                goto 0x8E3D290

                '---------------
                #org 0xE3D180
                setvar 0x8004 0x97
                goto 0x8E3D3D0

                '---------------
                #org 0xE3D290
                fadescreen3 0x1
                hidesprite 0x800F
                fadescreen3 0x0
                releaseall
                end

                '---------------
                #org 0xE3D3D0
                fadescreen3 0x1
                hidesprite 0x800F
                fadescreen3 0x0
                bufferpokemon 0x0 0x8004
                msgbox 0x8E3D630 0x4 '"Le MEW s'est enfui!"
                releaseall
                end


                '---------
                ' Strings
                '---------
                #org 0xE3D630
                = Le MEW s'est enfui!



                Can you tell me what is wrong with it please?
                EDIT: I used the Rayquaza's wildbattle script to help me...
                  #5739    
                Old June 19th, 2011 (11:25 AM).
                M.L M.L is offline
                Invisible
                   
                  Join Date: Oct 2010
                  Gender: Male
                  Nature: Quiet
                  Posts: 765
                  i just wana ask have you put the setflag in the person id in A-Map?
                  __________________
                  Fluffy
                    #5740    
                  Old June 19th, 2011 (11:39 AM).
                  SOOZ SOOZ is offline
                     
                    Join Date: Jun 2011
                    Posts: 4
                    Quote:
                    Originally Posted by M.L View Post
                    i just wana ask have you put the setflag in the person id in A-Map?
                    Yes i read that but I don't know what flag I have to choose. Some are already used, aren't they? and do I have to translate them in Hex?

                    Sorry but I just begin to script :s
                      #5741    
                    Old June 19th, 2011 (11:26 PM).
                    Satoshi Ookami's Avatar
                    Satoshi Ookami Satoshi Ookami is offline
                    Memento Mori
                    • Gold Tier
                     
                    Join Date: Jul 2008
                    Location: Abyss of Time, Great Seal
                    Age: 24
                    Gender: Male
                    Nature: Calm
                    Posts: 14,477
                    Quote:
                    Originally Posted by SOOZ View Post
                    Yes i read that but I don't know what flag I have to choose. Some are already used, aren't they? and do I have to translate them in Hex?

                    Sorry but I just begin to script :s
                    You set this flag didn't you? "setflag 0x8C1"
                    Then that should be the one you want to put =)
                    If it's not flag that activates something =)
                    __________________
                    ROM hacking FAQ - Read before asking how to play a hack.

                    Anime List | PSN Trophy List
                      #5742    
                    Old June 20th, 2011 (2:02 AM).
                    DANKENNEH03's Avatar
                    DANKENNEH03 DANKENNEH03 is offline
                    Sapphire Editor
                       
                      Join Date: Jun 2011
                      Location: UK
                      Gender: Male
                      Posts: 3
                      Game: Ruby

                      I'm fairly new to this whole scripting business.

                      I'm trying to make a script where you would walk over it and a earthquake will happen with a sound, and shortly after that a msgbox will appear then closeonkeypress, then everything goes back to normal. (after the one time it wont happen again).

                      Unfortunately my script is not working, in fact it stops working on the 2nd line at "lockall".
                      But when I get rid of "lockall" the earthquake works, the sound goes on forever, the msgbox never appears and this will happen every time you walk over it.

                      Help Please.

                      Script,
                      Spoiler:
                      '-----------------------
                      #org 0x24019A
                      lockall
                      goto 0x8240387
                      end

                      '-----------------------
                      #org 0x240387
                      sound 0x31
                      setvar 0x8007 0xF
                      special 0x131
                      waitstate
                      pause 0x28
                      msgbox 0x83050AA '"It sounds as if something hit the/l..."
                      closeonkeypress
                      releaseall
                      end


                      '---------
                      ' Strings
                      '---------
                      #org 0x3050AA
                      = It sounds as if something hit the/lplanet not far from here.
                        #5743    
                      Old June 20th, 2011 (2:35 AM).
                      DrFuji's Avatar
                      DrFuji DrFuji is offline
                      Heiki Hecchara‌‌
                      • Crystal Tier
                       
                      Join Date: Sep 2009
                      Location: Downia-upside
                      Age: 24
                      Gender: Male
                      Nature: Jolly
                      Posts: 1,328
                      Quote:
                      Originally Posted by DANKENNEH03 View Post
                      Game: Ruby

                      I'm fairly new to this whole scripting business.

                      I'm trying to make a script where you would walk over it and a earthquake will happen with a sound, and shortly after that a msgbox will appear then closeonkeypress, then everything goes back to normal. (after the one time it wont happen again).

                      Unfortunately my script is not working, in fact it stops working on the 2nd line at "lockall".
                      But when I get rid of "lockall" the earthquake works, the sound goes on forever, the msgbox never appears and this will happen every time you walk over it.

                      Help Please.

                      Script,
                      Spoiler:
                      '-----------------------
                      #org 0x24019A
                      lockall
                      goto 0x8240387
                      end

                      '-----------------------
                      #org 0x240387
                      sound 0x31
                      setvar 0x8007 0xF
                      special 0x131
                      waitstate
                      pause 0x28
                      msgbox 0x83050AA '"It sounds as if something hit the/l..."
                      closeonkeypress
                      releaseall
                      end


                      '---------
                      ' Strings
                      '---------
                      #org 0x3050AA
                      = It sounds as if something hit the/lplanet not far from here.
                      Corrections in red.

                      Code:
                      #org @start
                      lockall
                      checkflag 0x200
                      if 0x1 goto @Continue
                      releaseall
                      end
                       
                      #org @Continue
                      sound 0x31
                      setvar 0x8004 0xF
                      setvar 0x8005 0xF
                      setvar 0x8006 0xF
                      setvar 0x8007 0xF
                      special 0x131
                      waitstate
                      pause 0x28
                      msgbox @Collide 0x4
                      closeonkeypress
                      setflag 0x200
                      releaseall
                      end
                       
                      #org @Collide
                      = It sounds as if something hit the/lplanet not far from here.
                      I have no idea why you have the command 'goto' when you aren't checking a flag/ variable beforehand - You might as well have just put the entire script in a huge block. I put in the 'setflag' command so that this script won't repeat each time you step on it.

                      The timing and magnitude of earthquakes are based on four variable values, rather than just the one you had originally. This might be why your earthquake was going on forever.
                      __________________
                        #5744    
                      Old June 20th, 2011 (3:04 AM).
                      DANKENNEH03's Avatar
                      DANKENNEH03 DANKENNEH03 is offline
                      Sapphire Editor
                         
                        Join Date: Jun 2011
                        Location: UK
                        Gender: Male
                        Posts: 3
                        Quote:
                        Originally Posted by DrFuji View Post
                        Corrections in red.

                        Code:
                        #org @start
                        lockall
                        checkflag 0x200
                        if 0x1 goto @Continue
                        releaseall
                        end
                         
                        #org @Continue
                        sound 0x31
                        setvar 0x8004 0xF
                        setvar 0x8005 0xF
                        setvar 0x8006 0xF
                        setvar 0x8007 0xF
                        special 0x131
                        waitstate
                        pause 0x28
                        msgbox @Collide 0x4
                        closeonkeypress
                        setflag 0x200
                        releaseall
                        end
                         
                        #org @Collide
                        = It sounds as if something hit the/lplanet not far from here.
                        I have no idea why you have the command 'goto' when you aren't checking a flag/ variable beforehand - You might as well have just put the entire script in a huge block. I put in the 'setflag' command so that this script won't repeat each time you step on it.

                        The timing and magnitude of earthquakes are based on four variable values, rather than just the one you had originally. This might be why your earthquake was going on forever.



                        Thank-you for your help and time.

                        I have tried the modified script you had wrote and the problem of the lock has gone.
                        But there is still a problem, When I place the script down on the floor and walk over it, nothing happens.
                        I don't freeze over it, I just walk over it as if nothing was there in the first place.

                        Thanks for your time.
                          #5745    
                        Old June 20th, 2011 (3:11 AM).
                        DrFuji's Avatar
                        DrFuji DrFuji is offline
                        Heiki Hecchara‌‌
                        • Crystal Tier
                         
                        Join Date: Sep 2009
                        Location: Downia-upside
                        Age: 24
                        Gender: Male
                        Nature: Jolly
                        Posts: 1,328
                        Quote:
                        Originally Posted by DANKENNEH03 View Post
                        Thank-you for your help and time.

                        I have tried the modified script you had wrote and the problem of the lock has gone.
                        But there is still a problem, When I place the script down on the floor and walk over it, nothing happens.
                        I don't freeze over it, I just walk over it as if nothing was there in the first place.

                        Thanks for your time.
                        Oh sorry, I'm afraid I messed up a bit when writing that. Instead of continuing if you had not set the flag, it was only continuing if you had.

                        At the beginning it should be:
                        ...
                        checkflag 0x200
                        if 0x0 goto @Continue
                        ...

                        Once again, sorry for being a bit careless.
                        __________________
                          #5746    
                        Old June 20th, 2011 (3:40 AM).
                        DANKENNEH03's Avatar
                        DANKENNEH03 DANKENNEH03 is offline
                        Sapphire Editor
                           
                          Join Date: Jun 2011
                          Location: UK
                          Gender: Male
                          Posts: 3
                          Quote:
                          Originally Posted by DrFuji View Post
                          Oh sorry, I'm afraid I messed up a bit when writing that. Instead of continuing if you had not set the flag, it was only continuing if you had.

                          At the beginning it should be:
                          ...
                          checkflag 0x200
                          if 0x0 goto @Continue
                          ...

                          Once again, sorry for being a bit careless.



                          Thanks again, and it's no problem as long I get the help I need.

                          But again unfortunately there is still a problem. I got a feeling I am doing something wrong because when I walk over this script it does one of two things, it will either get stuck on lock and freeze the player, or the player will just walk over it with nothing happen.

                          Sorry for being such a fuss.

                          Thanks again.
                            #5747    
                          Old June 20th, 2011 (5:54 AM).
                          SOOZ SOOZ is offline
                             
                            Join Date: Jun 2011
                            Posts: 4
                            Quote:
                            Originally Posted by Ash493 View Post
                            You set this flag didn't you? "setflag 0x8C1"
                            Then that should be the one you want to put =)
                            If it's not flag that activates something =)
                            I have done what you told me, but now, the pokemon disappeared until I come in and come out of a house. It comes back! How can I make it disappeared FOR EVER? :'(

                            Thank you for helping me
                              #5748    
                            Old June 20th, 2011 (4:27 PM).
                            destinedjagold's Avatar
                            destinedjagold destinedjagold is offline
                            Oh Hai Thar~
                            • Silver Tier
                             
                            Join Date: May 2007
                            Location: Philippines
                            Age: 26
                            Gender: Male
                            Nature: Careful
                            Posts: 8,507
                            Quote:
                            Originally Posted by SOOZ View Post
                            I have done what you told me, but now, the pokemon disappeared until I come in and come out of a house. It comes back! How can I make it disappeared FOR EVER? :'(

                            Thank you for helping me

                            Write the flag in the Person ID box.
                            __________________


                            FC: 0061-1111-6462
                            TSV: 1364(X), 0790(OR)

                              #5749    
                            Old June 21st, 2011 (7:03 AM).
                            Winter Wonderland's Avatar
                            Winter Wonderland Winter Wonderland is offline
                            Puts the fun in dysfunctional
                               
                              Join Date: Jun 2011
                              Location: Florida
                              Gender: Other
                              Nature: Quirky
                              Posts: 307
                              Okay, so I'm trying to make this sprite disappear after a battle. It works, up until I decide to take a step anywhere, then it reappears. It's on Fire Red. Here's the script, can anyone tell me what's wrong with it?

                              Code:
                              #dynamic 0x800000
                               
                              #org @start
                              checkflag 0x829
                              if 0x0 goto @done
                              checkflag 0x1000
                              if 0x1 goto @done
                              applymovement 0x03 @move1
                              waitmovement 0x0
                              trainerbattle 0x1 0x1AA 0x0 @before @after @later
                              end
                               
                              #org @before
                              = Hey, [PLAYER]! We never tested out our\nPokemon! We should battle, like\lright now!
                               
                              #org @after
                              = Damn! Your Pokemon is pretty good!
                               
                              #org @later
                              msgbox @3 0x6
                              giveitem 0x4 0x05 MSG_OBTAIN
                              closeonkeypress
                              applymovement 0x03 @move2
                              waitmovement 0x0
                              hidesprite 0x03
                              setflag 0x1000
                              release
                              end
                               
                              #org @done
                              release
                              end
                               
                              #org @3
                              = Wow! Your Totodile is pretty\nstrong! You know, there's a gym in\lSky Slate City. Why don't you go\lcheck it out? Also, you should\ltake these. It will help you fill\lout the PokeDex. I'll see you\llater, friend!
                               
                              #org @4
                              = You received the PokeBalls!
                               
                              #org @move1
                              #raw 0x12
                              #raw 0x12
                              #raw 0x12
                              #raw 0x11
                              #raw 0x11
                              #raw 0xFE
                               
                              #org @move2
                              #raw 0x10
                              #raw 0x10
                              #raw 0x10
                              #raw 0x13
                              #raw 0x13
                              #raw 0x13
                              #raw 0x13
                              #raw 0x13
                              #raw 0x10
                              #raw 0x10
                              #raw 0x10
                              #raw 0xFE
                              __________________


                              Some say the world will end in fire,
                              Some say in ice.
                              From what I've tasted of desire
                              I hold with those who favor fire.
                              But if it had to perish twice,
                              I think I know enough of hate
                              To say that for destruction ice
                              Is also great
                              And would suffice.
                              Robert Frost, Fire and Ice.

                              Play Me Casually | The Leola Project

                                #5750    
                              Old June 21st, 2011 (7:08 AM).
                              The Void's Avatar
                              The Void The Void is offline
                              hiiiii
                                 
                                Join Date: May 2010
                                Location: MOTHA RUSSIA
                                Gender: Male
                                Nature: Calm
                                Posts: 1,416
                                Quote:
                                Originally Posted by Winter Wonderland View Post
                                Okay, so I'm trying to make this sprite disappear after a battle. It works, up until I decide to take a step anywhere, then it reappears. It's on Fire Red. Here's the script, can anyone tell me what's wrong with it?

                                Code:
                                #dynamic 0x800000
                                 
                                #org @start
                                checkflag 0x829
                                if 0x0 goto @done
                                checkflag 0x1000
                                if 0x1 goto @done
                                applymovement 0x03 @move1
                                waitmovement 0x0
                                trainerbattle 0x1 0x1AA 0x0 @before @after @later
                                end
                                 
                                #org @before
                                = Hey, [PLAYER]! We never tested out our\nPokemon! We should battle, like\lright now!
                                 
                                #org @after
                                = Damn! Your Pokemon is pretty good!
                                 
                                #org @later
                                msgbox @3 0x6
                                giveitem 0x4 0x05 MSG_OBTAIN
                                closeonkeypress
                                applymovement 0x03 @move2
                                waitmovement 0x0
                                hidesprite 0x03
                                setflag 0x1000
                                release
                                end
                                 
                                #org @done
                                release
                                end
                                 
                                #org @3
                                = Wow! Your Totodile is pretty\nstrong! You know, there's a gym in\lSky Slate City. Why don't you go\lcheck it out? Also, you should\ltake these. It will help you fill\lout the PokeDex. I'll see you\llater, friend!
                                 
                                #org @4
                                = You received the PokeBalls!
                                 
                                #org @move1
                                #raw 0x12
                                #raw 0x12
                                #raw 0x12
                                #raw 0x11
                                #raw 0x11
                                #raw 0xFE
                                 
                                #org @move2
                                #raw 0x10
                                #raw 0x10
                                #raw 0x10
                                #raw 0x13
                                #raw 0x13
                                #raw 0x13
                                #raw 0x13
                                #raw 0x13
                                #raw 0x10
                                #raw 0x10
                                #raw 0x10
                                #raw 0xFE
                                Are you using XSE? I'm not familiar with those codes...

                                I usually use applymovement, pauseevent, fadedefault, disappear and setflag
                                codes...
                                __________________
                                Όφις ην μη φάγη όφιν, δράκων ου γενήσεται.
                                Closed Thread
                                Quick Reply

                                Sponsored Links
                                Thread Tools

                                Posting Rules
                                You may not post new threads
                                You may not post replies
                                You may not post attachments
                                You may not edit your posts

                                BB code is On
                                Smilies are On
                                [IMG] code is On
                                HTML code is Off

                                Forum Jump


                                All times are GMT -8. The time now is 12:52 PM.