- Joined
- Jun 8, 2014
- Messages
- 12
- Reaction score
- 1
- First Language
- English
- Primarily Uses
I am trying to make a common event that is called when the player is trying to open a locked door.
The idea is for the event that is locked to store the variables of the map ID and the event ID, then call the common event "Open Lock."
Control Variables: [0041:lock - map id] = Map IDControl Variables: [0042:lock - event id] = event_idCall Common Event: [Open Lock]The event would first check to make sure that the actor that has the lockpicking skill is in the front of the party...
@>Conditional Branch: Script: $game_party.members[0].id == 71 ...otherwise spitting out a generic "it's locked" message.
If the correct actor is in the lead, a script call would use the stored variables for map ID and event ID to change the self switch of the locked event to "D."
$game_self_switches[[[$game_variables[41]], [$game_variables[42]], "D"]] = trueThe locked event's self switch D would contain the loot if a chest, or simply a blank page if it was a door.
I have this all written in, but for some reason it's not working. I created an NPC to spit out the variables in text form to see if they were being set properly, and they were. This leads me to believe that I am not using the correct script call to set the self switch.
Any thoughts?
The idea is for the event that is locked to store the variables of the map ID and the event ID, then call the common event "Open Lock."
Control Variables: [0041:lock - map id] = Map IDControl Variables: [0042:lock - event id] = event_idCall Common Event: [Open Lock]The event would first check to make sure that the actor that has the lockpicking skill is in the front of the party...
@>Conditional Branch: Script: $game_party.members[0].id == 71 ...otherwise spitting out a generic "it's locked" message.
If the correct actor is in the lead, a script call would use the stored variables for map ID and event ID to change the self switch of the locked event to "D."
$game_self_switches[[[$game_variables[41]], [$game_variables[42]], "D"]] = trueThe locked event's self switch D would contain the loot if a chest, or simply a blank page if it was a door.
I have this all written in, but for some reason it's not working. I created an NPC to spit out the variables in text form to see if they were being set properly, and they were. This leads me to believe that I am not using the correct script call to set the self switch.
Any thoughts?