Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

A party switch script that won't change main actor

Vang

Member

Hey, does anyone know a script I could use that's just like the script that lets you change actors from the party menu, but that keeps the player from
switching the main hero?

Any help would be very apreciated:D
 

A J

Member

this script will keep the 1st actor in the database as the Actor and it won't change even if you change the actor grarphic or first actor in pary manu :p
but it will change if you change the player graphic from the move routin

Code:
class Game_Player < Game_Character

    def refresh
    # If party members = 0
    if $game_party.actors.size == 0
      # Clear character file name and hue
      @character_name = ""
      @character_hue = 0
      # End method
      return
    end
    # Get lead actor#################################
    actor = $data_actors[1]
    # Set character file name and hue
    @character_name = actor.character_name
    @character_hue = actor.character_hue
    # Initialize opacity level and blending method
    @opacity = 255
    @blend_type = 0
  end
end


chnage the number here to change the actor you want as a main actor (player)
Code:
actor = $data_actors[1]
 

Vang

Member

Thanks a lot! That's very helpfull.

But I'm wondering also if there is one to keep that charater from being
switched out of the battle party?

If no one knows that's fine, the scriped you just gave me was good enough.
:D :D :D
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top