Self switches in common events

Status
Not open for further replies.

Celianna

Tileset artist
Veteran
Joined
Mar 1, 2012
Messages
10,557
Reaction score
5,592
First Language
Dutch
Primarily Uses
RMMV
So I evented a rather complex portrait system for myself, which can show up to two people on the screen at a time.

To determine whether this character is on the left or right side of the screen, I use a self switch in the common event that controls the way the images will be displayed.

This all worked until I realized the self switch wasn't working for the common event, but in the map event it was called in. If a common event calls another common event that utilizes a self switch, it just doesn't register.

So:
Map event > calls common event with a self switch = works okay.
Common event > calls common event with a self switch = doesn't work.

Any options I can explore here? It really relies on the self switch for it to work, otherwise I'm going to have to create a unique switch for every single character I have, and the self switch eliminated all of this work. Can I really not use self switches in common events that are tied to the common event, and not a map event?
 

Fugama

Means well, but messes up sometimes.
Veteran
Joined
Jun 7, 2014
Messages
158
Reaction score
90
First Language
Fake English
Primarily Uses
RMMV
Use a variable instead, I would think. They tend to be more flexible and in a sense can be a much larger amount of self switches
 

Celianna

Tileset artist
Veteran
Joined
Mar 1, 2012
Messages
10,557
Reaction score
5,592
First Language
Dutch
Primarily Uses
RMMV
Using a variable, I'd have the same issue - it's not self contained. If it was a self variable, that would be different ...
 

Hudell

Dog Lord
Veteran
Joined
Oct 2, 2014
Messages
3,545
Reaction score
3,715
First Language
Java's Crypt
Primarily Uses
RMMZ
I had seen and replied to your tweet, but I'm expanding the response here:

The only reason why self-switches don't work on common events is because they were made to apply to the event that called the common event on purpose. It's very simple to change that behavior with a plugin.

I wrote this code to change that behavior:


Adding that as a plugin should make the game work the way you want it to.
 
Last edited:

Celianna

Tileset artist
Veteran
Joined
Mar 1, 2012
Messages
10,557
Reaction score
5,592
First Language
Dutch
Primarily Uses
RMMV
Hah, didn't check my tweets yet! Gonna test this out now :)

Hmm no, there's no change. Self switches do not register if a common event calls another common event that uses a self switch.

Edit: Hudell was nice enough to help me out, and he added some changes to make it work. You can get the plugin here.
 
Last edited:
Status
Not open for further replies.

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

Latest Threads

Latest Profile Posts

People3_5 and People3_8 added!

so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most. :kaojoy:
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.

Forum statistics

Threads
105,868
Messages
1,017,093
Members
137,587
Latest member
Usagiis
Top