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.

[Resolved] More actors in party

Okay, I'm frustated now.
how to add more than 4 actors to the party? I mean, I've tried this:
Code:
def add_actor(actor_id)
    # Get actor
    actor = $game_actors[actor_id]
    # If the party has less than 4 members and this actor is not in the party
    if @actors.size < 8 and not @actors.include?(actor)
      # Add actor
      @actors.push(actor)
      # Refresh player
      $game_player.refresh
    end
  end

yet, after I add the actor, I tried to print $game_party.actors.size it still shows 4 instead of more...

What shuld I do?
 
First, make sure you're not not using SDK as they have a different set of scripts. Then, you can just entirely delete that if statement.

Code:
def add_actor(actor_id)
  # Get actor
  actor = $game_actors[actor_id]
  # Add actor
  @actors.push(actor)
  # Refresh player
  $game_player.refresh
end
 
still not working...

gaahh...
sorry, it's because there's another script that modify the method >.<
thanks anyway, it's resolved now!

There is an edit button, use it.

~Raziel
 

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