Script Help Thread (DO NOT REQUEST SCRIPTS) Page 324

Started by HackMew December 20th, 2008 5:10 AM
  • 625760 views
  • 9682 replies

Satoshi Ookami

Memento Mori

Age 30
Male
Abyss of Time, Great Seal
Seen August 5th, 2018
Posted July 3rd, 2018
14,253 posts
14.8 Years
I hope I am posting in the right thread, but I am trying to create a script for a selection...
So, I want to give choices, like:

Slowpoke
Polywag
Mew

Choose a pokemon.
You need to change choices in the ROM.
I believe tool for this is somewhere.
ROM hacking FAQ - Read before asking how to play a hack.

Anime List | PSN Trophy List

karatekid552

What happens if I push it?....

Male
Do you really want to know? Really?
Seen January 12th, 2015
Posted December 14th, 2014
1,771 posts
10.5 Years
I hope I am posting in the right thread, but I am trying to create a script for a selection...
So, I want to give choices, like:

Slowpoke
Polywag
Mew

Choose a pokemon.
You would need to create a multi choice box and utilize it. There is a tut in the Tutorials section for creating new ones and diegoisawesome's tutorial covers using them.

Paired with Simba
Male
Seen March 13th, 2022
Posted July 15th, 2013
29 posts
10.1 Years
Game: Firered
Type: Person

When I enter the lab and speak to it, nothing happens... It should continue asking me questions until it ends, but it does nothing...

Spoiler:
#dynamic 0x82C4EC

#org @start
checkflag 0x1000
if 0x1 goto @already
msgbox @1 0x5
if 0x1 goto @dragonite
msgbox @2 0x5
if 0x1 goto @garchomp
msgbox @3 0x5
if 0x1 goto @salamence
if 0x0 goto @games
release
end

#org @already
msgbox @already1 0x6
release
end

#org @dragonite
givepokemon 0x95 0x5 0x0 0x0 0x0 0x0
msgbox @gotit 0x6
setflag 0x1000
msgbox @nickname 0x5
compare LASTRESULT 0x1
if 0x1 gosub @name
release
end

#org @garchomp
givepokemon 0x1BD 0x5 0x0 0x0 0x0 0x0
msgbox @gotit 0x6
setflag 0x1000
msgbox @nickname 0x5
if 0x1 gosub @name
release
end

#org @salamence
givepokemon 0x175 0x5 0x0 0x0 0x0 0x0
msgbox @gotit 0x6
setflag 0x1000
msgbox @nickname 0x5
if 0x1 gosub @name
release
end

#org @name
call 0x1A74EB
return

#org @already1
= [player]: I have already taken my\npokemon.

#org @1
= Is Dragonite your pokemon?

#org @2
= Is Garchomp your pokemon?

#org @3
= Is Salamence your pokemon?

#org @games
= Professor: Stop playing games and\nchoose your pokemon!

#org @gotit
= You received a pokemon!

#org @nickname
= Would you like to nickname your\npokemon?

karatekid552

What happens if I push it?....

Male
Do you really want to know? Really?
Seen January 12th, 2015
Posted December 14th, 2014
1,771 posts
10.5 Years
Game: Firered
Type: Person

When I enter the lab and speak to it, nothing happens... It should continue asking me questions until it ends, but it does nothing...

Spoiler:
#dynamic 0x82C4EC

#org @start
checkflag 0x1000
if 0x1 goto @already
msgbox @1 0x5
if 0x1 goto @dragonite
msgbox @2 0x5
if 0x1 goto @garchomp
msgbox @3 0x5
if 0x1 goto @salamence
if 0x0 goto @games
release
end

#org @already
msgbox @already1 0x6
release
end

#org @dragonite
givepokemon 0x95 0x5 0x0 0x0 0x0 0x0
msgbox @gotit 0x6
setflag 0x1000
msgbox @nickname 0x5
compare LASTRESULT 0x1
if 0x1 gosub @name
release
end

#org @garchomp
givepokemon 0x1BD 0x5 0x0 0x0 0x0 0x0
msgbox @gotit 0x6
setflag 0x1000
msgbox @nickname 0x5
if 0x1 gosub @name
release
end

#org @salamence
givepokemon 0x175 0x5 0x0 0x0 0x0 0x0
msgbox @gotit 0x6
setflag 0x1000
msgbox @nickname 0x5
if 0x1 gosub @name
release
end

#org @name
call 0x1A74EB
return

#org @already1
= [player]: I have already taken my\npokemon.

#org @1
= Is Dragonite your pokemon?

#org @2
= Is Garchomp your pokemon?

#org @3
= Is Salamence your pokemon?

#org @games
= Professor: Stop playing games and\nchoose your pokemon!

#org @gotit
= You received a pokemon!

#org @nickname
= Would you like to nickname your\npokemon?
First of all, no flags over 900, see thise post: http://www.pokecommunity.com/showpost.php?p=6829256&postcount=158

Now, you are close when it comes to yes/no boxes, but you are missing a line:

It should be:

msgbox @1 0x5
compare 0x800D 0x1
if 0x1 goto @dragonite

You need to check and see if they said yes. Before you only saw, you didn't check:p

Also, you need to use a msgbox command to show the text at @games. Otherwise with will try and read the characters as scripting commands.

Paired with Simba

karatekid552

What happens if I push it?....

Male
Do you really want to know? Really?
Seen January 12th, 2015
Posted December 14th, 2014
1,771 posts
10.5 Years
How do I find the var number and unknown for the scripts to work?
Are we talking script tiles? Or just person events? Unknowns are not necessary (usually 03, but don't tend to have an impact) and the var is whatever variable is going to control your script, if it is a tile. Person events don't need them.

The var number allows script tiles to run if and only if the var equals the value. The only safe vars are 4000-40FF and the original functions of the ones in the game are listed on the link I gave you last post.

Paired with Simba
Male
Seen March 13th, 2022
Posted July 15th, 2013
29 posts
10.1 Years
yes, I need them for a script tile, and do not know how to find them based on the script:
Spoiler:
#dynamic 0x82CDDB

#org @start
checkflag 0x828
if 0x1 goto @done
applymovement 0x02 @move
waitmovement 0x0
msgbox @1
boxset 0x6
applymovement 0x02 @move2
waitmovement 0x0
hidesprite 0x02
release
end

#org @done
release
end

#org @move
#raw 0x10
#raw 0x10
#raw 0x3
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x1
#raw 0x11
#raw 0x11

#org @move2
#raw 0x10
#raw 0x10
#raw 0x2
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x0
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10

#org @1
= [rival]: And here's my pokemon too!\pBye!

karatekid552

What happens if I push it?....

Male
Do you really want to know? Really?
Seen January 12th, 2015
Posted December 14th, 2014
1,771 posts
10.5 Years
yes, I need them for a script tile, and do not know how to find them based on the script:
Spoiler:
#dynamic 0x82CDDB

#org @start
checkflag 0x828
if 0x1 goto @done
applymovement 0x02 @move
waitmovement 0x0
msgbox @1
boxset 0x6
applymovement 0x02 @move2
waitmovement 0x0
hidesprite 0x02
release
end

#org @done
release
end

#org @move
#raw 0x10
#raw 0x10
#raw 0x3
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x1
#raw 0x11
#raw 0x11

#org @move2
#raw 0x10
#raw 0x10
#raw 0x2
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x0
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10

#org @1
= [rival]: And here's my pokemon too!\pBye!
Vars are not dependent upon the script. In the settings in A-map, the var will only allow the script to run if var = value. Vars are like variables in math, they can be any number. In this post: http://www.pokecommunity.com/showpost.php?p=6829256&postcount=158 you will find a list of vars already used by the game. Feel free to use any var not listed (between 4000-40FF) or a var for which the event it was used for has been deleted.

To prevent an event from happening again, just add this as the last line of your script:

Setvar 0x[var you picked] 0x[not the value you put in A-map]

Paired with Simba
Male
Seen September 13th, 2020
Posted March 31st, 2013
1 posts
10.3 Years
Game: Ruby
Type: Level Script

OK, so how exactly would I make a person event disappear when I enter a level?
I tried this script but it doesn't work.

#org @start
setvar 0x4033 0x1
checkflag 0x801
if 0x1 goto @hide
end

#org @hide
hidesprite 0x02
hidesprite 0x03
end


Am I just being stupid and clearly doing something wrong because this code just won't work.

karatekid552

What happens if I push it?....

Male
Do you really want to know? Really?
Seen January 12th, 2015
Posted December 14th, 2014
1,771 posts
10.5 Years
Game: Ruby
Type: Level Script

OK, so how exactly would I make a person event disappear when I enter a level?
I tried this script but it doesn't work.

#org @start
setvar 0x4033 0x1
checkflag 0x801
if 0x1 goto @hide
end

#org @hide
hidesprite 0x02
hidesprite 0x03
end


Am I just being stupid and clearly doing something wrong because this code just won't work.
Sprites will only stay hidden if you set the flag which you put in their person ID in A-map. Otherwise, they will just reappear when you take a step.

Paired with Simba

karatekid552

What happens if I push it?....

Male
Do you really want to know? Really?
Seen January 12th, 2015
Posted December 14th, 2014
1,771 posts
10.5 Years
I am looking for a forum with details on scripting trades... I have found NO references in diegoisawesome's tutorial, or others... Any help is greatly appreciated...
There is a tool called Trader Advanced (?) which allows you to edit (and I think) create in-game trades. That is all I know.

Paired with Simba
Male
Seen March 13th, 2022
Posted July 15th, 2013
29 posts
10.1 Years
There is a tool called Trader Advanced (?) which allows you to edit (and I think) create in-game trades. That is all I know.
Yea, but I need to type the script, so that I can add text, change levels, and make the IVs and nature more randomized.

Jbsundown

Age 25
Male
United Kingdom
Seen 7 Hours Ago
Posted 7 Hours Ago
428 posts
10.8 Years
Hello, I've been trying to script a small event as a test for something bigger.

The scenario is, once you walk out of professor Oak's lab after getting your pokemon (FireRed) there are 2 grunts (X and Y). They talk a bit and then battle you individually. After being defeated, the screen fades and they are gone. They should not reappear there at all. However, after inserting the script into the ROM, after walking out of Oak's lab, the script doesn't activate. Then, once walking off of the tile then back onto it, the game crashes but the music is still playing normally.

Spoiler:

Image 1:


Image 2:


Image 3:



Here is the script:
Spoiler:
#dynamic 0x71A300

#org @start
lock
applymovement 0x05 @move
msgbox @1 0x6
applymovement 0x04 @move5
msgbox @14 0x6
applymovement 0x05 @move2
msgbox @12 0x6
applymovement 0x04 @move3
msgbox @13 0x6
applymovement 0x04 @move4
trainerbattle 0x1 0x003 0x0 @before @after @later
end

#org @12
=Hey! You!\lWhat are you lokin' at?

#org @13
= Le'me battle 'im Y!\lPlease!\p*sigh*\lFine, go ahead.

#org @1
= X!\nWhat are you doing?

#org @14
= I ain't doin' nothin'.\pHmmm...

#org @move
#raw 0x1

#org @move2
#raw 0x7
#raw 0x62

#org @move3
#raw 0x3
#raw 0x62
#raw 0x0

#org @move4
#raw 0x20

#org @move5
#raw 0x0

#org @before
= Haha! Bring it on, kid.

#org @after
= Y! Help!

#org @later
applymovement 0x04 @move7
msgbox @2 0x6
applymovement 0x05 @move8
trainerbattle 0x1 0x002 0x0 @before1 @after1 @later1

#org @move7
#raw 0x1F
#raw 0x1F
#raw 0x1D
#raw 0x7

#org @move8
#raw 0x13

#org @2
= Hmph.\n You beat X.\lNo hard feat I suppose.\lBut, for that, I will beat\lyou!

#org @before1
= Now I'll show you!

#org @after1
= I went easy on you.

#org @later1
applymovement 0x05 @move9
msgbox @3 0x6
applymovement 0x05 @move10
msgbox @4 0x6
fadescreen 0x1
hidesprite 0x05
hidesprite 0x04
fadescreen 0x0
setflag 0x1200
release
end

#org @move9
#raw 0x12


#org @move10
#raw 0x3


#org @3
= Let's get going, X...

#org @4
= See ya around, kid.





If there is anything else that is required to find the error, please tell me! :)
The one and only

