Gw Temp

Menu

Tutorial - 'Item Giving Puzzles' by Guest

An item about RPGMaker 2000 posted on

Blurb

A tutorial on "Item Giving Puzzles?" Sure!

Body

Hello, if you happen to be reading this, then happy day! You use RPGMaker and are willing to read whatever crap I managed to put here. This is my first time doing a tutorial, or an actual writing of some sort in which I am showing to several people. Now, while using RPGmaker, have you ever wanted to have a kind of puzzle in which you could use an item and have an event activate after doing so? That’s all fine and dandy, but due to the default ways of RPGMaker, simply making a switch item won’t make using the item very puzzle-like. Activating the item on the particular map eliminates the whole purpose of trying to find where exactly on the map you had to use the item, to make it more realistic and puzzle-ish. So here, I’m going to explain how to make RPGMaker recognize where you are standing when using the item, and activate the event if the hero is standing close enough to it.

KNOWLEDGE NEEDED:
Switches
Variables
Hero X and Y Coordinates

Ok, first open up the database and select the ITEMS tab. Create a new item (I called the item, ‘Item’. But you may call it whatever you wish. Same goes for the name of the variables and switches) Make it a switch item, and put the uses to unlimited, that way, when used, you won’t lose the item. Make a new switch, call it ‘Item Use’, as for when you use the item obviously. Now go to the COMMON EVENTS tab and select an empty cell. Call the common event the name in which you gave to the item we made before. (I called it, ‘Item’.) Make it a parallel process, and choose the button to select a switch prior to its activation. Choose the switch we made earlier, ‘Item Use’. Now in the events box, put in the following and I will explain it afterwards:

< > Branch: Switch [Item Use] is ON
< > Variable Oper: [Hero X] Set, Hero’s X coord
< > Variable Oper: [Hero Y] Set, Hero’s Y coord
< > Switch Operation: [Item Use] OFF
< > Switch Operation: [Item Give] ON
< >
: End
< > Switch Operation: [Item Use] OFF
< >

Obviously you will need to make another switch called ‘Item Give’ and 2 variables called, ‘Hero X’ and ‘Hero Y’. First the event is turned on by the use of the item, the branch checks to see if the switch ‘Item Use’ is activated, and then sets the X and Y coordinates of the Hero into the variables. Then finally turning on the switch ‘Item Give’ and turning off ‘Item Use’.

Now for the last part, go to the map in which you want the item to be used. Switch to event editor mode, and select the tile in which you are going to place the event. Now, on the bottom right of the screen, there should be something displayed like: The name of the map followed by (numbers),(numbers) then the name of the event (if there is an event there). The numbers displayed there are the coordinates for that tile of the map. The first number is the, ‘X coordinate’ and the second number is the, ‘Y coordinate’. Put that on hold now, since you first need to make an event that lets you obtain the item. Do whatever you want for this part, just make it simple that the hero can get the item needed to perform this puzzle.

Next create the actual event in which you will use the item near. The coordinates for MY event I placed on the map was (008),(008). Give it a graphic, make it an action key and same level as hero. Make sure it is STATIONARY and DOES NOT MOVE. Be aware that this tutorial will not work for events that are intended to walk around randomly or by a specific route. Make the event say a message when activated by the action key such as something like: ‘Hello I need a ‘Item’, can you spare one?’ Then make a second page in the event, make all the options the same as the last page but make this one activated by the, ‘Item Give’ switch, and let it be an Auto-Start. Now, remember the X and Y coordinates of the event I told you about? Well select the tiles around the event (up from the event, down from the event, to the left of the event, to the right of the event) and write down all the different numbers for the X’s and Y’s. My example, as to where my event is on the map, I have the numbers 7, 8 and 9 used for X’s around the event. As well as that, I have 7, 8 and 9 for the Y’s around the event. Make sure you check the coordinates around YOUR event, because it will not work if you simply use MY variable coordinates. So, I listed the branches for my variable coordinates from least to greatest in the following example, I suggest you do the same as to keep things orderly. And whenever you see the numbers of my X and Y coordinates, make sure to switch them with your own. So, put the following into the events box:

< > Variable Oper: [Hero X] Set, Hero’s X coord
< > Variable Oper: [Hero Y] Set, Hero’s Y coord
< > Branch: Var [Hero X] is 7
< > Branch: Var [Hero Y] is 7
< > Message: Thank You!
< > Change Items: Item 1 remove
< > Switch Operation: [Item has been given] ON
< >
: End
< > Branch: Var [Hero Y] is 8
< > Message: Thank You!
< > Change Items: Item 1 remove
< > Switch Operation: [Item has been given] ON
< >
: End
< > Branch: Var [Hero Y] is 9
< > Message: Thank You!
< > Change Items: Item 1 remove
< > Switch Operation: [Item has been given] ON
< >
: End
< >
: End
< > Branch: Var [Hero X] is 8
< > Branch: Var [Hero Y] is 7
< > Message: Thank You!
< > Change Items: Item 1 remove
< > Switch Operation: [Item has been given] ON
< >
: End
< > Branch: Var [Hero Y] is 8
< > Message: Thank You!
< > Change Items: Item 1 remove
< > Switch Operation: [Item has been given] ON
< >
: End
< > Branch: Var [Hero Y] is 9
< > Message: Thank You!
< > Change Items: Item 1 remove
< > Switch Operation: [Item has been given] ON
< >
: End
< >
: End
< > Branch: Var [Hero X] is 9
< > Branch: Var [Hero Y] is 7
< > Message: Thank You!
< > Change Items: Item 1 remove
< > Switch Operation: [Item has been given] ON
< >
: End
< > Branch: Var [Hero Y] is 8
< > Message: Thank You!
< > Change Items: Item 1 remove
< > Switch Operation: [Item has been given] ON
< >
: End
< > Branch: Var [Hero Y] is 9
< > Message: Thank You!
< > Change Items: Item 1 remove
< > Switch Operation: [Item has been given] ON
< >
: End
< >
: End
< > Switch Operation: [Item Give] OFF
< >

Ok lastly make another page and make the page be activated by the switch ‘Item has been given’. After that make it say a message like, “thanks for the item.’ Or something similar.
Now let me explain a little about the script just a second ago. When you use the item, it activates that page in the event. The events on that page check to see if the hero is standing on any tiles that surround the event, if the hero is not, the event is turned off, and the item remains in the inventory. But if the hero is standing on a close enough tile, the further events are activated, such as losing the item and receiving the ‘Thank You!’ message. Thus afterwards when talking to the event again, he says thanks again. There you have it, a simple tut on how to be more strategic with items. Remember that this will only work for events that are meant NOT to move, it will not work for events that walk around. Make sure to credit me if you can in your game if you happen to use this tut. Whether you remember my name or not I still want credit. Thank you and bye!

Written by: Thunderdraco