• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Forum moderator applications are now open! Click here for details.
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Creating Level Scripts

36
Posts
17
Years
  • Seen Dec 25, 2022
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!
 
5,256
Posts
16
Years
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.
 
36
Posts
17
Years
  • Seen Dec 25, 2022
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 ;)
 
17
Posts
9
Years
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!
 

Tapan681

RiverDream
66
Posts
8
Years
I followed your tut but all I got was black screen when I entered the map. Can any one help me?
 

Tapan681

RiverDream
66
Posts
8
Years
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.
 

*Sakisoap*

Mimikyu, what are you doing? ...nyeh... Mimikyu..
4
Posts
3
Years
  • Age 23
  • Seen Nov 22, 2020
Did you put #dynamic (ex: 0x800000) in the beginning of your script? That may be it

Me answering over a decade in the future
 
Back
Top