DrFuji

Heiki Hecchara‌‌

Age 30
Male
Aussie
Seen 4 Days Ago
Posted February 12th, 2021
1,693 posts
13.7 Years
Hello, I've been trying to script a small event as a test for something bigger.

The scenario is, once you walk out of professor Oak's lab after getting your pokemon (FireRed) there are 2 grunts (X and Y). They talk a bit and then battle you individually. After being defeated, the screen fades and they are gone. They should not reappear there at all. However, after inserting the script into the ROM, after walking out of Oak's lab, the script doesn't activate. Then, once walking off of the tile then back onto it, the game crashes but the music is still playing normally.

Spoiler:

Image 1:


Image 2:


Image 3:



Here is the script:
Spoiler:
#dynamic 0x71A300

#org @start
lock
applymovement 0x05 @move
msgbox @1 0x6
applymovement 0x04 @move5
msgbox @14 0x6
applymovement 0x05 @move2
msgbox @12 0x6
applymovement 0x04 @move3
msgbox @13 0x6
applymovement 0x04 @move4
trainerbattle 0x1 0x003 0x0 @before @after @later
end

#org @12
=Hey! You!\lWhat are you lokin' at?

#org @13
= Le'me battle 'im Y!\lPlease!\p*sigh*\lFine, go ahead.

