Checking if a Self Switch is turned on in a Parallel Event

Hi there, 


What i'm trying to achieve here is for a parallel event on a map to check if an event has self-switch A enabled. If it does, I intend to show a picture.


This is to be ran when the player first enters a map and is basically checking to see if they have already pressed a button in the game. So far I have this ...


Screen Shot 2016-11-07 at 16.18.10.png


But unfortunately no dice at the moment ... 
You know there are different solutions most Times.


Use a normal Switch, than use that switch as condition for your paralell event page.


Now insert your show and delete picture stuff as eventcode and turn the switch off again.
Hi there @Bex, thanks for your answer - unfortunately I do need to do this via Script.


Effectively the player will leave the map which clears the pictures. However if they return to that room and the picture should be active (by checking an events self-switch) then the picture would be reloaded.
okay than use self switches. normal switches  since global would be easer in use as page condition, but i know script self switch of other event cant be used as page condition.


so is the question are there many pictures? than self switches make sense, else just change it.


I dont own MV but i believe your script snippet if branch is not complete!


$gameself stuff[stuff] == true    


the statement if you branching it for true or false is missing.
I understand what you mean here, thanks for replying so fast. But there will be multiple different images that could be shown and as such, a single parallel event checking the status of an events' self-switch makes more sense to me.


Here is another example using Hudell's lighting script which also doesn't work ...


Screen Shot 2016-11-07 at 17.13.32.png


What i'm trying to do here is check Event 3 on Map 11. If the self-switch A is on then it enables lighting. There will be four to six of these lights or switches per map.
From here:






And by looking at your script call and at what you're saying, it seems you have event and map Id switched.

Code:
$gameSelfSwitches.value([mapId,eventId,name])
$gameSelfSwitches.value([3,11,"A"]) //map 3 event 11 this is what you have

$gameSelfSwitches.value([11,3,"A"]) //map 11 event 3 this is what it should be
Oh man, i'm an idiot! Thank you so much @Astfgl66

Original thread: https://forums.rpgmakerweb.com/threads/checking-if-a-self-switch-is-turned-on-in-a-parallel-event.70708/