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.

Cycle Party Leader & Interaction Button

Ok, I'll explain best as possible.

I'm in need of a script that when buttons L & R is pressed it will cycle the party leader to the next/previous person in line. i.e. Bob(leader), Jill(2), Mark(3), Abe(4) are in a group.
Bob is current leader, R is pressed and it changes Jill to leader. Mark leaves the party and R is pressed and Abe becomes leader. L is then pressed and Jill becomes leader again.

The next has to do with who is leader. When button 4 is pressed when Bob is leader, he can push objects he is facing. When the same button is pushed when Mark is leader he can jump a 2square gap in the direction he is facing.

If this can be done easier with common events, then that would be fine.
Also, if these scripts can be made "noob" friendly, I would appreciate.


Update: I found the leader exchange script by XRXS. Still looking for a script/event tutorial on my second request.

Sorry for the bump and double-post. I would like to try to explain my request a bit better. What I'm looking for at the moment is a script or a common event tutorial on how to have the current party leader perform character specific actions when button 4/X/A is pressed on the map screen.
Kinda like, when Bob is leader he can jump across rivers and gaps but not into them. If Joe is leader he can move heavy objects. If Sam is leader he can turn invisible to NPCs for a small amount of time.
Sort of like the way it works in Breath of Fire 1 & 2.

Can anyone help me with this? I've tried using conditional switches and variables but I might be doing something wrong. I have the script for the party leader rotation but now I need either a script or a common event that will allow the different party members to do different things on the map screen when they are leader. Much like how QHeretic's Kindred Saga had the different leaders say different things to NPCs.
 
Times_I_Have_Posted_This += 1

Insert above Main
Code:
class Game_Party
  def shift_forward
    @actors << @actors.shift
    $game_player.refresh
  end
  def shift_backwards
    @actors.insert(0, @actors.pop)
    $game_player.refresh
  end
end

class Scene_Map
  alias_method :seph_partycycling_scnmap_update, :update
  def update
    if Input.trigger?(Input::L)
      $game_party.shift_forward
    elsif Input.trigger?(Input::R)
      $game_party.shift_backwards
    end
    seph_partycycling_scnmap_update
  end
end
 
That script just cycles the party, which I already have a script for. I'm looking for a script or common event tutorial on how to make each party leader do different things on the map. Like in Breath of Fire, Bow could hunt animals if he was party leader on the map, or Ox/Rand could push heavy objects, etc. I have never played 4 but I have 1 & 2 so if anyone understands what I'm talking about I'd appreciate it.
 

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