Problem with switches and tile swapping

SongQueenSaeryen

The Songstress of Harmony
Veteran
Joined
Dec 28, 2013
Messages
81
Reaction score
8
First Language
English
Primarily Uses
RMVXA
Okay, this is super bugging me. I've tried to fix this over and over again, and it still won't work. What I want to happen is that when a switch is on on a certain map, a script is called, but when it is off the script is not called. At first, it seemed to call the script no matter what, and now it does absolutely nothing whether or not the switch is on.

Here is the event (note these are three pages of the same thing):

Script from here: http://forums.rpgmakerweb.com/index.php?/topic/9396-easy-tile-swapping/
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,675
First Language
German
Primarily Uses
RMMV
Please do not cut away important parts of the screenshots when posting.


Most probably this problem is caused by a wrong page priority, and you have cut away the page numbers that will solve this.


More specifically, the highest page has always priority, and if the last screenshot is of page three, that has the highest priority - causing the event to stop working after switch B was used the first time.
 

Bastrophian

The Pixel Heartist!
Veteran
Joined
Oct 26, 2013
Messages
3,830
Reaction score
2,070
First Language
English
Primarily Uses
Other
Its because of the last page....on the second you have erace event. It never gets to the last page because self switch B is never turned on...so it doesnt work at all :/

Edit: Ander you ninja!! Well, you explained it better than I could have, so....lol. :)
 
Last edited by a moderator:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,675
First Language
German
Primarily Uses
RMMV
Its because of the last page....on the second you have erace event. It never gets to the last page because self switch B is never turned on...so it doesnt work at all :/
Wrong - the problem is that the switch B is turned on - on page 1, and then the entire event is deactivated.
 

Bastrophian

The Pixel Heartist!
Veteran
Joined
Oct 26, 2013
Messages
3,830
Reaction score
2,070
First Language
English
Primarily Uses
Other
Wrong - the problem is that the switch B is turned on - on page 1, and then the entire event is deactivated.
OH! Sorry, I didint see that. My mistake.
 

SongQueenSaeryen

The Songstress of Harmony
Veteran
Joined
Dec 28, 2013
Messages
81
Reaction score
8
First Language
English
Primarily Uses
RMVXA
Please do not cut away important parts of the screenshots when posting.

Most probably this problem is caused by a wrong page priority, and you have cut away the page numbers that will solve this.

More specifically, the highest page has always priority, and if the last screenshot is of page three, that has the highest priority - causing the event to stop working after switch B was used the first time.
I'm sorry, I didn't know it was so important. I was unable to select everything in MSPaint.

The pages are in this order from top to bottom - 1, 2, 3.

EDIT: Tried switching pages 2 and 3 around. Didn't work.
 
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 don't even need three pages. Why have a page on parallel process that just turns on switches to other pages that run on parallel process?


Have ONE event page set to parallel process. Set the page's condition to switch 8.


In the event commands, do you tile swapping, then add an Erase Event command.


This means, when you enter the map, if the switch is off, nothing will happen. If the switch is on, the tiles will be swapped.


When you leave the map and come back later, it'll do the check again.
 

SongQueenSaeryen

The Songstress of Harmony
Veteran
Joined
Dec 28, 2013
Messages
81
Reaction score
8
First Language
English
Primarily Uses
RMVXA
You don't even need three pages. Why have a page on parallel process that just turns on switches to other pages that run on parallel process?

Have ONE event page set to parallel process. Set the page's condition to switch 8.

In the event commands, do you tile swapping, then add an Erase Event command.

This means, when you enter the map, if the switch is off, nothing will happen. If the switch is on, the tiles will be swapped.

When you leave the map and come back later, it'll do the check again.
I tried this already, and the problem then was that the switch seemed to permenantly switched on. I'll retry and check my leaving event to make sure the switch is set to turn off (but I'm sure it is).
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,675
First Language
German
Primarily Uses
RMMV
I suggest taking one step back and explaining what exactly the event is supposed to do - because several things don't fit together, and I think it's completely unneccessary to make them parallel processes.


Currently the event (as in the pictures) works this way:


As long as switch 8 is ON, upon entering the map several tiles will be switched to a new tile (based on region), then the event gets erased and reloaded on next map enter.


When switch 8 is OFF, this region tile switching becomes disabled and will stay disabled for the rest of the game. That is the function of the third page when used in that way.


If the tiles should only be switched when switch 8 is on and nothing should happen otherwise, then Shaz suggestion is the way to make the event.


If that doesn't work as intended, then you have some problem with the switches themselves and we need to see the events where the switches are set.


The most common mistake in that case is to place the control switch commands after the transfer player command - because commands after transfer player are usually ignored by the engine...
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
Show us a screenshot of your one-page event - the WHOLE window, not just a bit of it. If you have it set up as I described and it's not working, it's because you've missed something small or have made a mistake somewhere. It's really better to stick with the one page, as what you're doing - adding 3 pages and several self switches, is just introducing more places for things to go wrong.
 

SongQueenSaeryen

The Songstress of Harmony
Veteran
Joined
Dec 28, 2013
Messages
81
Reaction score
8
First Language
English
Primarily Uses
RMVXA
Okay, here's the event as one page:

This event is supposed to turn the switch off:

These events turn it on. Note that the multiple-paged one is set up so that it only happens once (once self switch A is on, that particular event is supposed to be disabled forever - it's because it's part of the WIP first cutscene).

 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,675
First Language
German
Primarily Uses
RMMV
The problem with those events is that you made a few aborted sequences - commands that will never be executed. In addition you didn't understand the purpose of some of the commands.


1) Transfer Player: If the transfer command will transport the player to a different map, then all events on the current map will cease to exist and be aborted. Which is the reason why it's usually a bad idea to continue commands after the transfer command.


The second event will only work if the player already is on the map 13:world, it will not work anywhere else.


2) Erase event is temporary. It will erase the event only until the map is reloaded. Which means that by adding erase event to the third event, you're specifically telling the game to rerun the event everytime the map is entered. It might be that the self-switch prevents that, but that is not something you should chance.


Either switch off an parallel process permanently by using a self-switch to an empty page, OR turn it off temporarily until next reload by erasing the event - NEVER both in the same parallel process.
 

SongQueenSaeryen

The Songstress of Harmony
Veteran
Joined
Dec 28, 2013
Messages
81
Reaction score
8
First Language
English
Primarily Uses
RMVXA
All right, I figured out it's the script itself to blame. So I will be looking into that instead.

UPDATE: Solved! =D Thanks for all the suggestions and help.
 
Last edited by a moderator:

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

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,864
Messages
1,017,056
Members
137,573
Latest member
nikisknight
Top