"Equip and Un-Equip" a specific Item?

Status
Not open for further replies.

whotfisjojo

Swallow the Green Goo? >Yyeesss >NO!!!
Member
Joined
Jun 5, 2019
Messages
25
Reaction score
6
First Language
English
Primarily Uses
RMVXA
Is it possible? The character is a vampire so the item I want to give him is an umbrella so he wont burn in the sun. However, since it is a large sprite, I want it to be able to "change actor graphic", so his sprite will change to the umbrella holding spritesheet I created for this specifically. I know you can only equip/un-equip armor, but armor doesn't seem to have an option to change actor graphic. (I really don't like the "Equipment" window's UI anyways...)(With the item I changed the effect to common event, which I have set to change actor's graphic.)

Is there an option to unequip or "put away" item? It's important that it's something that can be used in a conditional branch, because I have it set if he walks with the umbrella in the sun he won't get burned, but otherwise he will.

Thank you! :)
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
39,141
Reaction score
12,415
First Language
English
Primarily Uses
RMMV
You can't equip items ... not sure if there's a script out there that might allow it?

One option might be to have two Umbrella items. Call one "Umbrella" and give it to the player when they obtain the item. Call the other "Put away Umbrella". Set them both to be consumable, and attach a (different) common event to each.

On the "Umbrella" common event, change the sprite to the one with the umbrella, turn on a switch to say the umbrella is in use (this is what you can use in your conditional branch), and give the player a "Put away Umbrella" item.

On the "Put away Umbrella" common event, change the sprite to the one without the umbrella, turn the switch off, and give the player an "Umbrella" item.

This means the "Umbrella" item will only be available after it's been initially obtained, and while it isn't being used. The "Put away Umbrella" item will only be available when the umbrella is being used.



The alternative, which would allow you to use the umbrella as equipment, is to add the following tiny script:

Code:
class Scene_Menu < Scene_MenuBase
  def return_scene
    $game_switches[1] = true
    SceneManager.return
  end
end
change the 1 to an available switch, and add a parallel process common event conditioned by that switch. This will turn the switch on when the player returns to the map after being in the menu. So add to the common event any commands you want (if player has umbrella equipped, change sprite to umbrella sprite, else change sprite to no umbrella sprite), and then turn the switch off so it only runs once.
 
Last edited:

whotfisjojo

Swallow the Green Goo? >Yyeesss >NO!!!
Member
Joined
Jun 5, 2019
Messages
25
Reaction score
6
First Language
English
Primarily Uses
RMVXA
Wow, I feel like so stupid for not realizing that first! Crazy easy!

Since it was a consumable, I was confused at first why it still burned when he walked in the sun, but then I realized that all he had in his inventory was "put away umbrella" which meant that I could set the conditional branch for the sunburn to "put away umbrella" instead of "umbrella" to null the sunburn while the umbrella was out!

Amazing! Thank you so much! :) <3 <3

Edit: Solved!
 
Last edited:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
39,141
Reaction score
12,415
First Language
English
Primarily Uses
RMMV
It doesn't have to be consumable. You could set it to not consumable, then in your events when you give the other item, take this item away. I only said to make it consumable to remove the need for that one extra step in each event.

just report your first post to the mods and let them know it's solved, and they'll close the thread for you.
 

mlogan

Global Moderators
Global Mod
Joined
Mar 18, 2012
Messages
14,648
Reaction score
8,077
First Language
English
Primarily Uses
RMMV

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

 
Status
Not open for further replies.

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

Latest Threads

Latest Posts

Latest Profile Posts

My spirit can be so easily wounded by most things that nobody thinks twice about. It may be not a big deal to you, but it means EVERYTHING to me!
I have to make a custom tree for my FSM game and I'm nervous I won't get it right.
Finally got the tablet picture! :LZSsmile:
Working hard on my Mode7 interiors in between calls at work!
A good idea rise a moment before falling asleep, and survive the second coffee the day next morning.

Forum statistics

Threads
97,918
Messages
947,871
Members
129,163
Latest member
Merglu
Top