#org @1
= X!\nWhat are you doing?

#org @14
= I ain't doin' nothin'.\pHmmm...

#org @move
#raw 0x1

#org @move2
#raw 0x7
#raw 0x62

#org @move3
#raw 0x3
#raw 0x62
#raw 0x0

#org @move4
#raw 0x20

#org @move5
#raw 0x0

#org @before
= Haha! Bring it on, kid.

#org @after
= Y! Help!

#org @later
applymovement 0x04 @move7
msgbox @2 0x6
applymovement 0x05 @move8
trainerbattle 0x1 0x002 0x0 @before1 @after1 @later1

#org @move7
#raw 0x1F
#raw 0x1F
#raw 0x1D
#raw 0x7

#org @move8
#raw 0x13

#org @2
= Hmph.\n You beat X.\lNo hard feat I suppose.\lBut, for that, I will beat\lyou!

#org @before1
= Now I'll show you!

#org @after1
= I went easy on you.

#org @later1
applymovement 0x05 @move9
msgbox @3 0x6
applymovement 0x05 @move10
msgbox @4 0x6
fadescreen 0x1
hidesprite 0x05
hidesprite 0x04
fadescreen 0x0
setflag 0x1200
release
end

#org @move9
#raw 0x12


#org @move10
#raw 0x3


#org @3
= Let's get going, X...

#org @4
= See ya around, kid.



If there is anything else that is required to find the error, please tell me! :)
There are quite a few problems with how you've set this out. If you want a script to activate the instant you enter a map then you will have to make it a level script, rather than a green-S tile script which you walk over - Here's a good tutorial to show you how to make one. For future note, when using green-S tile scripts you need to fill in 'Unknown', 'Var number' and occassionally 'Var Value' boxes otherwise you will experience freezes like you have now - diegoisawesome's XSE tutorial can help explain what to do here (Found under the applymovement section).

Here's your script with some changes in red and an explanation as to why they were changed:

Spoiler:
#dynamic 0x720000 // This is generally considered the best offset to start looking for free space in a FR ROM

#org @start
lock
applymovement 0x05 @move
msgbox @1 0x6
applymovement 0x04 @move5
msgbox @14 0x6
applymovement 0x05 @move2
msgbox @12 0x6
applymovement 0x04 @move3
msgbox @13 0x6
applymovement 0x04 @move4
trainerbattle 0x1 0x003 0x0 @before @after @later
end

#org @12
=Hey! You!\lWhat are you lokin' at?

#org @13
= Le'me battle 'im Y!\lPlease!\p*sigh*\lFine, go ahead.

#org @1
= X!\nWhat are you doing?

#org @14
= I ain't doin' nothin'.\pHmmm...

#org @move
#raw 0x1
#raw 0xFE // You need to end your movement commands with 0xFE, otherwise the game will glitch

#org @move2
#raw 0x7
#raw 0x62
#raw 0xFE

#org @move3
#raw 0x3
#raw 0x62
#raw 0x0
#raw 0xFE

#org @move4
#raw 0x20
#raw 0xFE

#org @move5
#raw 0x0
#raw 0xFE

#org @before
= Haha! Bring it on, kid.

#org @after
= Y! Help!

#org @later
applymovement 0x04 @move7
msgbox @2 0x6
applymovement 0x05 @move8
trainerbattle 0x1 0x002 0x0 @before1 @after1 @later1

#org @move7
#raw 0x1F
#raw 0x1F
#raw 0x1D
#raw 0x7
#raw 0xFE

#org @move8
#raw 0x13
#raw 0xFE

#org @2
= Hmph.\n You beat X.\lNo hard feat I suppose.\lBut, for that, I will beat\lyou!

#org @before1
= Now I'll show you!

#org @after1
= I went easy on you.

#org @later1
applymovement 0x05 @move9
msgbox @3 0x6
applymovement 0x05 @move10
msgbox @4 0x6
fadescreen 0x1
hidesprite 0x05
hidesprite 0x04
fadescreen 0x0
setvar 0xYYYY 0XZZZZ // Variable changing command to prevent the level script from looping
setflag 0x1200
release
end

