Sierra's MEGA-HUGE XSE Scripting Tutorial Page 45

Started by Sierraffinity December 26th, 2008 6:55 PM
  • 776138 views
  • 1232 replies
Male
German
Seen January 23rd, 2016
Posted February 17th, 2015
7 posts
9.9 Years
Hola,

after trying and searching for a long time I have to ask now :)

I've got a problem with healing places.
Is it possible to set them at another place, after I deleted the original Pokémon-Center Lady
When I lose a fight now I am at the map the Poke-Center was (before I edited the map) and my Pokémon get healed but there is no sprite of Joy and it is not the map I want.
Hope you understand what I mean :)

Now I want to change this "reset point" to another place - so at the Poke-Center I created by my self.
I tried to set it simply with the line "sethealingplace 0x01" in my healing script but like I thought before this one doesn't work.

Hope someone can help me with this problem
Would help a lot
thanks :)
it's not about how hard you hit it's about how hard you can get hit!

Mana

Age 31
Male
UK
Seen March 25th, 2023
Posted August 18th, 2021
10,075 posts
14.3 Years
Hi! Love your tutorial!!! But my compile button is faded, and I can't click on it... what's wrong with it?
That normally means you need to load the ROM you want to compile. Either by file->open or by clicking the button next to the white box.

Mana

Age 31
Male
UK
Seen March 25th, 2023
Posted August 18th, 2021
10,075 posts
14.3 Years
Um... The hidepokepic command doesn't work for me. Can someone please help me ?
As in the pokepic stays open? Hmm, post your script in the script help thread and I/someone will have a look :3.

Spherical Ice

Age 25
Leicester, UK
Seen 6 Hours Ago
Posted February 20th, 2022
5,251 posts
15.5 Years
Hi ?
Hello! I must remind you that this is a forum, and not, say, an IRC channel, and so it may take some time for users to respond to you. Just be patient and I'm sure they'll get to you quickly!

As for your problem, it would help if you posted the entire script over here in the Script Help Thread. Good luck!
Male
Seen March 5th, 2020
Posted February 15th, 2019
7 posts
8.8 Years
Hello, I am new to scripting and I have a problem in applying movement, I made a script that only happens a mistake. The idea of the script was a character walking up to me I deliver a master ball and then back to the starting point and it disappears, it happens and the sprit is on my screen the gba .. but when I put the A-map out of my screen (in the case of GBA) the script but happen! character not walk up to me.

Does anyone know why?

chrunch

Male
Seen December 10th, 2021
Posted February 24th, 2021
1,343 posts
13.6 Years
Hello, I am new to scripting and I have a problem in applying movement, I made a script that only happens a mistake. The idea of the script was a character walking up to me I deliver a master ball and then back to the starting point and it disappears, it happens and the sprit is on my screen the gba .. but when I put the A-map out of my screen (in the case of GBA) the script but happen! character not walk up to me.

Does anyone know why?
I'm not sure I understand what you're saying. Does the script actually work when you test it out? Does the game freeze or does the script just not start?

Percy

Male
Asia
Seen December 24th, 2021
Posted June 19th, 2021
3,045 posts
8.7 Years
Hello, I am new to scripting and I have a problem in applying movement, I made a script that only happens a mistake. The idea of the script was a character walking up to me I deliver a master ball and then back to the starting point and it disappears, it happens and the sprit is on my screen the gba .. but when I put the A-map out of my screen (in the case of GBA) the script but happen! character not walk up to me.

Does anyone know why?
We're confused. Can you post the actual script?
i don't want to have a signature
Male
Seen March 5th, 2020
Posted February 15th, 2019
7 posts
8.8 Years
My Script
Spoiler:

#dynamic 0x71F878

#org @start
msgbox @talk1 0x6
playsong 0x011A 0x0
applymovement 16 @walk1
waitmovement 16
msgbox @talk2 0x6
giveitem 0x1 1 0x0
msgbox @talk3 0x6
applymovement 16 @walk2
waitmovement 16
hidesprite 16
setvar 0x6000 0x1
setflag 0x1206
fadesong 0x012C
release
end

#org @talk1
= Wait....

#org @talk2
= You need PokeBall? Take This.

#org @talk3
= BYE BYE!!

#org @walk1
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x11
#raw 0x11
#raw 0xFE

#org @walk2
#raw 0x10
#raw 0x10
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0xFE


It works perfectly when the Sprite that will move is within the scope of the GBA screen, but when I put away 10 steps (getting out of the GBA in game screen) it does not go to me, the script msg giveitem and hidesprite work, but she does not go to me.

but when I put the sprite in the range of vision of my character in game, it moves perfectly.

Mana

Age 31
Male
UK
Seen March 25th, 2023
Posted August 18th, 2021
10,075 posts
14.3 Years
OWs that are too far off screen won't be able to move during the script, I can't remember it movesprite works - easiest way would be to make the OW so it is just one tile offscreen, that should work.

destinedjagold

You can contact me in PC's discord server...

