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.

RMXP: Remove party member

Fusty

Sponsor

On the first page of the event commands, use "Change Party Member".
If you want the party member that left to come back with the same stats as before, uncheck the "Initialize" button when re-adding him/her.
 

Star

Sponsor

I know how to remove actors via Actor ID in the Database. That's by using $game_party.remove_actor(ACTOR_ID) or $game_party.add_actor(ACTOR_ID)

But by removing by party member slot, I'm not so sure yet.
it might require a lot of IF's like if $game_party.actors[1].id == 2
remove actor. blah blah

Probably is a better way to do that
 

Star

Sponsor

Atoa":2lx9w7fq said:
it's not an hidden script, it's an ruby command.

$game_party.actors is an array. and "delet_at(index)" is an method of the Array class.
Array class? Where would one find all the methods listed under the Array Class? If you don't mind me asking since I'm trying to learn more and more. :D

Nevermind, I found it. I guess reading the manual will do me some wonders, but I hate reading. OH well, it's necessary.
 
Star":3gh1dg7y said:
Atoa":3gh1dg7y said:
it's not an hidden script, it's an ruby command.

$game_party.actors is an array. and "delet_at(index)" is an method of the Array class.
Array class? Where would one find all the methods listed under the Array Class? If you don't mind me asking since I'm trying to learn more and more. :D

Nevermind, I found it. I guess reading the manual will do me some wonders, but I hate reading. OH well, it's necessary.

The sad thing is that the manual doesn't list nearly all of the methods for the Array class. (Or any other default Ruby class, for that matter.) For those, you'll have to go to a place like Ruby-Doc.org. (For example, the Array class is here, and the String class is here)

There are a few pages there I would recommend to any scripter, because they tell you quite a bit that the help document doesn't.

Class: Object: This class is the parent class of all Ruby classes. Methods defined in this class are accessible within any class or module, unless specifically overridden.
Class: Class: This is the standard parent class used for most classes.
Class: Module: This is similar to Class: Class, except that it does not need to be instantiated (With Class.new). It is interesting to note that, as far as I can tell, all methods mentioned in this class are also defined in Class: Class, due to a circular inheritance pattern. Therefore, if you see a method here, it's probably going to work in a class as well.
Module: Kernel: Kernel is actually incorporated into Class: Object, which means that methods found here should be available no matter where you're currently scripting, even outside a class. Since this is a module, you could potentially call Kernel.method, as well.

Now, that site has a page for every single default Ruby class and module, which means that if you're working with something and need a bit more insight, it's a good place to look.
 

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