#org @move9
#raw 0x12
#raw 0xFE

#org @move10
#raw 0x3
#raw 0xFE

#org @3
= Let's get going, X...

#org @4
= See ya around, kid.


You may also have to put some 'waitmovement 0x0' commands here and there but then again you might not, idk :P

Hopefully this helped.

Jbsundown

Age 25
Male
United Kingdom
Seen 7 Hours Ago
Posted 7 Hours Ago
428 posts
10.8 Years
There are quite a few problems with how you've set this out. If you want a script to activate the instant you enter a map then you will have to make it a level script, rather than a green-S tile script which you walk over - Here's a good tutorial to show you how to make one. For future note, when using green-S tile scripts you need to fill in 'Unknown', 'Var number' and occassionally 'Var Value' boxes otherwise you will experience freezes like you have now - diegoisawesome's XSE tutorial can help explain what to do here (Found under the applymovement section).

Here's your script with some changes in red and an explanation as to why they were changed:

Spoiler:
#dynamic 0x720000 // This is generally considered the best offset to start looking for free space in a FR ROM

#org @start
lock
applymovement 0x05 @move
msgbox @1 0x6
applymovement 0x04 @move5
msgbox @14 0x6
applymovement 0x05 @move2
msgbox @12 0x6
applymovement 0x04 @move3
msgbox @13 0x6
applymovement 0x04 @move4
trainerbattle 0x1 0x003 0x0 @before @after @later
end

#org @12
=Hey! You!\lWhat are you lokin' at?

#org @13
= Le'me battle 'im Y!\lPlease!\p*sigh*\lFine, go ahead.

#org @1
= X!\nWhat are you doing?

#org @14
= I ain't doin' nothin'.\pHmmm...

#org @move
#raw 0x1
#raw 0xFE // You need to end your movement commands with 0xFE, otherwise the game will glitch

#org @move2
#raw 0x7
#raw 0x62
#raw 0xFE

#org @move3
#raw 0x3
#raw 0x62
#raw 0x0
#raw 0xFE

#org @move4
#raw 0x20
#raw 0xFE

#org @move5
#raw 0x0
#raw 0xFE

#org @before
= Haha! Bring it on, kid.

#org @after
= Y! Help!

#org @later
applymovement 0x04 @move7
msgbox @2 0x6
applymovement 0x05 @move8
trainerbattle 0x1 0x002 0x0 @before1 @after1 @later1

#org @move7
#raw 0x1F
#raw 0x1F
#raw 0x1D
#raw 0x7
#raw 0xFE

#org @move8
#raw 0x13
#raw 0xFE

#org @2
= Hmph.\n You beat X.\lNo hard feat I suppose.\lBut, for that, I will beat\lyou!

#org @before1
= Now I'll show you!

#org @after1
= I went easy on you.

#org @later1
applymovement 0x05 @move9
msgbox @3 0x6
applymovement 0x05 @move10
msgbox @4 0x6
fadescreen 0x1
hidesprite 0x05
hidesprite 0x04
fadescreen 0x0
setvar 0xYYYY 0XZZZZ // Variable changing command to prevent the level script from looping
setflag 0x1200
release
end

#org @move9
#raw 0x12
#raw 0xFE

#org @move10
#raw 0x3
#raw 0xFE

#org @3
= Let's get going, X...

#org @4
= See ya around, kid.


You may also have to put some 'waitmovement 0x0' commands here and there but then again you might not, idk :P

Hopefully this helped.
Okay, thank you very much! I will try this out and see if it works! :D Thanks again!
The one and only
Non-binary
California
Seen August 9th, 2014
Posted August 9th, 2014
27 posts
10.8 Years
Hey all, I wrote a script for my starter Pokemon, an Eevee, and when I tested it in my ROM, all that happened was the noise you hear when you click a text box. If someone could help me out, I'd appreciate it. Here's the script:

#dynamic 0x6B09F8

#org @start
setflag 0x828
msgbox @1 0x5
@take
msgbox @2 0x6
release
end

#org @take
givepokemon 0x133 0x5 0x0 0x0 0x0 0x0
fanfare 0x13E
msgbox @3 0x4
waitfanfare
closeonkeypress
setflag 0x828
msgbox @4 0x5
compare LASTRESULT 0x1
if 0x1 gosub @name
msgbox @5 0x6
release
end

#org @name
call 0x1A74EB
return

#org @1
= It's an EEVEE.\nBut it's covered in burns!\pWill you help it?

