The RPG Maker Resource Kit

RMRK RPG Maker Creation => RPG Maker General => General Scripting => Topic started by: Lord Dante on September 02, 2005, 08:26:59 PM

Title: mount script
Post by: Lord Dante on September 02, 2005, 08:26:59 PM
help me! i changed a simple dash script into a mount script but now i need to make it so that you can get better mounts and such! ok, so ill put the events and the script up. first of all, heres the script that goes in at the bottom of game_player(im telling you because its important info so it can  be modded further)

#==============================================================================
# Game_Player Dash
#==============================================================================
class Game_Player
alias xrxs25_update update
def update
 unless moving? or $game_system.map_interpreter.running? or
        @move_route_forcing or $game_temp.message_window_showing
   if $game_switches[908] == true
     @move_speed = 5
   else
     @move_speed = 4
   end
 end
 xrxs25_update
end
end


ok, so heres the common events:

1st one is activated by using an item. it governs getting on the mount

<>message: ride mount?
<>show choices: yes/no
<>yes handler
<>switch [908 mount]=on
<>tint screen(alll the way dark, 20 frames)
<>change hero graphic: lead char to lead char riding mount
<>tint screen(back to normal, 20 frames)
<>
<>no/handler
<>

2nd one starts by switch 908 being on, btw these r all paralel processes this governs getting off the mount

<>conditional branch: A is pushed
<>tint screen(all the way black @20 frames)
<>change hero graphic back to hero w/out mount
<>tint screen(back to normal @20 frames)
<>switch 908: mount= off

and thats that. now for the better mount:


1st one is activated by using a better item. it governs getting on the mount

<>message: ride mount?
<>show choices: yes/no
<>yes handler
<>switch [909 mount]=on
<>tint screen(alll the way dark, 20 frames)
<>change hero graphic: lead char to lead char riding better mount
<>tint screen(back to normal, 20 frames)
<>
<>no/handler
<>

2nd one starts by switch 909 being on, btw these r all paralel processes this governs getting off the mount

<>conditional branch: A is pushed
<>tint screen(all the way black @20 frames)
<>change hero graphic back to hero w/out mount
<>tint screen(back to normal @20 frames)
<>switch 909: mount= off


ok. so i think i may need another script that looks like this:


#==============================================================================
# Game_Player Dash
#==============================================================================
class Game_Player
alias xrxs25_update update
def update
 unless moving? or $game_system.map_interpreter.running? or
        @move_route_forcing or $game_temp.message_window_showing
   if $game_switches[909] == true
     @move_speed = 5
   else
     @move_speed = 4
   end
 end
 xrxs25_update
end
end


i tried having two scripts but the game told me the stack lvl is too deep. so, if neone could help me thx, id really appreciate it because this will be really cool in my game if i can get it fixed! thankyou!
Title: mount script
Post by: goodyman on September 16, 2005, 10:51:52 PM
would this work with abs... and if so i would like to use this.
Title: mount script
Post by: Lord Dante on September 17, 2005, 07:22:39 PM
i dont know, but i need the problem solved.

dont tell me you didnt read the problem part *shmack* ungghhh... im trying to make it so that i can have different types of mounts! ah well...
Title: ...
Post by: goodyman on September 18, 2005, 09:03:58 PM
i would help but i am terrible at scripting...lol.
Title: mount script
Post by: Tsunokiette on September 19, 2005, 12:11:22 AM
I just figured it out (i think)

you don't need 2 scripts, it says your stack lvl is too deep, b/c you're replacing the update twice.

delete those two, and replace it with this.

#==============================================================================
# Game_Player Dash
#==============================================================================
class Game_Player
alias xrxs25_update update
def update
 unless moving? or $game_system.map_interpreter.running? or
        @move_route_forcing or $game_temp.message_window_showing
   if $game_switches[908] == true and $game_switches[909] != true
     @move_speed = 6
   else
      if $game_switches[909] == true and $game_switches[908] != true
          @move_speed = 5
      else
          @move_speed = 4
      end
   end
 end
 xrxs25_update
