[Resolved][VX]Checking Scene

0 Members and 1 Guest are viewing this topic.

****
Rep:
Level 71
The Doctors in!
I'm releasing an update for my game where their is a clock however I want it to only appear when the Scene is Scene_Map. I tried using $scene = Scene_Map in a conditional branch but I got an error in main. Does any one know the proper way to check the scene?
« Last Edit: May 28, 2012, 07:19:40 PM by DoctorTodd »

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Best RPG Maker User (Scripting)2010 Most Mature Member
Code: [Select]
$scene.is_a?(Scene_Map)

While it would be incorrect in this case, when you are trying to check equality normally in the future, it is ==, not just =.

****
Rep:
Level 71
The Doctors in!
Thanks MA.  :)