How to make invisible path glow when stepping?

Sakurra

Is probably eating a brownie
Veteran
Joined
Sep 1, 2015
Messages
564
Reaction score
743
First Language
English
Primarily Uses
RMMV
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...
 

ShadowDragon

Veteran
Veteran
Joined
Oct 8, 2018
Messages
2,938
Reaction score
1,044
First Language
Dutch
Primarily Uses
RMMV
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.
 

Testtubebaby

Wizard of the woods
Member
Joined
Oct 31, 2020
Messages
24
Reaction score
3
First Language
English
Primarily Uses
RMVXA
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.
 

Celestrium

Adventurer
Veteran
Joined
Mar 3, 2020
Messages
115
Reaction score
120
First Language
English
Primarily Uses
RMMZ
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!
 

BK-tdm

Manga Maker
Veteran
Joined
Jun 21, 2018
Messages
206
Reaction score
440
First Language
English
Primarily Uses
RMMV
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.
 
Last edited:

ShadowDragon

Veteran
Veteran
Joined
Oct 8, 2018
Messages
2,938
Reaction score
1,044
First Language
Dutch
Primarily Uses
RMMV
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 :)
 

BK-tdm

Manga Maker
Veteran
Joined
Jun 21, 2018
Messages
206
Reaction score
440
First Language
English
Primarily Uses
RMMV
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.
 

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

Latest Threads

Latest Profile Posts

This is relevant so much I can't even!
Frostorm wrote on Featherbrain's profile.
Hey, so what species are your raptors? Any of these?
... so here's my main characters running around inside "Headspace", a place people use as a safe place away from anxious/panic related thinking.
Stream will be live shortly! I will be doing some music tonight! Feel free to drop by!
Made transition effects for going inside or outside using zoom, pixi filter, and a shutter effect

Forum statistics

Threads
105,999
Messages
1,018,221
Members
137,778
Latest member
br11an
Top