#org @2
= That's okay.\pSomeone else will\nprobably take it.

#org @3
= [black_rs]You received an EEVEE!

#org @4
= [black_rs]Would you like to give a\nnickname to this little EEVEE?

#org @5
= That EEVEE is looking\nbetter already[.]
This account is dead and has been for a long time.
I did, however, remake it on August 09, 2014. You can find my new location here.

tajaros

Hi I'm dawg

Age 24
Male
Philippines
Seen August 7th, 2015
Posted April 15th, 2013
855 posts
11.1 Years
Hey all, I wrote a script for my starter Pokemon, an Eevee, and when I tested it in my ROM, all that happened was the noise you hear when you click a text box. If someone could help me out, I'd appreciate it. Here's the script:

#dynamic 0x6B09F8

#org @start
setflag 0x828
msgbox @1 0x5
@take
msgbox @2 0x6
release
end

#org @take
givepokemon 0x133 0x5 0x0 0x0 0x0 0x0
fanfare 0x13E
msgbox @3 0x4
waitfanfare
closeonkeypress
setflag 0x828
msgbox @4 0x5
compare LASTRESULT 0x1
if 0x1 gosub @name
msgbox @5 0x6
release
end

#org @name
call 0x1A74EB
return

#org @1
= It's an EEVEE.\nBut it's covered in burns!\pWill you help it?

#org @2
= That's okay.\pSomeone else will\nprobably take it.

#org @3
= [black_rs]You received an EEVEE!

#org @4
= [black_rs]Would you like to give a\nnickname to this little EEVEE?

#org @5
= That EEVEE is looking\nbetter already[.]
Here I fixed your script I found numerous of errors in your script especially in the first part you didn't even have a decision command to check if the user picked yes or no.

Also you've placed a release command in your script but it doesn't have any lock command in it. Also the givepokemon command 133 is Eevee's Pokemon No. so you have to convert to 133 to hex, so it will be 85.

I think that's all there is to it. Here's the fixed script btw.

#dynamic 0x800000

#org @start
lock
msgbox @1 0x5
compare LASTRESULT 0x1
if 0x1 goto @take
msgbox @5 0x6
release
end

#org @take
givepokemon 0x85 0x5 0x0 0x0 0x0 0x0
setflag 0x828
fanfare 0x13E
msgbox @2 0x4
waitfanfare
closeonkeypress
msgbox @3 0x5
compare LASTRESULT 0x1
if 0x1 goto @nick
goto @good
end

#org @nick
setvar 0x8004 0x0
call @nickname
goto @good

#org @nickname
fadescreen 0x1
special 0x9E
waitstate
return

#org @good
msgbox @4 0x6
release
end

#org @1
= It's an EEVEE.\nBut it's covered in burns!\pWill you help it?

#org @2
= [black_rs]You received an EEVEE!

#org @3
= [black_rs]Would you like to give a\nnickname to this little EEVEE?

#org @4
= That EEVEE is looking\nbetter already.

#org @5
= That's okay.\pSomeone else will\nprobably take it.
Age 34
Male
Seen March 16th, 2022
Posted February 8th, 2019
416 posts
10.3 Years
well its quite simple...
the character you want to follow has a movment sequence... you just have to copy that movement sequence with your character... only one step behind.

if character 1 and character 2 are beside eachother face to face... (character one is on the left)
if character 1s sequence looks like Walk_down walk_down walk_down walk_left
character 2 can be walk_left walk_down walk_down walk_down walk_left

notice how character 2 has a step before the setps that character 1 has... that means he should be following... movement commands are simple really.

you will want to check the players facing most likely... this will tell you weather you are standing above, below, left or right of the character you want to follow, so you know which movements to make to do the following...

I hope that made since...
if not here is an example:
Spoiler:

#org 0x8800190
'-----------------------------------
closemsg
applymovement 0x4 0x8800200 ' walk_right walk_righ...
compare PLAYERFACING UP
if == call 0x8800240 ' Equal To
compare PLAYERFACING DOWN
if == call 0x8800250 ' Equal To
compare PLAYERFACING RIGHT
if == call 0x8800260 ' Equal To
compare PLAYERFACING LEFT
if == call 0x8800270 ' Equal To
pauseevent 0x0
msgbox 0x8800220 ' \v\h01 entered a \ns...
callstd MSG_NOCLOSE ' Non-closing message
closemsg
warp 0x4 0x4 0xFF 0x3 0x4
disappear 0x7
movesprite2 0x4 0x6 0x3
spritebehave 0x4 0x8
end

