Current scene check

Discussion in 'RGSSx Script Support' started by LTN Games, Sep 19, 2015.

  1. LTN Games

    LTN Games Veteran Veteran

    Messages:
    645
    Likes Received:
    502
    Location:
    Canada
    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.

    [​IMG]
     
     
    Last edited by a moderator: Sep 19, 2015
    #1
  2. ??????

    ?????? Diabolical Codemaster Veteran

    Messages:
    6,264
    Likes Received:
    2,313
    Location:
    Your OS
    First Language:
    Binary
    Primarily Uses:
    RMMV
    if SceneManager::scene_is?(Scene_Map)


    # do crap..


    end
     
    #2
    LTN Games likes this.
  3. LTN Games

    LTN Games Veteran Veteran

    Messages:
    645
    Likes Received:
    502
    Location:
    Canada
    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.
     
    #3
  4. ??????

    ?????? Diabolical Codemaster Veteran

    Messages:
    6,264
    Likes Received:
    2,313
    Location:
    Your OS
    First Language:
    Binary
    Primarily Uses:
    RMMV
    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 :'(
     
    #4
  5. LTN Games

    LTN Games Veteran Veteran

    Messages:
    645
    Likes Received:
    502
    Location:
    Canada
    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.
     
    #5

Share This Page