Tools, Tutorials & Resources Various tools to help you develop your hacks can be found here.

TrollandToad.com
Reply
 
Thread Tools
  #51    
Old July 4th, 2011 (8:54 AM).
colcolstyles's Avatar
colcolstyles colcolstyles is offline
Yours truly
  • Crystal Tier
 
Join Date: May 2008
Location: The Bay Area
Gender: Male
Nature: Lonely
Posts: 1,590
Quote:
Originally Posted by [I]-Hac*ker. View Post
Thanks for replying! But it didn't change anything, the first script works great, but the second freezes. The music & other sprites continue on playing and moving, only the player freezes, I can't move :S

I appreciate the help, though =)(
Wait, why do you have a branching segment at the beginning of your level script? The thing with having multiple type 2 level scripts is that the game will automatically compare your variable ('0x7000') for you and branch to the correct script. Something else to note: if you set '0x7000' to 1 right after the first level script, it will trigger the second level script immediately after the first one finishes.

Anyway, I just tested it out and it worked so if there's a problem, you're doing something else wrong. I'm afraid I can't help you with that.
__________________

Brother of Vrai
Reply With Quote

Relevant Advertising!

  #52    
Old July 4th, 2011 (9:56 AM).
[I]-Hac*ker.'s Avatar
[I]-Hac*ker. [I]-Hac*ker. is offline
Touko Fan <3
     
    Join Date: Jun 2011
    Location: The Netherlands
    Age: 21
    Gender: Male
    Posts: 36
    Quote:
    Originally Posted by colcolstyles View Post
    Wait, why do you have a branching segment at the beginning of your level script? The thing with having multiple type 2 level scripts is that the game will automatically compare your variable ('0x7000') for you and branch to the correct script. Something else to note: if you set '0x7000' to 1 right after the first level script, it will trigger the second level script immediately after the first one finishes.

    Anyway, I just tested it out and it worked so if there's a problem, you're doing something else wrong. I'm afraid I can't help you with that.
    1. Why I did that I don't know actually, 'cause I know it checks that itself...

    2. I know it will trigger the second one right after that, I want that to happen actually.

    3. I think I know what's wrong... I just messed something up with another script... I think I know how to fix it, damn I hope so....
    __________________





    Quote:
    Originally Posted by [I]-Hac*ker.
    You know you're a computer nerd, when at a certain point in real life, you've actually thought: "Damn, I screwed up, where's CTRL + Z?"...
    Reply With Quote
      #53    
    Old July 4th, 2011 (10:14 AM).
    colcolstyles's Avatar
    colcolstyles colcolstyles is offline
    Yours truly
    • Crystal Tier
     
    Join Date: May 2008
    Location: The Bay Area
    Gender: Male
    Nature: Lonely
    Posts: 1,590
    If you want the second one to start right after the first, why not just combine the two into one?
    __________________

    Brother of Vrai
    Reply With Quote
      #54    
    Old November 9th, 2011 (9:00 PM). Edited November 10th, 2011 by Nate VonGrimm.
    Nate VonGrimm's Avatar
    Nate VonGrimm Nate VonGrimm is offline
       
      Join Date: Oct 2011
      Location: Uxbridge
      Age: 25
      Gender: Male
      Nature: Relaxed
      Posts: 124
      I'm having a problem with my script.
      Every I try to use it as a level script, I don't get the results I should see in XSE when pasting the maps offset script into it.
      This is the script that I'm trying to use:
      #org $testmovementscript
      lock
      message $whereami
      boxset 6
      applymovement 0xFF $huh
      pausemove 0x0
      message $whatisthat
      boxset 6
      applymovement 0xFF $runup
      pause 0x30
      setvar 0x5000 0x0001
      release
      end

      #org $whereami
      $whereami =Where am I?

      #org $huh
      #raw 0x56
      #raw 0xFE

      #org $whatisthat
      $whatisthat =What is that?

      #org $runup
      #raw 0x36
      #raw 0xFE

      (I'm using Pokescript)

      When I decompile the map offset in XSE (Level Script toggled), this is what I get:

      '---------------
      #org 0x6B20
      #raw 0x0

      I have repeated all the steps over and over again but still end up with this result and my game crashing every time.
      I have removed all maps scripts so this is the only one on it.
      Any help would be gratefully appreciated!

      -------------------------------------------------------------------------------------------------------------------------------------------------------------
      EDIT:
      I figured out what my problem was, When copying the map script offset, I was copying the double '00' at the beginning of the offset.
      Level scripts works perfectly now. Thank you for a great tut!
      Reply With Quote
        #55    
      Old November 15th, 2012 (9:30 PM).
      阴魂君's Avatar
      阴魂君 阴魂君 is offline
      _(:зゝ∠)_ so busy i am…
         
        Join Date: Nov 2012
        Location: China
        Age: 21
        Gender: Male
        Nature: Brave
        Posts: 22
        Thank a lot ,but I have a question to ask you.I want the level sprite to go work when I go to a town every time,(for example,I want the weather changes at random every time I come to a town),so how to write the sprite?
        Reply With Quote
          #56    
        Old November 16th, 2012 (10:56 AM).
        itman itman is offline
        Back to ROM hacking. :D
           
          Join Date: May 2007
          Age: 23
          Nature: Adamant
          Posts: 100
          Quote:
          Originally Posted by 阴魂君 View Post
          Thank a lot ,but I have a question to ask you.I want the level sprite to go work when I go to a town every time,(for example,I want the weather changes at random every time I come to a town),so how to write the sprite?
          Lol, Cooley isn't around anymore...:/

          But it sounds to me that you just want the level script to repeat itself everytime, which is simple.
          Don't use a setvar (or you can if you need to remember).
          But in that case, (we'll use 0x5000 as an example), I'd setvar 0x5000 0x0.
          THEN, when I put in the Flag and Value, I'd put Flag: 5000, Value: 0000.

          If the value is set to zero, then the level script will always repeat itself because that variable will always be zero (unless you use an addvar command, it'll stay 0).
          Reply With Quote
            #57    
          Old November 16th, 2012 (5:42 PM).
          阴魂君's Avatar
          阴魂君 阴魂君 is offline
          _(:зゝ∠)_ so busy i am…
             
            Join Date: Nov 2012
            Location: China
            Age: 21
            Gender: Male
            Nature: Brave
            Posts: 22
            Quote:
            Originally Posted by itman View Post
            Lol, Cooley isn't around anymore...:/

            But it sounds to me that you just want the level script to repeat itself everytime, which is simple.
            Don't use a setvar (or you can if you need to remember).
            But in that case, (we'll use 0x5000 as an example), I'd setvar 0x5000 0x0.
            THEN, when I put in the Flag and Value, I'd put Flag: 5000, Value: 0000.

            If the value is set to zero, then the level script will always repeat itself because that variable will always be zero (unless you use an addvar command, it'll stay 0).
            Thanks a lot (>_<)ノシI'm going to set some spirits about changing weather and weather forecast...
            Reply With Quote
              #58    
            Old November 26th, 2012 (12:23 PM).
            bluedeedrocks's Avatar
            bluedeedrocks bluedeedrocks is offline
            Professional Coolguy
               
              Join Date: Jun 2009
              Location: Pennsylvania, United States
              Gender: Male
              Nature: Relaxed
              Posts: 39
              How can I create a levelscript that will run every time you enter a room until a certain flag is set?
              __________________
              A little linearity never hurt anyone. I feel like I need a little something keeping me in line!



              Reply With Quote
                #59    
              Old November 28th, 2012 (6:29 AM).
              cooley's Avatar
              cooley cooley is offline
              ///Keepin' it simple
              • Silver Tier
               
              Join Date: Feb 2007
              Location: United States
              Age: 22
              Gender: Male
              Nature: Impish
              Posts: 1,150
              Quote:
              Originally Posted by bluedeedrocks View Post
              How can I create a levelscript that will run every time you enter a room until a certain flag is set?
              Follow everything after this part on my first page post:

              "Make a level script inactive until a certain event happens"
              ...
              ...
              ...
              __________________

              Reply With Quote
                #60    
              Old February 3rd, 2013 (8:54 AM).
              xutrik xutrik is offline
                 
                Join Date: Feb 2013
                Gender: Male
                Posts: 4
                why is to hard for mee anyone can help me PM
                Reply With Quote
                  #61    
                Old June 1st, 2014 (3:14 AM).
                pokemaniaco pokemaniaco is offline
                   
                  Join Date: Jun 2006
                  Gender:
                  Nature: Adamant
                  Posts: 30
                  I'm so sorry if I shouldn't ask in this thread... but here it goes...

                  My level script only works with the applymovement.The msgbox doesn't open. What's wrong? Thanks in advance ;)

                  #org 0x8C523B
                  applymovement MOVE_PLAYER 0x88C8F2B
                  waitmovement 0xFF
                  msgbox 0x89C14B0 '"Hello! I'm PROF. IVY!\nThis is a te..."
                  setvar 0x4033 0x1
                  release
                  end

                  '-----------
                  ' Movements
                  '-----------
                  #org 0x8C8F2B
                  #raw 9 'Step Up (Normal)
                  #raw 9 'Step Up (Normal)
                  #raw 9 'Step Up (Normal)
                  #raw 9 'Step Up (Normal)
                  #raw 9 'Step Up (Normal)
                  #raw 9 'Step Up (Normal)
                  #raw 9 'Step Up (Normal)
                  #raw FE 'End of Movements


                  '---------
                  ' Strings
                  '---------
                  #org 0x9C14B0
                  = Hello! I'm PROF. IVY!\nThis is a test to see if it all\lworks!
                  Reply With Quote
                    #62    
                  Old June 1st, 2014 (3:45 AM).
                  Spherical Ice's Avatar
                  Spherical Ice Spherical Ice is offline
                  • Crystal Tier
                   
                  Join Date: Nov 2007
                  Location: Bristol, UK
                  Age: 19
                  Posts: 5,226
                  Code:
                  #dynamic 0x800000
                  
                  #org @start
                  applymovement MOVE_PLAYER @move1
                  waitmovement 0x0
                  msgbox @string1 0x6 '"Hello! I'm PROF. IVY!\nThis is a te..."
                  setvar 0x4033 0x1
                  release
                  end
                  
                  '-----------
                  ' Movements
                  '-----------
                  #org @move1
                  #raw 0x9 'Step Up (Normal)
                  #raw 0x9 'Step Up (Normal)
                  #raw 0x9 'Step Up (Normal)
                  #raw 0x9 'Step Up (Normal)
                  #raw 0x9 'Step Up (Normal)
                  #raw 0x9 'Step Up (Normal)
                  #raw 0x9 'Step Up (Normal)
                  #raw 0xFE 'End of Movements
                  
                  
                  '---------
                  ' Strings
                  '---------
                  #org @string1
                  = Hello! I'm PROF. IVY!\nThis is a test to see if it all\lworks!
                  The above is a refactored version of your script with a few adjustments that should make it work fine. First, I changed waitmovement 0x0 to waitmovement 0xFF. While it wasn't wrong, in general it's better (and quicker) to to keep the parameter as 0x0. I've also prefaced each of the movement #raws with 0x so that XSE recognises it's in hexadecimal. The main problem I could see was your script, however, was that there was only one parameter for the msgbox command, and so I fixed that by adding 0x6. I also wonder what version of XSE you're using; to be safe, download this version, XSE 1.1.1, and use it instead.
                  __________________

                  A Pokemon that is discriminated!
                  Support squirtle and make it everyone's favourite.
                  Reply With Quote
                    #63    
                  Old June 1st, 2014 (4:40 AM).
                  pokemaniaco pokemaniaco is offline
                     
                    Join Date: Jun 2006
                    Gender:
                    Nature: Adamant
                    Posts: 30
                    Thank you for your answer... however i've already tried before what you've said and nothing happens... I don't know If i should change the setvar number... maybe the problem is with that..

                    I was using the XSE 1.0.0, so thank you for your link.

                    However, I've download it, and it shows me this picture. I don't know how to change it. Can you help me?

                    http://tinypic.com/view.php?pic=nn4awl&s=8#.U4se9fldUrg

                    Thank you so much again
                    Reply With Quote
                      #64    
                    Old June 1st, 2014 (4:55 AM).
                    Spherical Ice's Avatar
                    Spherical Ice Spherical Ice is offline
                    • Crystal Tier
                     
                    Join Date: Nov 2007
                    Location: Bristol, UK
                    Age: 19
                    Posts: 5,226
                    Oh, just change the font. It's in the Format menu, then click "Font..." and select a nice font. I like Courier New at size 10.
                    __________________

                    A Pokemon that is discriminated!
                    Support squirtle and make it everyone's favourite.
                    Reply With Quote
                      #65    
                    Old June 1st, 2014 (5:27 AM).
                    pokemaniaco pokemaniaco is offline
                       
                      Join Date: Jun 2006
                      Gender:
                      Nature: Adamant
                      Posts: 30
                      It worked! I think the problem was the XSE version :P

                      Thank you sooo much! ;)
                      Reply With Quote
                        #66    
                      Old October 26th, 2014 (1:17 PM).
                      Zed™'s Avatar
                      Zed™ Zed™ is offline
                         
                        Join Date: Apr 2014
                        Location: Pavia, Italy
                        Gender: Male
                        Nature: Jolly
                        Posts: 17
                        Hi! Can anyone help me?

                        I do all what is explain on the first page of this topic:
                        I want to show a message box when I come into Pallet town, so this is my very simple script:

                        Code:
                        #dynamic 0x800000
                        
                        #org @start
                        msgbox @hello 0x6
                        setvar 0x4033 0x1
                        release
                        end
                        
                        #org @hello
                        = Hi everyone!

                        I've inserted it, choosing the second type of level script (Validates values, loads handler to 0x03000EB0 (playback) [02]), putting on "Flag" the number 4033 and mantaining on $0000 the "value box";

                        Well, now testing the rom it should appear, when I come to Pallet town, the message "Hello everyone!" following strange symbols, due to the fact that Amap overwrites the 0000 that I've put into the Value box, with FFFF.

                        But in practice "Hello everyone" doesn't appear, in the message box there are only the symbols.
                        Anyway I've opened the level script on XSE and I've changed the value:

                        Code:
                        #raw word 0xFFFF
                        to

                        Code:
                        #raw word 0x0
                        .

                        I've compiled it and saved on Amap, but now, when I come to Pallet town, no message appear, as if there weren't a script!


                        This is the original level script take from "Map Script Offset":

                        Code:
                        '---------------
                        #org 0x71A23C
                        #raw 0x2
                        #raw pointer 0x871A242
                        #raw 0x0
                        
                        '---------------
                        #org 0x71A242
                        #raw word 0x4033
                        #raw word 0x0
                        #raw pointer 0x8800000
                        #raw word 0xFFFF
                        
                        '---------------
                        #org 0x800000
                        msgbox 0x8800010 MSG_NORMAL '"Hi everyone!"
                        setvar 0x4033 0x1
                        release
                        end
                        
                        
                        '---------
                        ' Strings
                        '---------
                        #org 0x800010
                        = Hi everyone!
                        .


                        I'm using XSE 1.1.1 and Amap 1.95, thanks for the help!
                        Reply With Quote
                          #67    
                        Old May 20th, 2016 (8:38 PM).
                        Tapan681's Avatar
                        Tapan681 Tapan681 is offline
                        RiverDream
                           
                          Join Date: Sep 2015
                          Location: Kanto
                          Gender: Male
                          Nature: Relaxed
                          Posts: 61
                          I followed your tut but all I got was black screen when I entered the map. Can any one help me?
                          __________________
                          "Believe it or not but U are still the champion of Kanto..."
                          Coming soon...
                          Reply With Quote
                            #68    
                          Old May 20th, 2016 (8:46 PM).
                          Tapan681's Avatar
                          Tapan681 Tapan681 is offline
                          RiverDream
                             
                            Join Date: Sep 2015
                            Location: Kanto
                            Gender: Male
                            Nature: Relaxed
                            Posts: 61
                            Quote:
                            Originally Posted by Tapan681 View Post
                            I followed your tut but all I got was black screen when I entered the map. Can any one help me?
                            edit- I figured it out.
                            For those who encounter such problem, the solution is you need to delete the previous level script to make your script work.
                            Reply With Quote
                            Reply

                            Quick Reply

                            Join the conversation!

                            Create an account to post a reply in this thread, participate in other discussions, and more!

                            Create a PokéCommunity Account

                            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 7:05 PM.