Keys in Self Switches for Events and Objects

Milena

The woman of many questions
Veteran
Joined
Jan 26, 2014
Messages
1,281
Reaction score
106
First Language
Irish
Primarily Uses
N/A
I was trying to access the self switch via a script code and here's how I did it:

$gameSelfSwitches.setValue([1, 7, 1], true);[1, 7, 1] is my mapID, eventID, and self switchID.

Now here's my problem.



I have an event where I have two pages. The first one is the main page and the second page would only work if self switch A is activated. So I am trying to access the selfSwitch of this event on an another event, where in the script command I placed that code above.

It should be able to turn on Self Switch A of this event so automatically it goes away as it is being erased. Where did I went wrong?

Also, I would like to ask if this code is placed on game_event, how would I know the current map's id where the player is in?
 

Iavra

Veteran
Veteran
Joined
Apr 9, 2015
Messages
1,797
Reaction score
863
First Language
German
Primarily Uses
Your self switch has the id 'A', not 1, so the correct call would be:

Code:
$gameSelfSwitches.setValue([1, 7, 'A'], true);
 

Milena

The woman of many questions
Veteran
Joined
Jan 26, 2014
Messages
1,281
Reaction score
106
First Language
Irish
Primarily Uses
N/A
Oh my, I was wrong :o

Thanks a lot. I thought switches had to do with numbers as representations. :)
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
switches do, but not self switches.


The current map is $gameMap.mapId() or this._mapId (the first one will work in an event command and in a move route command, the second one will only work in an event command)


The current event is eventId() (from an event command) or eventId() (in a move route command)


There is no "current self switch"
 
Last edited by a moderator:

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,981
Members
137,563
Latest member
cexojow
Top