#org 0x8800240
'-----------------------------------
applymovement PLAYER 0x8800210 ' walk_up walk_right w...
return

#org 0x8800250
'-----------------------------------
applymovement PLAYER 0x8800280 ' walk_down walk_right...
return

#org 0x8800260
'-----------------------------------
applymovement PLAYER 0x8800290 ' walk_right walk_righ...
return

#org 0x8800270
'-----------------------------------
applymovement PLAYER 0x88002A0 ' walk_up look_down wa...
return


#org 0x8800220
= \v\h01 entered a \nsecret passage!

#org 0x8800200(Oak walks this way)
M walk_right walk_right walk_right walk_right walk_right walk_right hide end

#org 0x8800210(I am facing UP, so I am below Oak, to follow I must walk up then follow)
M walk_up walk_right walk_right walk_right walk_right walk_right walk_right hide end

#org 0x8800280(I am facing DOWN, so I am above Oak, to follow I must walk down then follow)
M walk_down walk_right walk_right walk_right walk_right walk_right walk_right hide end

#org 0x8800290(I am facing right, so I am to the left of Oak, to follow I must walk right then follow)
M walk_right walk_right walk_right walk_right walk_right walk_right walk_right hide end

#org 0x88002A0(I am facing left, so I am to the right of Oak, to follow I must get out of oaks way by going up, then back down... then follow)
M walk_up look_down walk_down walk_right walk_right walk_right walk_right walk_right hide end

(another option would have been to check playerfacing before moving oak, then at each result (up down left right) move Oak and the player, this way instead of having the player get out of oaks way, Oak could walk around the player...)


This is my example from when (in my hack) the player chooses to catch their own starting pokemon... you talk to Oak, (after he offers you his 3 choices) and he offers you the chance to catch your own starter... you say yes and upon selecting yes this script is run (he walks and the player follows, depending on the players location or which way he is facing oak)
Male
Seen March 13th, 2014
Posted April 17th, 2013
15 posts
11.2 Years
Game: Pokemon Fire Red
Editor: XSE 1.1
Type: Movement Script

So I've been hacking Fire Red for a few days now with XSE 1.0, and I recently came across a download link for 1.1 (FINALLY) so I started using it because it's less buggy, etc. and whether this is related to my problem or not, I'm not sure, but the script shown below will not do what I want it to do.

What's supposed to happen:

Rival's song plays
Rival says "Wait up"
Player faces rival
Rival approaches player
Rival tells you your pokemon are bad
Player jumps to the side (looking like rival pushed him)
Rival walks out the door
A variable is set so that the script doesn't occur again

What actually happens:

Rival's song plays
Rival says "Wait up"
Rival DOES NOT approach the player and stays in the same spot
Text box saying your pokemon are bad still appears
Player still jumps to the side
Rival stays in the same old spot
A variable is set so that the script doesn't occur again

So my obvious problem is that my applymovement portion of the script is not working.
The sprite I am trying to move does have the person event #5 as specified in the script, so I'm not sure what the problem is... I have to have 3 of these scripts, and one of them works (they are EXACTLY the same), the other two do not, but I think I may have compiled the first one using XSE 1.0 if that means anything.

Here is the script itself:
Spoiler:
#dynamic 0x720438

#org @start
lock
playsong 0x013B 0x0
msgbox @wait 0x6
applymovement 0xFF @facehim
applymovement 0x5 @movegary
waitmovement 0x0
msgbox @hi 0x6
applymovement 0xFF @moveplayer
waitmovement 0x0
applymovement 0x5 @garyleave
waitmovement 0x0
hidesprite 0x5
fadesong 0x012D
setvar 0x4067 0x0
release
end

#org @wait
= Hey \v\h01! Wait up!

#org @facehim
#raw 0x01 0xFE

#org @movegary
#raw 0x13 0x10 0x10 0x10 0x10 0x10 0x10 0xFE

#org @hi
= Let me see the POKEMON you picked\nfor just a moment...\p...\pHa! You're not even worth my time\nto battle, my POKEMON is a million\ltimes better than yours! See ya\laround, weakling!

#org @moveplayer
#raw 0x51 0xFE

#org @garyleave
#raw 0x10 0x10 0xFE


And while I'm at it, how would I make it sound like the rival leaves through the door? Right now he just kinda disappears without a sound (in theory) :P

karatekid552

What happens if I push it?....

