# Couple of Questions

**URL:** <https://forum.kirupa.com/t/couple-of-questions/106451>\
**Category:** Uncategorized\
**Created:** [April 6, 2004, 1:23am UTC](https://forum.kirupa.com/t/couple-of-questions/106451 "2004-04-06T01:23:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Xeogears13](https://avatars.discourse-cdn.com/v4/letter/x/6bbea6/32.png) [@Xeogears13](https://forum.kirupa.com/u/Xeogears13)\
**Post date:** [April 6, 2004, 1:23am UTC](https://forum.kirupa.com/t/couple-of-questions/106451/1 "2004-04-06T01:23:23Z")

</div>

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

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

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [April 6, 2004, 2:59pm UTC](https://forum.kirupa.com/t/couple-of-questions/106451/2 "2004-04-06T14:59:58Z")

</div>

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:

```auto

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:

```auto

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
