Site hosted by Angelfire.com: Build your free website today!
============COMMON EVENTS and ITEMS=================by Gemin-eye=========Tutorial #2
 
Did you all try Dons sample game in the 1.03 version of rm2k yet?
Did you notice the map and compass? (I'm sure you did).
How did he do it? I'll tell you and listen up cutter cause it's damn important. 
 
You will need to Import two pictures from the SAMPLE game to your game.
 They are located in the Pictures folder of the sample game; and you must
 inport them to the Pictures folder of your game. Click the IMPORT/EXPORT
 icon on the top toolbar (the 15th icon from the left - the one beside the
 music note icon), This openbs the Raw Materials Settings dialog. Click
 the folder called 'Pictures' from the list on the left. Then click the
 'Import' button (top right). Nagavate to the SAMPLE games Pictures
 folder and click the png file named 'map'. The dir is likely
 C:\rpg2000\Projects\Sample\Picture. Find it, import it, and move on.
 Do the same with the compass, it's called 'pos' in the sample game
 folder. Now both will appear in your pictures folder as you will see below.
 
First we need to make the map and compass. We do this in the Game Database.
  Open up your rm2k proggy and your game and press F8.
 Then click on the 3rd Tab named "ITEMS".
 
1. Scroll down to a blank line in the Items/Weapons list (you may need
 to adjust the 'Max Field Number") and click it. In the: 'Name' field type - Map, 
'Classification' - select "Switch", 
'Price' - put the amount in coins it will cost, 
'Use Number of Times' - select Limitless. 
'Explanation' - Map, 
'ON Switch' - Make a switch called: " Map ", (you do know how to make
 switches right? if not look for my other tutorial)
'Available at' - check Field.
 
Now make a Compass item. 
'Name' - compass, 
Classification "Unique",
Price"whatever", 
Use Number of times "Limitless", 
Explanation "Compass", 
Invoke Tech Skill, "unnecessary" 
Use message select "Common Item"
 
2. Click the last Tab called "COMMON EVENTS". 
 
3. Click the 0001 switch (or any available switch) from the Common Events
 box on the left. In the :
'Name' field type - Show Map,
'Event Start Condition" - select "Parallel Process",
'Appearance Conditions Switch' - put a check in the box and select the 
 "Map" switch we just made.
 
4. Now click the 0002 switch (or any available switch) from the Common 
Events box on the left. In the:
'Name' field type - show/hide map,
'Event Start Condition" - select "Parallel Process",
'Appearance Conditions Switch' - put a check in the box and make a new 
switch called: " show/hide map "
'EVENT COMMANDS'
 
double click in this window to open the Event Commands dialog. Select 
"Show Picture" (page 2).
The 'Pic Number' will be 1,
'Select Picture' - select the map from the list of available pictures,
 (if you didnt import them, they wont be here)
'Show Pos(centre coord)' - Select Direction X: 50, Y: 50 (x =horizontal,
 y=vertical, imagine a cross, the lower the numbers
 are; the closer to the top left corner it will be.)
Note: Experiment with this later to get the hang of it.
'Magnification' - 100% (thats the full size of the picture)
'Transparency' - make it 45%, (the higher the % the less visible it is)
'Transparency Color' - select "Stir" (This means the entire
 image will be transparent).
'Other Attribute display' - leave as is. (this is used to 
adjust the tones of the picture)
Click 'OK'
 
5. Open the Event Commands dialog again and select "Fork Conditions", (page 3).
Make the first page of this with nothing selected.
 Click to the 2nd page. Put a dot in the "Item" and select
 the Compass. Click the box after it and select "Has it". Click 'OK'
 
6. Under the <>Fork Optn:Compass Have (hold):
double click and select 
"Show Picture" - 
'Pic Number' = 2 (map is 1), 
'Select Picture' - pos, 
'Show Pos(Center Coord) - Select the 'By Variable' and just like
a switch make and name 2 new Variables (click the [...] buttons)
 an X and a Y. (name them " pos and pos2 ")
'Magnification' - 100%
'Transparency' - 50% 
'Transparency Color' - Stir
Click 'OK'
 ----=Quicky Variable lesson=----
Variables store numbers, you decide what those numbers are and how
 they are used, in this case we will use them to determine where 
on the Map picture the Compass will appear. We are using the variables
 to get the X and Y coordinates. Throughout the game we will 
need to change these variables to suit where in the world map
 the char is. You use an event to do this. "Change Variable" (page1). Very simple. 
=----end quicky variable lesson----=
 
7. Open the Event Commands dialog and select "Wait" (page2)
 set it for 5 (which is 0.5 seconds)
 
8. Open the Event Commands dialog and select "Erase Picture" 
(page2) - Select 2 (this is the compass pic)
 
9. Repeat step 7.
------Because of the 'Parallel Process' this will make the compass 
blink on and off (any ideas pop into your head yet for cool map stuff? : ])
 
10. Go back to your 0001:Show Map switch. In the Event Commands 
box double click and add the following:
'Erase Picture' - (page2) The map pic (1)
'Erase Picture' - The compass pic (2)
'Change Switch' - 'Show/hide map' IMPORTANT: select 'ON/OFF Trigger'.
'Change Switch' - 'Map' select 'OFF'
 
And thats it. When you give the player the compass, add a
 'Change Variable' commands (the pos and pos2 [X&Y vars] to
 show the compass on the part of the map they are on. 
(Understand?) Now when the player gets the Map and Compass,
 and goes to their inventory to turn it on:
 
(1). The Map switch turns on, thus (2) turning on the
 Common Event Show Map, which in turn (3) executes
 the Show/hide map switch, and depending on weither or not it 
was on sreen or not, the map 'n compass will appear, or disappear.
 Cool huh. (Thanks Don for showing me how to do that). 
Go over this tutorial until you totally understand how to 
call common events with an item. Try to make a different 
item and get it to work when the player selects it from their 
inventory. I made an Invisibility Cloak : ] See what you can make.
 
I made another tutorial called " SWITCHES and TIMERS How To "
 check it out if you have probs with either of them, It also 
explains message boxes to some degree. Hope this helps you. Later...