Starting event with one tile between it and the player?

Is there a way to action button an event while the actor is one tile away from it?

I need this to light torches
Can you provide a picture of what is "one tile away"?
yes I a can.

Spoiler
Naamloos.jpg
The light above the player is 1 tile away from the player.
You could add the lamp as an event and have another event to trigger the changes you want for the torch. I'm sure there are other ways to fix this but that's how I would have done it 😛

It works by using the counter passage settings, but I'm not sure if you want that for a wall 🙂
What about trying this trick out.. you need two events (One event in the middle and One event with two tabs inside it for on / off graphics of the light) and one switch (it will be used to turn on the light graphic):

Spoiler
[IMG]http://i702.photobucket.com/albums/ww25/emperor24/qhelp4_zpsd418f58f.jpg[/IMG]
For the middle event, turn on the control switch (make one if you don't have it yet) called "Light on" (name of my switch). If you want to be able to put out the flame after turning it on, you can use this example below with a conditional branch in it:

Spoiler
[IMG]http://i702.photobucket.com/albums/ww25/emperor24/qhelp_zps0dfdecc8.jpg[/IMG]
For the light event, make two tabs and make the first tab show a "light off" graphic. In the next tab, make it conditional only if the "light on" switch is on:

Spoiler
[IMG]http://i702.photobucket.com/albums/ww25/emperor24/qhelp2_zps5477407d.jpg[/IMG]

[IMG]http://i702.photobucket.com/albums/ww25/emperor24/qhelp3_zpsbededc82.jpg[/IMG]
You don't have to copy this exactly, do anything you want to it, It just serves as a basic template on creating an event that triggers an event farther away.

Edit: Dark_Meta beat me on my post xD
@Aeri_Sicher I wouldn't say I beat you to it since your post was way more informative than mine. I would go with your post over mine any day 😀
Thank you. Now arises a new problem. When I light a torch they all go on.

I can make more then 50 different switches for the other torches, but thats a bit much.

is there a way to just lit up the closest one to the player?
You can use script calls to turn on or off self-switches in certain events

$game_self_switches[[@map_id, 4, "A"]] = trueThis will turn ON event 4's self-switch "A" on the current map.Or use bit switches

http://himeworks.wordpress.com/2013/06/07/bit-switches/

In combination with custom page conditions

http://himeworks.wordpress.com/2013/03/23/event-page-conditions/
Thank you. Now arises a new problem. When I light a torch they all go on.

I can make more then 50 different switches for the other torches, but thats a bit much.

is there a way to just lit up the closest one to the player?
Then you can use a variable instead. Instead of using a switch add a variable and make the first event add a +1 to it. Set a conditional branch on every torch event with the first one having the condition to variable(x) = 1, and then follow all of them up with =2, =3 etc, etc. Just make sure that the event that you are interacting with is adding a +1 to the variable that you are using,

Edit: Or you can follow Hime's suggestions, that works too 🙂

Also, I realised that my suggestion won't work that well if you don't want the torches to be lit in a specifc order. Using script calls for the self-switches would be a much better idea.
Thank you. Now arises a new problem. When I light a torch they all go on.


I can make more then 50 different switches for the other torches, but thats a bit much.


is there a way to just lit up the closest one to the player?
If you have that many torches on a map, then you might consider the option Dark_Metamorphosis only hinted at in post #4: The counter flag
That would also prevent lag.


You need to redefine your tileset, so that there are two identical wall tile pictures for the wall you use for the torches.


Then define one of them with the counter flag from tileset definition, and place that "counter" wall below each and every torch on the map.


Counter-Tiles extend the reach of the action button, allowing you to trigger the torch event from one tile distance - if that tile between the player and the event is a counter tile.


Then use a self-switch for every torch event and get rid of the additional events between the torches and the player.
Dark_Meta,

thats right. when ya lit the torches in the dungeon and ya decide to pass one, then it will no longer work with a variable thats doing +1 everytime. Also, when the player goes to the right and the counting is to the left then there also is there that same problem.

Tsukihime,

I was looking at those bit switches but my english is not that good to understand it fully. Allthough I think that will solve my problem.

What is this Bitmask table? Do I need to add all my torches with the responding bits? You have two doors and a gate in this table, do I need to add like 50 torches with there responding bit number?

The picture with the code and the girl saying "wow 500 switches!" that I understand, there you set the bit switch to "500". What the "1" is, I have no idea. the "true" is that its set to 500

The tutorial is not helping and confuses me. Its allready complicated stuff and setting 3 lamps in a certain order is not helping me with my criple english. 🙁

So what do I add, in the Bitmask table?

Edit.

Andar I just saw your answer after I posted this above the edit.

What is a counter tile? I understand that I have to alter the tileset, so I have two the same wall tiles, but how do I set a countertile?
Andar I just saw your answer after I posted this above the edit.

What is a counter tile? I understand that I have to alter the tileset, so I have two the same wall tiles, but how do I set a countertile?
You set that by going into your database and pick 'tilesets'. To the right side you have different tabs, and one of them is called 'counter'. If you press that one and then click on the tile that you want to use (the duplicate of that wall tile), the tile will work as a counter tile. By doing this, it will let you activate events that's 1 tile away from the player.
Thank you Andar and Dark_Meta. This is working. 🙂
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/starting-event-with-one-tile-between-it-and-the-player.18233/