The RPG Maker Resource Kit

RMRK RPG Maker Creation => RPG Maker General => General Scripting => Topic started by: dragonmagna on December 31, 2005, 01:04:13 AM

Title: Overworld hero script
Post by: dragonmagna on December 31, 2005, 01:04:13 AM
Put this in the scripts database!
-------------------------------------------
1) Open up the script editor
2) Click on the script called "Scene_Map"
3) Find this section of code:

Code: [Select]
   # B ??????????
    if Input.trigger?(Input::B)
      # ????????????????????
      unless $game_system.map_interpreter.running? or
             $game_system.menu_disabled
        # ???????????? SE ?????????
        $game_temp.menu_calling = true
        $game_temp.menu_beep = true
      end
    end


4) Just below that code insert THIS code:

Code: [Select]
   if Input.trigger?(Input::R)
      actor = []
      actor.push($game_party.actors[0])
      actor.push($game_party.actors[1])
      actor.push($game_party.actors[2])
      actor.push($game_party.actors[3])
      temp = 0
      temp2 = 0
      loop do
        temp2 = temp2 + 1
        if temp2 == 4
          temp2 = 0
        end
        if actor[temp2] != nil
          $game_party.actors[temp] = actor[temp2]
          temp = temp + 1
          if temp == 4
            break
          end
        end
        if temp2 == 0
          break
        end
      end
      $game_player.refresh
      $game_party.refresh
    end

------------------------------------------

Now when you press the "w" key on the keyboard, it would let you walk around as the next hero in line.
That may not make sense, but  try the script to see what I mean.
Credit goes to Plystire.
 :o
Title: Overworld hero script
Post by: digitaldude on January 03, 2006, 12:41:28 AM
i'm a noob so that code is really helpful thx
Title: Overworld hero script
Post by: cristianraf on January 03, 2006, 01:38:54 AM
:^^: thats very helpful but i can just do it with events  :^^:
Title: Overworld hero script
Post by: SiR_VaIlHoR on January 04, 2006, 01:54:31 PM
oh funny i think i can ameliorate it a little...
i'll try
Title: Overworld hero script
Post by: dragonmagna on January 07, 2006, 01:38:48 AM
Quote from: cristianraf
:^^: thats very helpful but i can just do it with events  :^^:

Based on how many characters you have, this could take at least 6 hours to do on switches and variables alone. Its just easier to do it this way. And why isn't this in scripts database yet? This is a really good, constantly needed script.
Title: Overworld hero script
Post by: ShadowLink on January 14, 2006, 06:37:08 PM
I know this topic is a week old, but which version is the script for?
Title: Overworld hero script
Post by: thatsmypie on January 14, 2006, 10:35:31 PM
Quote from: ShadowLink
I know this topic is a week old, but which version is the script for?

OMFG! The only Rpg Maker that uses scripts is RPG Maker XP. That was an idiotic question! Dont ask em...
Title: Overworld hero script
Post by: ShadowLink on January 15, 2006, 12:37:17 AM
Quote from: thatsmypie
Quote from: ShadowLink
I know this topic is a week old, but which version is the script for?

OMFG! The only Rpg Maker that uses scripts is RPG Maker XP. That was an idiotic question! Dont ask em...


Hey, whoa, calm down there bud. It's not like I'm expert with these RPG Makers  :O_o: I got it like...a week ago and haven't been on it much  :wink: I'm sorry if my question offended you, thatsmypie.  :P

Thanks though for answering my question.  :D

And thanks to dragonmagna for posting the script as well.  :^^: