Switch comes on without my asking.

Status
Not open for further replies.

SongQueenSaeryen

The Songstress of Harmony
Veteran
Joined
Dec 28, 2013
Messages
81
Reaction score
8
First Language
English
Primarily Uses
RMVXA
The switch isn't supposed to come on until AFTER my player has talked to the character, but as soon as I enter the room the switch turns on and it moves to the second event page (which has custom movement). I've checked and no previous character interactions turn on this particular switch.

This is my first event page:

 
Last edited by a moderator:

EternalShadow

Veteran
Veteran
Joined
Sep 16, 2012
Messages
5,781
Reaction score
1,041
First Language
English
Primarily Uses
The red text is the switch control.
 

Lunarea

Artist
Global Mod
Joined
Mar 1, 2012
Messages
8,840
Reaction score
7,797
Do you have a custom script that uses that switch, by chance? Some custom scripts will make use of a switch and will turn it on and off automatically as it's used by the script function.

Also, can you show us screenshots of all 3 pages?
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,355
Reaction score
7,668
First Language
German
Primarily Uses
RMMV
The switch isn't supposed to come on until AFTER my player has talked to the character, but as soon as I enter the room the switch turns on and it moves to the second event page (which has custom movement). I've checked and no previous character interactions turn on this particular switch.
Switches don't operate randomly.
Either it's operated by a script as Lunarea assumes, or it's operated by an even that you forgot to check - or the problem isn't that the switch comes on, but that the conditions on your pages are wrong - that's why we need to see all pages of the event to detect what's happening.
 

SongQueenSaeryen

The Songstress of Harmony
Veteran
Joined
Dec 28, 2013
Messages
81
Reaction score
8
First Language
English
Primarily Uses
RMVXA
Okay, I'll post the other pages. I don't have any scripting at all.

 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,355
Reaction score
7,668
First Language
German
Primarily Uses
RMMV
that logic is rather convoluted, especially the erase event.


And because the switches don't change alone (unless you mixed up with savegames, better start new game in that case), there has to be something other that changes the switches.


First, please describe what that event should do - because no matter what, the erase event command is wrong in that combination.


Second, test the same event with different switches (some high numbered switches that aren't used anywhere, like 48 and 49)


Third, for testing place a differen tsprite on each page, so that you can detect which page is active by the sprite displayed.


At the moment you can't even tell if the event vanishes because the third page becomes active, or because the erase event was executed.
 

SongQueenSaeryen

The Songstress of Harmony
Veteran
Joined
Dec 28, 2013
Messages
81
Reaction score
8
First Language
English
Primarily Uses
RMVXA
For the second page, this is after she says "follow me" so she moves up to the top of some stairs, then my player follows her. Since I can't figure out how to get her to just automatically disappear after moving in that direction, it's set up so that when the player touches her she disappears. (You see her again in the next room).
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,355
Reaction score
7,668
First Language
German
Primarily Uses
RMMV
if you use erase event, the event will only be temporarely erased and back as soon as you enter the map again.


To switch off an event, you usually turn a self-switch ON and condition an empty second page to that self-switch.


Using general switches for this will clutter up your switches when the game gets bigger, because you need a different switch for every such event, even if those events are on different maps.


Put the move route command (as the command, not as autonomous movement like your current second page) on the first page, after the text commands and a control self-switch at the end of the first page after the move command, then delete the current second page and condition the current third page (which will then be the new second page) on the self-switch, not on general switches.


You should never use a general switch to turn off events, unless you want that switch to turn off several events - that might be the cause for your problem - if you used the same general switch on a previous map to turn off an earlier event, you will have turned off this one at the same time, because general switches are identical throughout the entire game.
 
Last edited by a moderator:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
You're going about it all the wrong way - a way that invites problems.


You only need 2 pages on this event.


Page 1 has her talking, then a Set Move Route to go up the stairs or wherever she needs to go, with a Wait for Completion. Then turn on a switch.


Page 2 has no sprite and is conditioned by that switch.


Or you can use a self switch if nothing else depends on you talking to her.
 

SongQueenSaeryen

The Songstress of Harmony
Veteran
Joined
Dec 28, 2013
Messages
81
Reaction score
8
First Language
English
Primarily Uses
RMVXA
Thank you! I will try that!

EDIT: The switch still ran. I'll just move it to another switch.
 
Last edited by a moderator:

Celianna

Tileset artist
Veteran
Joined
Mar 1, 2012
Messages
10,557
Reaction score
5,592
First Language
Dutch
Primarily Uses
RMMV
You have a script inside of your project that is using that switch. Either comb through your scripts and see which one is using that specific switch, or, as you've already done, simply change to another switch that isn't being used.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
Yes, it's better to find out what's updating it, because the same thing could be happening to other switches (and variables).

When you import a script you MUST check what has to be customized.  This includes switches and variables that the script wants to use.  Then you need to allocate NEW switches and variables, NAME them so you don't accidentally use them for something else, and go in and update the script to use the correct ones.

Go into your script list (F11 from the editor) and do a global search (Control+Shift+F) and search for $game_switches.  Then scroll down to the bottom where you will see the list of custom/imported scripts that use switches.  You need to check ALL of those to see what switches are being used (they will be in "constants" near the top of the script, and there will be comments telling you that it's to determine what switch numbers will be used).

If all of that is too hard, just send me your scripts.rvdata2 file and I'll do it for you.
 

SongQueenSaeryen

The Songstress of Harmony
Veteran
Joined
Dec 28, 2013
Messages
81
Reaction score
8
First Language
English
Primarily Uses
RMVXA
The thing is, I didn't import or make any scripts at all.

EDIT: Hold it, I figured it out. It's because it's the required switch for my HP HUD that I made.

Thanks for everything, everyone.
 
Last edited by a moderator:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
It's always a good idea, when you use a switch or variable, to go in and NAME it - even if you don't plan to use it in events. That'll stop you forgetting it's in use and accidentally using it for something else.


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.
 
Status
Not open for further replies.

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

Latest Threads

Latest Posts

Latest Profile Posts

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:
To whom ever person or persons who re-did the DS/DS+ asset packs for MV (as in, they are all 48x48, and not just x2 the pixel scale) .... THANK-YOU!!!!!!!!! XwwwwX

Forum statistics

Threads
105,849
Messages
1,016,977
Members
137,563
Latest member
cexojow
Top