Force Unequip

oldbone

Veteran
Veteran
Joined
May 10, 2012
Messages
101
Reaction score
5
First Language
English
Primarily Uses
Is there a way to force an unequip of 1 equip slot? 

I know I can force an equipment change: $game_actors[x].change_equip_by_id(0, y)

Is there anyway I can use this?: force_change_equip(slot_id, item)

Thanks in advance...
 

TroyZ

The Slayer
Veteran
Joined
Jun 18, 2013
Messages
74
Reaction score
5
First Language
Indonesian
Primarily Uses
RMVXA
then try this. this is just a simple script that i've made

class Game_Interpreter def force_change_equip(actor_id, slot_id, item) $game_actors[actor_id].change_equip_by_id(slot_id, item) endendfor example, you type it on script call command like this :

force_change_equip(1, 0, 5)means that it'll change the equipment for actor id 1. the equipment that'll changed is the equipment in slot 0 (weapons), with the weapons on id 5 (crimson axe) as long as the weapons itself exists in inventory

hopefully this will help :D
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,674
First Language
German
Primarily Uses
RMMV
Is there a way to force an unequip of 1 equip slot?
Do you need to use a script command?
In eventing, you can simply use the change equip command to set a slot to (none).


If you're using the script command, I don't know if the setting for (none) is zero or NIL, you might have to test that.
 

oldbone

Veteran
Veteran
Joined
May 10, 2012
Messages
101
Reaction score
5
First Language
English
Primarily Uses
TroyZ - aha... if you use the default command ($game_actors[x].change_equip_by_id(0, y)), and choose an item not in inventory, the slot unequips. Thanks!

Next question: What if I wanted to destroy that item from inventory after unequipping? (or before unequipping, whatever)

(needs to be in a script)
 

Jhin

Veteran
Veteran
Joined
Mar 20, 2012
Messages
70
Reaction score
17
First Language
Spanish
Primarily Uses
I don't know wich type of item is, but try:

$game_party.lose_item($data_armors[yourarmoridhere]

$game_party.lose_item($data_weapons[yourarmoridhere]

$game_party.lose_item($data_items[yourarmoridhere]

Tell me if it works
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,860
Messages
1,017,038
Members
137,568
Latest member
invidious
Top