How to make invisible path glow when stepping?

I'm trying out an idea I have. There's an invisible path the player can walk on. The tile shines and is suppose to stay or disappear. (Either is fine with me) But if they fall off this resets.

Now, I'm using variables because I think this will work with variables. I set an event to below player along the hidden path that changes the variable to a a set number, when the player walks across. The second page has a page condition where the variable is greater than or equal too, and that page shows the graphic of the shining tile. (With no graphic on the first page. In this way the event changes image without switch or self switches)

The idea is when the player "falls off" the path is reset. Which I guess has something to do with resetting the variable so the brighten path will no longer show.

My problem is all the tiles display when walked on. Because of the second page condition if variable is greater than or equal too.
How can this even be done? Can it be done?

Thanks in advance! ♥

Edit: I already have a parallel event using a timer for this event. So I'm worried adding another parallel will cause problems and shouldn't be done...
you can use a variable, but also switches. (switch is better),

place invisable tile (page 1), below characters) and player touch.
SelfSwitch A is ON

page 2 can be tricky (can be timed based (parallel) and below characters.
wait 300 frames
SelfSwitch A is OFF (turn off the light)

but you need to have some check here, if player stays, return to start position
and lose health, not exacly know how to accomplish this one exacly.
need to dig into it.

this is the base for turning on and off, but there should be a way to turn on
and turn off after the player leaves it, which might need a scriptcall to see
if the player is on it, and when not.
If possible, I recommend using "equal to" rather than "Greater than or equal to", because this way you can precisely control which tile is activating when they are stepped on. In the case of the player falling off, you will need a reset method to set the walked on tiles back to their original state.

I'm not exactly sure how you have this set up, but if the player is teleported back in the event of falling off, you can simply add a line in the event that resets the variables that the tiles are working with once the screen fades out, if it does fade out that is. That way, the tiles will go back to invisible smoothly blended with the transition of being teleported back to the starting point.

Whether you are using a single variable to control all of the tiles or you are using an individual variable for each tile will determine how many reset variable lines you will need in each reset event though, which can be a lot of clicking. It would be the same story if you were using switches. If you are using a single variable to control all of the tiles, it will only be one added variable reset, which will be nice and easy, but if you are indeed using a single variable to control all of the tiles, then you will have to stick to using the "greater than or equal to" condition rather than "equal to", unless you don't want the already walked on tiles to stay lit.

This is all based off of assumption, however. You may not have this set up like the way I imagine it at all, and this can all be a bunch of mumbo-jumbo to you. If that's the case, I recommend giving some more detail about how exactly the process is being handled so that we may assist you better in solving this problem.
I think you got the basic idea with variables, you need to set events on the tiles surrounding the path as well, make an event that changes the variable to 0, thus erasing the path. You will have to make different events at the ends depending if you want the path to remain at the end points or not.

(I would use common events and Yanfly's Region Events to make it easier, but not needed)

Also, awesome idea! Let me know how it turns out!
Simpler: Third page on every event that "turns off the light" when the variable is above the next number in line.
You were on the right path thinking of variables as "on conditions" but people forget they can be used for "off conditions" too.

So shiny block 1 will have 3 pages:

PAGE A:
nothing
PAGE B: If variable=1
shiny
Page C: If variable=2
nothing again

Which in turn variable 2 will light up the next block
EVENT2
PAGE A:
nothing
PAGE B: If variable=2
shiny
Page C: If variable=3
nothing again

Var 3 next block, repeat as needed.

On player fall and reset= set variable to 0, it will set every other event back to Page 1.
@BK-tdm Much simpler and a better idea!



but BK has probably 1 downside though, what if the player turns back?
it won't light up unless you start with a high number variable and -1 for the next tile.

there are couple of ways to accomplish it though, but the best way is way that fit
the most in your mechanic, together with other events 🙂
but BK has probably 1 downside though, what if the player turns back?
it won't light up unless you start with a high number variable and -1 for the next tile.

there are couple of ways to accomplish it though, but the best way is way that fit
the most in your mechanic, together with other events 🙂

The OP mentioned "falling and resetting" which means the player taking a wrong direction, including backtracking, plus the fact the OP wants the previous path to dissapear reinforces this fact or else his/her first approach would suffice (leaving the whole path on as you traverse).

If this is not the case then simply using my approach removing the 3rd page keeps the previous road lit and would turn all off on a variable reset.
Simpler: Third page on every event that "turns off the light" when the variable is above the next number in line.
You were on the right path thinking of variables as "on conditions" but people forget they can be used for "off conditions" too.

So shiny block 1 will have 3 pages:

PAGE A:
nothing
PAGE B: If variable=1
shiny
Page C: If variable=2
nothing again

Which in turn variable 2 will light up the next block
EVENT2
PAGE A:
nothing
PAGE B: If variable=2
shiny
Page C: If variable=3
nothing again

Var 3 next block, repeat as needed.

On player fall and reset= set variable to 0, it will set every other event back to Page 1.


Page conditions only give me the option for "greater than or equal to" when checking for variables. So if page A is nothing, I assume I am setting self switches? Otherwise I don't see how the first page will switch to the second page.

Actually, I'm not sure which page displays first if none of them even has page conditions. o-o
Map event pages are checked from highest to lowest (e.g. 3 -> 2 -> 1): the first one whose conditions are met is the one that becomes active. A page must have all its conditions met in order to become active. An event will be hidden/inactive if none of its pages have their conditions met. Page conditions are checked whenever a possible condition changes, e.g. when a switch is turned on/off, or a variable changes value.

MV only offers ≥ for its variable page condition. However, since variables only store whole numbers by default, you can use two pages to check for a particular value: "≥ X" -> "≥ X+1".

So you can do as suggested, e.g. the first step could have page conditions:
  1. (None), "inactive" state;
  2. Variable ≥ 1, "active/shiny" state;
  3. Variable ≥ 2, "inactive" state.
Page 1 could give +1 to the variable when the player walks onto it.
Page 2 is just for show (shiny!).
Page 3 hides the event after walking to the next correct step of the bridge.

(This assumes the variable resets to 0 when making a mistake.)
@caethyril you ninja'ed me, was about to type the first page part,
but you explained it nice than I would (short and to the point) 🙂
I am trying to use BK-tdm event set up, but when I walk on the tile, the variable won't add +1.

Page 1

◆Control Variables:#0092 Hidden tile += 1

Page 2 (with shiny tile graphic)
◆If:Hidden tile = 1
◆
:End

Page 3

◆If:Hidden tile = 2
◆
:End

I have it set at below player but when I check the variables in game, the variable stays 0. What am I missing?

Btw, using caethyril method, which is what I was trying to do in the beginning, it just turns all the tiles light up. Haven't found a way to make it work. Unless I am misunderstanding something.

This is with no page conditions also. Just 3 pages in one event

Edit 2: I remove the 2 pages leaving just page 1 and now it adds the variable?
You need to add a +1 to the variable on every stepping transition so every block will trigger the next one and turn itself off while traversing the path.
You need to add a +1 to the variable on every stepping transition so every block will trigger the next one and turn itself off while traversing the path.

If you mean every event needs the +1 on page 1, I'm already doing that. The event is set below player and player touch. But the two extra pages seem to be preventing the variable from counting. I'm not sure what to do.
If you mean every event needs the +1 on page 1, I'm already doing that. The event is set below player and player touch. But the two extra pages seem to be preventing the variable from counting. I'm not sure what to do.
screenshot of your event page would be helpful...
your first event page (that set "hidden tile" += 1) need to have priority: "below character" (so player can walk on it) and have trigger "player touch" / "event touch"...
I am trying to use BK-tdm event set up, but when I walk on the tile, the variable won't add +1.

Page 1

◆Control Variables:#0092 Hidden tile += 1

Page 2 (with shiny tile graphic)
◆If:Hidden tile = 1
◆
:End
From how you've written this, it looks like you're using Conditional Branch commands? That is not what we mean when we say "page conditions". 😅

Page conditions are found to the left of the event command list, above the event's image/trigger/move type. You can enable the "Variable" condition and enter the appropriate value here: there is no need for Conditional Branch commands in this case. 😮‍💨

Otherwise, yea, a screenshot of the full event editing window (not just the commands!) may be helpful~
I am trying to use BK-tdm event set up, but when I walk on the tile, the variable won't add +1.

Page 1

◆Control Variables:#0092 Hidden tile += 1

Page 2 (with shiny tile graphic)
◆If:Hidden tile = 1
◆
:End

Page 3

◆If:Hidden tile = 2
◆
:End

I have it set at below player but when I check the variables in game, the variable stays 0. What am I missing?

Btw, using caethyril method, which is what I was trying to do in the beginning, it just turns all the tiles light up. Haven't found a way to make it work. Unless I am misunderstanding something.

This is with no page conditions also. Just 3 pages in one event

Edit 2: I remove the 2 pages leaving just page 1 and now it adds the variable?

Judging by the way it's set up in this example, it looks like you're making every tile light up at Hidden tile = 1. For every tile along the path, you need to increase the total by 1. So the second tile will have:

◆Control Variables:#0092 Hidden tile += 1

Page 2 (with shiny tile graphic)
◆If:Hidden tile = 2
◆
:End

Page 3

◆If:Hidden tile = 3
◆
:End

And the third tile will have:

◆Control Variables:#0092 Hidden tile += 1

Page 2 (with shiny tile graphic)
◆If:Hidden tile = 3
◆
:End

Page 3

◆If:Hidden tile = 4
◆
:End

Etc. until you have done this for every tile along the path. This method will only work if there is only a 1 tile wide path, though.
why not make a tiny demo so they can download it and see it in action?
this will be fast learning and non confusing though =) and OP request might be fullfilled
as well 😀
From how you've written this, it looks like you're using Conditional Branch commands? That is not what we mean when we say "page conditions". 😅

The page condition method only allows greater than or equal too

And because of that, all the tiles lit up because if I add +1 to my single variable, all tiles will light up because everything is greater than or equal to 1.

I'm failing to understand how and where equal too is going to be actually used. Because that is not a page condition. And if the event itself has 3 pages with the 1st page adding +1 to the variable, that won't work because there are 3 pages total. (Meaning the event command to add +1 to the variable will fail to work because it is the first page)

At first I was using page conditions, I was using the greater than or equal too. But that doesn't work because every tile lights up like I've said. I'm at my wits end and trying anything at this point to see what will work.

The screenshots I've shared are what I was currently playing with, and I know they do not work. I just uploaded for visual. ^^;

On another note, I want to thank everyone. You guys area awesome!
It seems you didn't understand the explanations of how event pages work. From those screenshots, only page 3 will ever be active. You could give:
  • Page 3: condition Variable "Hidden Tile" ≥ 2
  • Page 2: condition Variable "Hidden Tile" ≥ 1
  • Page 1: no conditions?
As I mentioned, page conditions are checked in reverse order, so:
  • Page 3 will be active if the variable is ≥ 2;
  • Page 2 will be active if page 3 is not active and the variable is ≥ 1;
  • Page 1 will be active if page 2 is not active.
So page 2 is active when the variable's value is less than 2 and greater than or equal to 1. I.e. it is active when the variable is equal to 1.

I threw together a rough little demo project (v1.6.2), though I don't know how much help it'll be:
(Remember to right-click > Extract after downloading to get the files out of the archive before trying to open the project in the editor.)

Original thread: https://forums.rpgmakerweb.com/threads/how-to-make-invisible-path-glow-when-stepping.130758/