Current scene check

LTN Games

Indie Studio
Veteran
Joined
Jun 25, 2015
Messages
703
Reaction score
629
First Language
English
Primarily Uses
RMMV
I am wondering if there is a way to check if the current scene active is scene_map.
I am using a common event to equip my items into my Falcao abs slots, but the problem is when my ABS uses the item it recalls the common event to equip or unequip. So I am wondering if there is a way to check using a conditonal branch script option, to see if the current scene active is the map scene this way it will skip the common event, unless in the Item scene.

Just for an example to try and explain this easier.

If currentscene = scene_map #Do nothingelseRun equip conditionsEDIT: I was not happpy with the amount of info I provided so here is a screenshot of the common event with my attempt to check the scene. This does not work for me though. Is there other options or what am I doing wrong.


 
 
Last edited by a moderator:

??????

Diabolical Codemaster
Veteran
Joined
May 11, 2012
Messages
6,477
Reaction score
3,076
First Language
Binary
Primarily Uses
RMMZ
if SceneManager::scene_is?(Scene_Map)


# do crap..


end
 

LTN Games

Indie Studio
Veteran
Joined
Jun 25, 2015
Messages
703
Reaction score
629
First Language
English
Primarily Uses
RMMV
I updated OP. Okay so I attempted your snippet, I did a conditional branch with SceneManager::scene_is?(Scene_Map) and in the else section I put in my common event commands but this did not work. It would not run the commands. I also tried SceneManager::scene_is?(Scene_Item) and put my commands underneath the condition, but same thing it would not run my commands.
 

??????

Diabolical Codemaster
Veteran
Joined
May 11, 2012
Messages
6,477
Reaction score
3,076
First Language
Binary
Primarily Uses
RMMZ
Got no idea why that doesnt work :/

Perhaps run this as a script call:

$game_variables[1] = SceneManager::scene_is?(Scene_Map)And then check game variables 1 during the conditional.

But again, no idea why the first doesn't work, so this is likely to fail too :'(
 

LTN Games

Indie Studio
Veteran
Joined
Jun 25, 2015
Messages
703
Reaction score
629
First Language
English
Primarily Uses
RMMV
I attempted what you said, and no it dont work. Intresting, I will keep trying diffrent things to see if it starts working. Hopefully someone else got an idea.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

A new VA has joined the "Beyond the Mirror" team... I can't wait to start working on battle voices in the engine now.
Well bad reviews r making me rather annoyed today.
Ami
--- F.Mage Cooking Part 2 ---

F.Knight: Chef isn't here at this moment,he goes back into his Hometown to celebrating the Halloween with them.
F.Fighter: That too bad. I can't taste his dish until 3-5 days.
F.Mage: Then Leave it to me,i can make a Special Dishes for our Team in Halloween! (Rushes Into The Kitchen)
F.Knight & F.Fighter: (Screaming) YAMEROOO!!!
Stream will be live shortly with a session of the Interactive Text Adventure! Feel free to drop by!
aero the acrobat 2 on sega had some absolute bangers on the ost... why Meeting Dr. Dis was just for a cutscene and not a boss makes me sad lol

Forum statistics

Threads
104,626
Messages
1,007,670
Members
136,106
Latest member
lily101
Top