Couple of Questions

I’m in the process of making my first RPG game, it’s a Harry Potter RPG :wink:

Couple o’ Questions:

  1. The game is tile based, is there a way I can get it so when the ‘sprite’ walks on to a certain tile, a text box appears, or a sound, or make it go to a another frame?

  2. Make it so when I step on a tile I gain a weapon, like, say if i step on tile (5,6) i get the ability to shoot things with the ‘A’ key? And so on untill I have the ability to shoot like 10 different things?

Thanks for any help you can give!
-Bob

It is very possible, in fact, that’s how most RPGs work…
I would think of it like this… imagine your game to have different layers… you’ve got the first layer, which is what the environment looks like, so you could make a matrix to determine which tiles will be displayed.
example:


1=Grass, 2=water, 3=building, 4= Doorway
3,3,3,3,3,3,3,3,1,1,1,1,2,2,2,2
3,3,3,3,3,3,3,3,1,1,1,1,1,2,2,2
3,3,3,3,3,3,3,3,1,1,1,1,1,1,1,2
1,1,1,1,3,4,4,3,1,1,1,1,1,1,1,1
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1

This should be soley for visual purposes.
Then there is your second layer, which has all your item/object/hotspot info.
You should have each item in the grid have its own ID number:


0=Empty, 1=Unpassable, 2=Water, 3=Door to inside building, 4=Chest with potions, 5=Event Starts when character steps here, 6=Chest with money
1,1,1,1,1,1,1,1,0,0,0,0,2,2,2,2
1,1,1,1,1,1,1,1,0,0,0,0,0,2,2,2
1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,2
4,0,0,0,1,3,3,1,0,0,0,0,0,0,0,0
0,0,0,0,0,0,0,5,5,5,0,0,0,0,0,0
0,0,0,0,0,0,0,5,5,5,0,0,0,0,6,0
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0

You can really go as deep as you want with layers, but this is generally how I would do it