end
end


edit: this way, when switch 908 is on and 909 is off, you'll go fastest, when 908 is off and 909 is on, you'll go slower, and if both are off, you'll go slowest.
Title: mount script
Post by: Tsunokiette on September 21, 2005, 09:26:48 PM
*bump*

so err... does it work???
Title: mount script
Post by: Lord Dante on September 22, 2005, 01:30:25 AM
i havent tried it...but do you know how fast speed 6 is?


ok, anyways, im trying it now...


(5 minutes later)

hooray! thanks tsuno! (hey, now could u work on the party change ring script?)
Title: mount script
Post by: Tsunokiette on September 22, 2005, 02:41:27 AM
kk, try this. (first you have to change the name of that icon to partychangeicon7fg)

replace the ring menu with this

[code]#===================================================
# â–  Ring Menu - Show Player Location - Release #1 (Edited By Dubealex)
#===================================================
# For more infos and update, visit:
# rmxp.dubealex.com [OR] X-RPG V2 Forum
#
# Original Ring Menu by: å'Œå¸Œ (From XRXS)
# Original Edit and Fix by: Maki
# Show Player Location Version by: Dubealex
#
# You can customize this script at line #35 - Have fun !!
# If you want to show more stuff, its easy to do, just ask, and I will release
# new version of this edited script !
#
# alex@dubealex.com
#===================================================
#7/26/05-
#      Edited by Tsunokiette
#===================================================

#===================================================
# â–¼ CLASS Scene_Menu Begins
#===================================================

class Scene_Menu
#--------------------------------------------------------------------------
#
Title: mount script
Post by: Lord Dante on September 22, 2005, 05:41:28 AM
syntax error on line 241...

[code]
#
Title: mount script
Post by: Tsunokiette on September 22, 2005, 11:18:48 AM
whoops, it seems I fogot to add something... replace

[code]when 4
 $game_system.se_play($data_system.decision_se)
 $scene =
when 4 #
Title: mount script
Post by: Lord Dante on September 22, 2005, 02:10:28 PM
damnit. theres still a syntax error on line 241 :( anymore ideas?
Title: mount script
Post by: Tsunokiette on September 22, 2005, 11:12:53 PM
hmmm... try adding an extra end after this

if Input.press?(Input::DOWN) or Input.press?(Input::RIGHT)
$game_system.se_play($data_system.cursor_se)
@command_window.setup_move_move(Window_RingMenu::MODE_MOVER)
return
end
end


may not work, but one of the only things I can think of.
Title: mount script
Post by: Lord Dante on September 23, 2005, 01:57:47 PM
nvm i fixed it :D i just had to delete the first "if 4" thingie
Title: mount script
Post by: Tsunokiette on September 23, 2005, 09:33:55 PM
Quote from: Lord Dantenvm i fixed it :D i just had to delete the first "if 4" thingie


err that wont work... if you replaced the section I said, then  there would only be 1 when 4...

when you got rid of the when 4, well, you'll see...
Title: mount script
Post by: Lord Dante on September 25, 2005, 11:46:41 PM
nope, tried it. it works. :^^:
Title: mount script
Post by: Tsunokiette on September 26, 2005, 09:11:30 PM
:O_o: try all the options... the when 4 and when 5 say what to do if the option is selected...
Title: mount script
Post by: Lord Dante on September 27, 2005, 03:38:50 AM
nope, theys all workzes. thanks 4 da script!
Title: mount script
Post by: Tsunokiette on September 27, 2005, 08:22:31 AM
well okay then, as long as it works lol.
Title: mount script
Post by: Ayden on January 22, 2006, 01:04:50 AM
forgive me for
1: bribg up this topic
and, 2: being such a noob.
But, how do I use this script thingy? I could realy use it but how do I likn it with all the events and crapa? step by step instructions. plz? thank you.