Adding an unequip all line to script

Hey,

I'm trying to amend Tsukihime's Party disband so that when I drop off my characters, all their equipment is removed. For convenience and Victor's Visual Equip!

This is the script

http://dl.dropbox.com/u/23043573/RPG%20Maker/RMVXA%20Scripts/Tsuki_Party_Disband.txt

if somebody could tell me where to add the

$game_party.clear_equipments(actor.id)

my problem is location, location, location <_<

thanks
I would say to put it in here:



Code:
class Game_Party < Game_Unit

  def has_member?(actor_id)
    @actors.include?(actor_id)
  end

  alias :th_party_regroup_add_actor :add_actor
  def add_actor(actor_id)
    th_party_regroup_add_actor(actor_id)
    $game_map.clear_actor_event(actor_id)
  end

  def dropoff_actor(actor_id, custom=$game_system.custom_dropoff)
    if has_member?(actor_id)
      $game_party.clear_equipments(actor.id) # <<<<<<<<<<<<< added line
      $game_party.remove_actor(actor_id)
      if custom
        map_id = Tsuki::Party_Disband::Dropoff_Map
        x, y = Tsuki::Party_Disband::Dropoff_Pos
        $game_actors[actor_id].update_position(x, y, map_id)
      else
        $game_actors[actor_id].update_position
      end
      $game_map.setup_actor_events
    end
  end
end
Edit: It didn't work...-_-

maybe i'm using the wrong term...

If i use



Code:
  $game_party.clear_equipments(actor.id)
I get that actor is undefined in Game_Party

if I use



Code:
  $game_actors.clear_equipments(actor.id)
I get that actor is undefined in Game_Actor

if I use



Code:
  $game_party.clear_equipments(actor_id)  #Underscore instead of .
I get undefined method clear_equipments in Game_Party

if I use



Code:
  $game_actors.clear_equipments(actor_id)  #Underscore instead of .
I get undefined method clear_equipments in Game_Actor

And I'm putting these in a different place. I am putting them here



Code:
class Game_Party < Game_Unit

  def has_member?(actor_id)
    @actors.include?(actor_id)
  end

  alias :th_party_regroup_add_actor :add_actor
  def add_actor(actor_id)
    th_party_regroup_add_actor(actor_id)
    $game_map.clear_actor_event(actor_id)
  end

  def dropoff_actor(actor_id, custom=$game_system.custom_dropoff)
    #####THIS IS WHERE I AM PUTTING THE NEW CODE!!!#####
    if has_member?(actor_id)
	 #PUT THE LINE HERE ORIGINALLY	  #<<<Doesn't work here for some reason
	  $game_party.remove_actor(actor_id)
	  if custom
	    map_id = Tsuki::Party_Disband::Dropoff_Map
	    x, y = Tsuki::Party_Disband::Dropoff_Pos
	    $game_actors[actor_id].update_position(x, y, map_id)
	  else
	    $game_actors[actor_id].update_position
	  end
	  $game_map.setup_actor_events
    end
  end

end
And the game just crashes!!!

What am I doing wrong???

Any help is appreciated!

Im also trying to add a pop up box over the dropped off event's (actor's) head that displays the actor's name...

any suggestions on how to do this or should I start a new topic...
Okay, I assumed that the line you originally gave was correct in syntax, just that you didn't know where to put it.

It definitely needs to go where I said (you should check he's in the party before removing his equipment, not after). Try putting it back where it was, but changing it to this:



Code:
$game_actors[actor_id].clear_equipments
I suggest a new topic for a new problem 🙂
Im also trying to add a pop up box over the dropped off event's (actor's) head that displays the actor's name...

any suggestions on how to do this or should I start a new topic...
Just find a script that allows you to add a text pop-up, defined IN the event, and then add it as an event command when creating the ActorEvent object.
lol Tsukihime, you didn't say whether my "fix" for the other problem was right. I knew you'd come along soon enough to set me straight 😀
It's probably right. I don't know whether clear_equipments removes all of the actor's equips but if it is then it should work.
It works Perfectly! Thanks!!

Original thread: https://forums.rpgmakerweb.com/threads/adding-an-unequip-all-line-to-script.4046/