How to use an item to trigger an event

IndigoSwift

Warper
Member
Joined
Jul 7, 2020
Messages
4
Reaction score
0
First Language
English
Primarily Uses
RMMV

I want to make it so if you use a fishing rod, it will 'fish up' the hanging shield and be put into the character's inventory, and if possible figure out how to put animation on it! I'm new to MV and google isn't helping me out
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
39,660
Reaction score
13,270
First Language
English
Primarily Uses
RMMV
How will you "use" the fishing rod? What is in the event?

You could either attach a common event to your fishing rod item, so it can be used from the menu. In the common event, you will use Control Variables to get the current map, player's X and Y coordinates and direction. Then you would check all of those to make sure the player is where they should be, and if all are correct, add the shield to inventory and remove from the map.

Or you could make your event use Select Key Item and make the fishing rod a key item. That would be less hassle than all the variable checks, but it would make it more obvious that the fishing rod is meant to be used here, especially if you don't have many items tagged as key items.

To animate the shield, you would need to remove it from the map and put it in an event instead. You'd have to make 4 frames, each with the shield in a different position and the rope a bit shorter. Take a look at the character sprites for the doors - see how each one is a little more open than the last (going down, not across)? You'd have to do it like that. Then to animate the shield being pulled up, make the event go through the same movement route as the doors in the quick event - turn left, wait 2 frames, turn right, wait 2 frames, turn up, wait 2 frames, turn on a switch which makes the event go to a new page without a sprite.
 

IndigoSwift

Warper
Member
Joined
Jul 7, 2020
Messages
4
Reaction score
0
First Language
English
Primarily Uses
RMMV
Ahh I see, your first suggestion might be the better choice. Could you go into more detail to how I can use a control variable, etc etc? I'm so sorry I'm still learning all of this^^'
 

ATT_Turan

Veteran
Veteran
Joined
Jul 2, 2014
Messages
74
Reaction score
27
First Language
English
Ahh I see, your first suggestion might be the better choice. Could you go into more detail to how I can use a control variable, etc etc? I'm so sorry I'm still learning all of this^^'
If you look up some tutorials, (e.g. Google "RPG Maker MV event tutorial) you'll find a lot of written posts and YouTube videos that will give you helpful information. Using RPG Maker is going to require you to do quite a bit of learning and work, so it's good to learn how to find the information you need.

As far as setting variables to the player's map coordinates, again you'll find preexisting posts if you look for "RPG Maker MV get player position" (that auto-filled in Google for me).
 

IndigoSwift

Warper
Member
Joined
Jul 7, 2020
Messages
4
Reaction score
0
First Language
English
Primarily Uses
RMMV
If you look up some tutorials, (e.g. Google "RPG Maker MV event tutorial) you'll find a lot of written posts and YouTube videos that will give you helpful information. Using RPG Maker is going to require you to do quite a bit of learning and work, so it's good to learn how to find the information you need.
Ah yea I figured, though I did many searches and just came up dry, but I figured to come to the forums for a last resort.
 

ATT_Turan

Veteran
Veteran
Joined
Jul 2, 2014
Messages
74
Reaction score
27
First Language
English
Ah yea I figured, though I did many searches and just came up dry, but I figured to come to the forums for a last resort.
I wasn't criticizing you for asking your original question! Just suggesting that once you've gotten an answer, you can find information on how to implement that if you don't already know.
 

Sopo201

Villager
Member
Joined
Jul 5, 2013
Messages
20
Reaction score
5
First Language
English
Primarily Uses
RMVXA
In the common event, you'd use the "Control Variables" command, which will bring up a new window. To make a new variable and set it to something (in my example, we'll set it to the player's current X position), start by clicking the box that says "0001". You can then choose any slot you'd like that variable to be stored in, and give it a name. For something like this, I would just name it "PlayerMapX".

After you do that, make sure the operation is "Set". Finally, the operand will be Game Data > Character > Player's Map X.

This will make it so that whenever the common event is ran, the player's current X position will be stored in that variable. If you do the same thing for their Y value, you could then use those two variables in a conditional branch which checks to make sure the player is in the right spot.

Obviously, this won't fully get you your fishing animation yet- this was just an example of how I would get the player's coordinates.
 

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

Latest Threads

Latest Profile Posts

So I just spent the weekend...playing my own game. The one I released last year. Yep you heard that right.
Goal for MZ? None... I'm still curious how to finish my VXA project and how it looks like when it actually finished. Which will take at least another two years. Coming late again to the party.
Finding it amusing that people are posting support questions in new threads for an engine that isn't even released yet. Touch and Archeia are the only ones authorised to say anything, and there's only one active thread where they'll be answering questions.
I think my goal for MZ ... is to actually release a game and not have twenty technical demos and debugging projects. Let's see if I can manage that. ;o
I am starting to enjoy writing. I never thought I would enjoy it since my dyslexia was holding me back so much.
Thanks to the community here :)
For those interested chapter 2 and 3 are available to read here:

Forum statistics

Threads
100,652
Messages
978,096
Members
132,261
Latest member
DarthNinjus
Top