Male
Do you really want to know? Really?
Seen January 12th, 2015
Posted December 14th, 2014
1,771 posts
10.5 Years
Game: Pokemon Fire Red
Editor: XSE 1.1
Type: Movement Script

So I've been hacking Fire Red for a few days now with XSE 1.0, and I recently came across a download link for 1.1 (FINALLY) so I started using it because it's less buggy, etc. and whether this is related to my problem or not, I'm not sure, but the script shown below will not do what I want it to do.

What's supposed to happen:

Rival's song plays
Rival says "Wait up"
Player faces rival
Rival approaches player
Rival tells you your pokemon are bad
Player jumps to the side (looking like rival pushed him)
Rival walks out the door
A variable is set so that the script doesn't occur again

What actually happens:

Rival's song plays
Rival says "Wait up"
Rival DOES NOT approach the player and stays in the same spot
Text box saying your pokemon are bad still appears
Player still jumps to the side
Rival stays in the same old spot
A variable is set so that the script doesn't occur again

So my obvious problem is that my applymovement portion of the script is not working.
The sprite I am trying to move does have the person event #5 as specified in the script, so I'm not sure what the problem is... I have to have 3 of these scripts, and one of them works (they are EXACTLY the same), the other two do not, but I think I may have compiled the first one using XSE 1.0 if that means anything.

Here is the script itself:
Spoiler:
#dynamic 0x720438

#org @start
lock
playsong 0x013B 0x0
msgbox @wait 0x6
applymovement 0xFF @facehim
applymovement 0x5 @movegary
waitmovement 0x0
msgbox @hi 0x6
applymovement 0xFF @moveplayer
waitmovement 0x0
applymovement 0x5 @garyleave
waitmovement 0x0
hidesprite 0x5
fadesong 0x012D
setvar 0x4067 0x0
release
end

#org @wait
= Hey \v\h01! Wait up!

#org @facehim
#raw 0x01 0xFE

#org @movegary
#raw 0x13 0x10 0x10 0x10 0x10 0x10 0x10 0xFE

#org @hi
= Let me see the POKEMON you picked\nfor just a moment...\p...\pHa! You're not even worth my time\nto battle, my POKEMON is a million\ltimes better than yours! See ya\laround, weakling!

#org @moveplayer
#raw 0x51 0xFE

#org @garyleave
#raw 0x10 0x10 0xFE


And while I'm at it, how would I make it sound like the rival leaves through the door? Right now he just kinda disappears without a sound (in theory) :P
You would need to use the setdoor animation commands and the playsong commands in conjunction with the hide/showsprite commands. Doors are quite fun:p.

I'm wondering if the problem you are having deals with the raws. Try giving them all their own lines. If you notice, the player's movements are only one raw and those work. So, give it a try. It couldn't hurt.

Also, check to make sure it deffinaetely is the the person number, not the event number. Here is an img:
Spoiler:


I know it is in Spanish, (i don't speak Spanish, so if I can read it, so can you:p) but the number you should be looking at for Gary is "No. de Gente:", which is just under the "Delete Event" button.

Paired with Simba
Male
Seen March 13th, 2014
Posted April 17th, 2013
15 posts
11.2 Years
You would need to use the setdoor animation commands and the playsong commands in conjunction with the hide/showsprite commands. Doors are quite fun:p.

I'm wondering if the problem you are having deals with the raws. Try giving them all their own lines. If you notice, the player's movements are only one raw and those work. So, give it a try. It couldn't hurt.

Also, check to make sure it deffinaetely is the the person number, not the event number. Here is an img:

I know it is in Spanish, (i don't speak Spanish, so if I can read it, so can you:p) but the number you should be looking at for Gary is "No. de Gente:", which is just under the "Delete Event" button.
Alright, I tried giving each movement their own #raw, but still no luck unfortunately. I also double checked to make sure I had the right person event no., and I did so I'm not sure what the problem could be! I get the feeling maybe there was a change in the way XSE works with the applymovement command from 1.0-1.1 possibly?

karatekid552

What happens if I push it?....

Male
Do you really want to know? Really?
Seen January 12th, 2015
Posted December 14th, 2014
1,771 posts
10.5 Years
Alright, I tried giving each movement their own #raw, but still no luck unfortunately. I also double checked to make sure I had the right person event no., and I did so I'm not sure what the problem could be! I get the feeling maybe there was a change in the way XSE works with the applymovement command from 1.0-1.1 possibly?
Nope, it hasn't changed. Try shifting things around and seeing if it will run the script on a different OW.

Paired with Simba