Level restart not working properly

Niloc

Veteran
Veteran
Joined
Jul 27, 2020
Messages
71
Reaction score
12
First Language
French
Primarily Uses
Other
Hi, I am building a stealth game in which whenever the player gets caught the level restarts.
To make the level restart I use this event :
1596474498274.png

Normally it works pretty fine but I started using Yep's buttonCommonEvents to use my map abilities as common events (before that I had to copy paste it on each page which isn't so convenient). One of the ability is interefering with the restart event and I'm not sure why.

It's a "phase" ability that allow my player to move forward very quick while being shortly invisible.

"
◆If:Invisible is OFF
◆If:Ability gauge ≥ 2
◆Control Switches:#0003 Invisible = ON
◆Plugin Command:qSight player visible false
◆Play SE:Evasion2 (35, 120, 0)
◆Set Movement Route:Player (Skip, Wait)
:Set Movement Route:◇Opacity:0
:Set Movement Route:◇Speed:6
:Set Movement Route:◇Frequency:5
:Set Movement Route:◇1 Step Forward
:Set Movement Route:◇1 Step Forward
:Set Movement Route:◇1 Step Forward
:Set Movement Route:◇1 Step Forward
:Set Movement Route:◇1 Step Forward
:Set Movement Route:◇1 Step Forward
:Set Movement Route:◇Speed:4
:Set Movement Route:◇Frequency:3
:Set Movement Route:◇Opacity:255
◆Plugin Command:qSight player visible true
◆Control Switches:#0003 Invisible = OFF
◆Control Variables:#0009 Ability gauge -= 2

:Else
◆Text:main character(0), Window, Bottom
:Text:I'm out of energy !

:End

:Else
◆Control Variables:#0003 Disable Lock = 0
◆Plugin Command:qSight player visible false
◆Play SE:Evasion2 (35, 120, 0)
◆Set Movement Route:Player (Skip, Wait)
:Set Movement Route:◇Opacity:0
:Set Movement Route:◇Speed:6
:Set Movement Route:◇Frequency:5
:Set Movement Route:◇1 Step Forward
:Set Movement Route:◇1 Step Forward
:Set Movement Route:◇1 Step Forward
:Set Movement Route:◇1 Step Forward
:Set Movement Route:◇1 Step Forward
:Set Movement Route:◇1 Step Forward
:Set Movement Route:◇Speed:4
:Set Movement Route:◇Frequency:3
:Set Movement Route:◇Opacity:255
◆Plugin Command:qSight player visible true
◆Control Switches:#0003 Invisible = OFF
◆Control Variables:#0009 Ability gauge -= 2

:End
"

When I start the game, it automatically plays this part :
◆Text:main character(0), Window, Bottom
:Text:I'm out of energy !

And when I restart a level the ability is automatically used even if I'm not pressing the linked key.
I've been trying to figure out what is wrong for a while but I can't get it. Does anyone have an idea ? Or do you know a good plugin that would allow me to restart the level easy ?
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
30,709
Reaction score
7,365
First Language
German
Primarily Uses
RMMV
You should restructure your event.

One of the biggest (and unfortunately random) problems is that map events only exists on a map.
So if you are transferring the player to a different map, the current map event gets deleted - and that includes the commands after the transfer command.
SOME of the commands will remain in memory until processed, but for any more complex structures it is usually better to have an event end at the transfer command and have an autorun on the target map continue with the rest of the commands.

and since you have multiple transfers in that event, probably back to this map from what you're writing, you need to be rather tricky on which command is triggered when.
You'll probably have to continue the bughunt after restructuring the events, but first you need to get that problem above fixed before you can search for the next bug.
 

Niloc

Veteran
Veteran
Joined
Jul 27, 2020
Messages
71
Reaction score
12
First Language
French
Primarily Uses
Other
Alright thanks ! I'm gonna try to just remake the event cleaner then :D
 

Niloc

Veteran
Veteran
Joined
Jul 27, 2020
Messages
71
Reaction score
12
First Language
French
Primarily Uses
Other
So well, I fixed it but that was the weirdest thing ever.
Basically the event was good. But for some reason when I placed in in common event 11 it just bugged (maybe something in yanfly's pluging ?). I put it in an other slot and now it works just fine. I spent hours to try to fix this haha
 

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

Latest Threads

Latest Posts

Latest Profile Posts

yay my offer is up :) joys
@wrigty12 hi! thanks for showing interest in my work. Sadly the tablet I'm using broke, so I wasn't able to create anything for weeks. Got a new one with display, I'm still not used to it though, so I'm still practicing, doing basic drawings again. Also I'm in my last year of college. Thesis, projects and other activities takes most of my time ;_;.
I'll get back to it whenever I get a free time.
Any artists here planning on participating in the Inktober art prompts this October?
It's right around the corner.
It's rpg maker related so I'll post it here, I worked on a little free rpg maker zine and this was my piece. Play Grimm's Hollow if you haven't already, I liked it a lot. (i don't remember if posting a link to a product even if free is allowed via profile posts, so if anyone knows lemme know)

Forum statistics

Threads
103,025
Messages
996,756
Members
134,497
Latest member
Grung
Top