• 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?".
  • 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.

[Scripting Question] Error when creating 'riding pokemon' mechanic

15
Posts
9
Years
  • Age 43
  • Seen Nov 1, 2017
Hey guys!
So I'm a noob at scripting, but have been fiddling around on and off in RMXP for about a year.
I've eventually gotten around to making a feature for a game of mine in which you 'ride' the Pokemon in your party (Ride is an HM).

I've gotten it to change the graphic of the character when the HM is used, but everything stops (but the music) once that happens.
Ideally the riding works pretty much the same as the bicycle, but I want both features in the game, not a simple replace.

Here's what I've put in:

in Game_Map
Spoiler:


in Walk_Run
Spoiler:

in PField_Field
Spoiler:

Also in PField_Field, placed under line 458 (which is the [S-HIGHLIGHT]def Kernel.pbDismountBike[/S-HIGHLIGHT] block)
Spoiler:


IN PField_Metadata
Spoiler:

is added under the opening list and
Spoiler:
is added straight after line 114.


This is the Hidden Move script:
IN PField_HiddenMoves this is added to the end
Spoiler:

and this is added to a new section above main:
Spoiler:
There is a Syntax error in line 84 of the new section, but I've gone through with different alternatives of that section, that haven't had syntax errors, and everything has worked up until the player is actually riding the Pokemon.
EDIT: thanks to Vendily, there is no longer a syntax error in this section.
However, the issue regarding the player not actually being able to move (or being able to open any menus etc) has not been resolved.

Thanks for the support everyone!

If anyone could help me out here, that would be appreciated!
of course, credits will be given where credits are due :)

Thanks all ! (and sorry for the amount of rookie-ness in this post :D)
 
Last edited:

Zeak6464

Zeak #3205 - Discord
1,101
Posts
11
Years
  • Age 31
  • USA
  • Seen Oct 9, 2023
Hey guys!
So I'm a noob at scripting, but have been fiddling around on and off in RMXP for about a year.
I've eventually gotten around to making a feature for a game of mine in which you 'ride' the Pokemon in your party (Ride is an HM).

I've gotten it to change the graphic of the character when the HM is used, but everything stops (but the music) once that happens.
Ideally the riding works pretty much the same as the bicycle, but I want both features in the game, not a simple replace.

Here's what I've put in:

in Game_Map
Spoiler:


in Walk_Run
Spoiler:


in PField_Field
Spoiler:


Also in PField_Field, placed under line 458 (which is the [S-HIGHLIGHT]def Kernel.pbDismountBike[/S-HIGHLIGHT] block)
Spoiler:



IN PField_Metadata
Spoiler:

is added under the opening list and
Spoiler:

is added straight after line 114.


This is the Hidden Move script:
IN PField_HiddenMoves this is added to the end
Spoiler:


and this is added to a new section above main:
Spoiler:


There is a Syntax error in line 84 of the new section, but I've gone through with different alternatives of that section, that haven't had syntax errors, and everything has worked up until the player is actually riding the Pokemon.

If anyone could help me out here, that would be much appreciated!
of course, credits will be given where credits are due :)

Thanks all ! (and sorry for the amount of rookie-ness in this post :D)

Try this
http://www.pokecommunity.com/showthread.php?t=354975
 
15
Posts
9
Years
  • Age 43
  • Seen Nov 1, 2017
Can you post a screenshot of your error?
CYaUicn.png

Here's an image of the error.

Zeak6464 said:
Thanks, I will use that for sprites once I get the actual riding system working. I'm not looking for a replacement of the bicycle though, and the issue isn't graphic related (I think.)

Thanks both for the help !
 
1,680
Posts
8
Years
  • Age 24
  • Seen today
CYaUicn.png

Here's an image of the error.


Thanks, I will use that for sprites once I get the actual riding system working. I'm not looking for a replacement of the bicycle though, and the issue isn't graphic related (I think.)

Thanks both for the help !

is Script:Riding that last script in the first post?
Because my line count shows the last line to be line 83 and when the error points to the very last line, that means you missed an end somewhere.
(also, please post your scripts with the CODE tags. it's the # in the post screen.)
 
15
Posts
9
Years
  • Age 43
  • Seen Nov 1, 2017
is Script:Riding that last script in the first post?
Because my line count shows the last line to be line 83 and when the error points to the very last line, that means you missed an end somewhere.
(also, please post your scripts with the CODE tags. it's the # in the post screen.)

Indeed, Script:Riding is the last script from the original post.
And sorry! Will do that now :)
 
1,680
Posts
8
Years
  • Age 24
  • Seen today
Indeed, Script:Riding is the last script from the original post.
And sorry! Will do that now :)

I think I got it. I got the script to compile without errors.
But I don't know if it still works with the rest of your changes.
Spoiler:
 
15
Posts
9
Years
  • Age 43
  • Seen Nov 1, 2017
I think I got it. I got the script to compile without errors.
But I don't know if it still works with the rest of your changes.
Spoiler:

Many thanks! I will try it now and post the results.
Thanks for the support!!!

I think I got it. I got the script to compile without errors.
But I don't know if it still works with the rest of your changes.
Spoiler:

It is coming up with a syntax error in line 7, which is:
Code:
elsif passable?(@x, @y,2)

I tried it for just the other blocks as well (the ride_'other direction') and it has a syntax error for that same line in each one.

Thanks again :)
 
Last edited by a moderator:
15
Posts
9
Years
  • Age 43
  • Seen Nov 1, 2017
That's odd. I copied exactly what I typed and it worked in both v15 and v16.
Would you like a pastebin of the script?

I'll try the paste bin version, it may be Pokecom breaking the code...
Again, I'll post the results here. Thanks for your time, very much appreciated! :)

That's odd. I copied exactly what I typed and it worked in both v15 and v16.
Would you like a pastebin of the script?

Ok awesome, no syntax errors! However, the problem still is there regarding not being able to do anything...

Once AGAIN, thanks for your help!
 
Last edited by a moderator:
Back
Top