Assigning Events to Tiles

Joined
Nov 17, 2013
Messages
3
Reaction score
0
First Language
English
Primarily Uses
Hello.

I was wondering if there was a way to assign a series of events to a specific tile on a tile set. I've tried using region ids and the get location info, but the problem is I want the event to happen upon an action button with the tile, since you can't actually walk on the tile.

Thanks.
 

Acetonide

Event Coordinator
Veteran
Joined
Apr 16, 2012
Messages
660
Reaction score
31
First Language
English
Primarily Uses
N/A
I cannot find you the exact code right now (because I don't have RMVXA in front of me and I don't remember it off the top of my head, I apologize) but if you skim through the scripts (the ones already in the engine I mean, not scripts someone else wrote) you should be able to find a way to check the region ID and terrain ID (I think, and probably Tile ID too but that's more work) in front of the player. It should be [sOMETHING](x, y, direction).. 

If you combine that with a conditional branch to check if the action button is pressed "Input.press?:)C)" you should be able to accomplish this. If you can't find it I'm sure someone else can find it and post it here.

Good luck.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
Put your event on 'same as characters' level and set it to Player Touch. That SHOULD allow the player to trigger it by walking up to the tile next to it and facing it. Or if you REALLY want them to press space/enter, leave it set to Action Button.


I also wrote a Region Common Events script that will allow you to draw a region on a map, assign a common event, and have that common event run when the player is ON a tile with that region, or FACING a tile with that region (you say which when you set it up).
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
Did it work?
 
Joined
Nov 17, 2013
Messages
3
Reaction score
0
First Language
English
Primarily Uses
No, sorry. You see, what I would like is for the player to pick up some planks (an event which adds an item to your inventory and erases itself), and then be able to use the planks to bridge a gap (tile). I've tried it with events, but I could only make the player go Through, even when not on the plank. I am completely stuck.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,357
Reaction score
7,671
First Language
German
Primarily Uses
RMMV
you'll have to do that in another way, because event's can't change passability of the maps that easy...

One way would be to use a tileswap-script, changing the tile to a bridge while using up one of the planks

Another way would be to make the bridge as part of the original map, and have events with the water tile blocking the path (same as player), disabling those "water"-Events (thereby revealing the bridge below) when using the planks there.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
I use events to place a bridge and let the player go over water in my game. Thing is, the tiles for the bridge are ON the tileset, not on a character sheet.


When checking passability, $game_map DOES look at events with tiles from the tileset.
 

izanamikun

Veteran
Veteran
Joined
Nov 19, 2013
Messages
34
Reaction score
1
First Language
English
Primarily Uses
As long as the tiles aren't on tileset A, you should be able to choose them in the same place you would choose a sprite sheet. They will be all the way at the bottom.

How many places do you use this unpassable tile? If you only plan to use it in the one place, just change the passability in the Database under the Tilesets tab. If you use it other places, then just use the tile as if it were a sprite sheet like I mentioned on the event itself. Like I said, as long as it's not any part of Tab A, it should show up at the bottom of the list.

*I would post a picture to show you what I mean, but it seems I cannot post the file extension .png or .gif... so you'll have to just see it for yourself.
 

Acetonide

Event Coordinator
Veteran
Joined
Apr 16, 2012
Messages
660
Reaction score
31
First Language
English
Primarily Uses
N/A
No, sorry. You see, what I would like is for the player to pick up some planks (an event which adds an item to your inventory and erases itself), and then be able to use the planks to bridge a gap (tile). I've tried it with events, but I could only make the player go Through, even when not on the plank. I am completely stuck.
I apologize, based on your original post I misinterpreted what you wanted to do.

Hopefully I have it right this time.

Based on what you said here, this sounds like the simplest solution to me. If it won't work please let us know why.

1. Build your bridge completed using the normal tile system.

2. Create an event with a graphic set as a hole/the broken part of the bridge, set it as same as player.

3. For that event make sure it's set to action button. Then make a conditional branch checking for the item in the player's inventory (say, the planks you wanted). When it's true you can remove the plank item from the inventory && erase the event (if it's a permanent fix then I'd recommend self switches). If you use self switches, make sure the player can pass the event afterwards.

4. Make an event for your wooden planks, set with the image for the planks as the graphic, and same as player. As you said, you can make it add the item to the player's inventory, and make sure to erase the event after..

This should accomplish what you said in the easiest way, and if you don't use a switch (but instead a self-switch or something) you should be able to just copy && paste these events if you need to reuse them. 

P.S. I forgot to add, if you're using a character set instead of a tileset for the event images make sure you set it as direction fixed.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:

Forum statistics

Threads
105,854
Messages
1,016,998
Members
137,562
Latest member
tamedeathman
Top