Age 32
Male
Seen 2 Days Ago
Posted March 24th, 2023
8,579 posts
16 Years
My Script
Spoiler:

#dynamic 0x71F878

#org @start
msgbox @talk1 0x6
playsong 0x011A 0x0
applymovement 16 @walk1
waitmovement 16
msgbox @talk2 0x6
giveitem 0x1 1 0x0
msgbox @talk3 0x6
applymovement 16 @walk2
waitmovement 16
hidesprite 16
setvar 0x6000 0x1
setflag 0x1206
fadesong 0x012C
release
end

#org @talk1
= Wait....

#org @talk2
= You need PokeBall? Take This.

#org @talk3
= BYE BYE!!

#org @walk1
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x11
#raw 0x11
#raw 0xFE

#org @walk2
#raw 0x10
#raw 0x10
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0xFE


It works perfectly when the Sprite that will move is within the scope of the GBA screen, but when I put away 10 steps (getting out of the GBA in game screen) it does not go to me, the script msg giveitem and hidesprite work, but she does not go to me.

but when I put the sprite in the range of vision of my character in game, it moves perfectly.
As Magic stated, NPCs that are too far away from the player character will not move.

The range of an NPC for them to move is 1-9 tiles away from the player's left/right, and 1-6(or maybe 7?) from the player's north/south.

Blah

Free supporter

Male
Unknown Island
Seen 3 Weeks Ago
Posted February 28th, 2023
1,924 posts
10.3 Years
As Magic stated, NPCs that are too far away from the player character will not move.

The range of an NPC for them to move is 1-9 tiles away from the player's left/right, and 1-6(or maybe 7?) from the player's north/south.
Is this true for when you're using the move camera specials as well? I'm wondering if that has to do with the player avatar or the camera itself.
...

destinedjagold

You can contact me in PC's discord server...

Age 32
Male
Seen 2 Days Ago
Posted March 24th, 2023
8,579 posts
16 Years
Is this true for when you're using the move camera specials as well? I'm wondering if that has to do with the player avatar or the camera itself.
No idea. Never crossed that bridge before. :/
But in theory, it should work. Since the player and the camera are locked all the time, and probably created this 'illusion' that the NPCs could only work around a specific radius from the player, so maybe the camera's actually the one's important here for NPCs to move.

Mana

Age 31
Male
UK
Seen March 25th, 2023
Posted August 18th, 2021
10,075 posts
14.3 Years
You can move the camera and still move NPCs normally, from my experience. I don't think it's solely down to luck that they're in range, so the scope is probably judged from the center of the camera position.
Male
Seen March 5th, 2020
Posted February 15th, 2019
7 posts
8.8 Years
Oh thank you, at least I know that the script is correct, only 2 more questions.

is there any way I banter with script it? eg a script that makes another sprite like another appears on the screen? would practically the same than my sprite forward to my screen.

does anyone know a script for me to do rematch? I know I'll probably use SetFlags out the basic commands, but I found no tutorial on the internet.

Thank U!
Male
Seen 3 Weeks Ago
Posted April 17th, 2015
15 posts
10.6 Years
Ok so I'm adding some custom items to my hack and when I try to compile my item description it gives me a "Error 6 Overflow on line 4 Wrong parameter type" error and I don't think my code is wrong but I dunno whats going on

'-----------------------
#dynamic 0x634906
#org @string
= A peculiar stone that makes certain\nspecies of POKeMON evolve.\lIt shines with a dazzling light.

Mana

Age 31
Male
UK
Seen March 25th, 2023
Posted August 18th, 2021
10,075 posts
14.3 Years
Ok so I'm adding some custom items to my hack and when I try to compile my item description it gives me a "Error 6 Overflow on line 4 Wrong parameter type" error and I don't think my code is wrong but I dunno whats going on

'-----------------------
#dynamic 0x634906
#org @string
= A peculiar stone that makes certain\nspecies of POKeMON evolve.\lIt shines with a dazzling light.
Hmm. Try copy and pasting the script in your post over the entire script you have in XSE (ctrl+A to make sure you highlight eeeeverything).

Sometimes XSE has a mishap. I copy and pasted your script and it debugged just fine for me. :(
Male
Seen 3 Weeks Ago
Posted April 17th, 2015
15 posts
10.6 Years
well I redownloaded XSE and my code worked that time, mustve been a bug with teh version I was using.

Edit: Well I seem to have run into anotehr snag, I've managed to successfully impliment the Dawn, Dusk and Shiny stones but there text is kinda messed up http://gyazo.com/92547a1abd9b40e256f25dbe521218f1 and yet in the editing programs they appear fine

kearnseyboy6

Aussie's Toughest Mudder

Seen June 22nd, 2019
Posted November 19th, 2016
300 posts
14.4 Years
well I redownloaded XSE and my code worked that time, mustve been a bug with teh version I was using.

Edit: Well I seem to have run into anotehr snag, I've managed to successfully impliment the Dawn, Dusk and Shiny stones but there text is kinda messed up http://gyazo.com/92547a1abd9b40e256f25dbe521218f1 and yet in the editing programs they appear fine
I'm not 100% sure on the accents or anything but I saw your code incorrectly used the \l command as it pushes the text up and away:

First Line
\nSecond Line
\nThird Line

Also make sure you compile in free space and fix the pointers appropritely !
HOLIDAYING CURRENTLY!!

U.Flame

Maker of Short Games

Age 27
Male
Unknown
Seen 6 Days Ago
Posted January 17th, 2023
1,322 posts
14.9 Years
I found a command that's not covered in the tutorial nor did I find a mention of it in the thread. It's "PLAYERFACING", a handy command that allows the script to differentiate depending on the direction the player is facing. I found it in the Black Glasses guy.
Spoiler:
'---------------
#org 0x150B23
lock
faceplayer
checkitem 0xCE 0x1
compare LASTRESULT 0x1
if 0x1 goto 0x8150B5E
special2 LASTRESULT 0x13C
compare LASTRESULT 0x1
if 0x1 goto 0x8150B4F
msgbox 0x817087E MSG_KEEPOPEN '"I dropped my glasses...\nCan you h..."
release
end

'---------------
#org 0x150B5E
msgbox 0x817087E MSG_KEEPOPEN '"I dropped my glasses...\nCan you h..."
msgbox 0x81708B1 MSG_KEEPOPEN '"Those glasses!\nMay I see them for..."
special2 LASTRESULT 0x13C
compare LASTRESULT 0x1
if 0x1 goto 0x8150B88
msgbox 0x8170993 MSG_KEEPOPEN '"Hmm...\nThese are BLACKGLASSES.\lT..."
release
end

'---------------
#org 0x150B4F
msgbox 0x8170947 MSG_KEEPOPEN '"Hmm...\nI can't find my glasses an..."
closeonkeypress
goto 0x8150B97

'---------------
#org 0x150B88
msgbox 0x81708DD MSG_KEEPOPEN '"Hmm...\nThese are BLACKGLASSES.\lT..."
closeonkeypress
goto 0x8150B97

'---------------
#org 0x150B97
pause 0x14
compare PLAYERFACING 0x2
if 0x1 call 0x8150BCB
compare PLAYERFACING 0x1
if 0x1 call 0x8150BCB
compare PLAYERFACING 0x3
if 0x1 call 0x8150BCB
compare PLAYERFACING 0x4
if 0x1 call 0x8150BD6
hidesprite LASTTALKED
release
end

'---------------
#org 0x150BCB
applymovement LASTTALKED 0x8150BE1
waitmovement 0x0
return

'---------------
#org 0x150BD6
applymovement LASTTALKED 0x8150BEB
waitmovement 0x0
return


'---------
' Strings
'---------
#org 0x17087E
= I dropped my glasses...\nCan you help me find them?

#org 0x1708B1
= Those glasses!\nMay I see them for a second?

#org 0x170993
= Hmm...\nThese are BLACKGLASSES.\lThey're not what I'm looking for...

#org 0x170947
= Hmm...\nI can't find my glasses anywhere...\lMaybe they're not around here...

#org 0x1708DD
= Hmm...\nThese are BLACKGLASSES.\lThey're not what I'm looking for...\pMaybe my glasses aren't around\nhere...


'-----------
' Movements
'-----------
#org 0x150BE1
#raw 0xA 'Step Left (Normal)
#raw 0xA 'Step Left (Normal)
#raw 0xA 'Step Left (Normal)
#raw 0xA 'Step Left (Normal)
#raw 0xA 'Step Left (Normal)
#raw 0xA 'Step Left (Normal)
#raw 0xA 'Step Left (Normal)
#raw 0xA 'Step Left (Normal)
#raw 0xA 'Step Left (Normal)
#raw 0xFE 'End of Movements

#org 0x150BEB
#raw 0x9 'Step Up (Normal)
#raw 0xA 'Step Left (Normal)
#raw 0xA 'Step Left (Normal)
#raw 0xA 'Step Left (Normal)
#raw 0xA 'Step Left (Normal)
#raw 0xA 'Step Left (Normal)
#raw 0xA 'Step Left (Normal)
#raw 0xA 'Step Left (Normal)
#raw 0xA 'Step Left (Normal)
#raw 0xA 'Step Left (Normal)
#raw 0xFE 'End of Movements


As you can see, it's used with:
"compare PLAYERFACING 0xX
if 0x1 call @string"

The X in 0xX is dependent on the direction the player is facing. After some experimenting, I found that 0x1 is facing down, 0x2 is facing up, 0x3 is facing left, and 0x4 is facing right.
The more you learn about something, the more you realize just how much you don't know. I've shelved my more ambitious ideas in favor of smaller, more feasible projects and contributions. While I still have an ongoing project, and still intend to experiment with improving Gen 3's multiplayer, it's been much less stressful doing smaller things, like entries for Anthroyd's MAGM contests.

Of which you can check out here:
Naillevaihcam
Magical Altering Gym Menagerie