Storing Actor class in a variable so that it can be recalled after a cutscene.

Discussion in 'Javascript/Plugin Support' started by Johnboy, May 2, 2017.

  1. Johnboy

    Johnboy Veteran Veteran

    Messages:
    317
    Likes Received:
    104
    Location:
    Canadia
    First Language:
    English
    I've got a cutscene I'm working on for my game that requires my main character class to be changed during the cutscene then switched back afterwards. There are several classes to choose from and I would like to store their current class ID in a variable to be recalled after the cutscene. I'm using YEP class change core, found here:
    http://yanfly.moe/2015/11/27/yep-32-class-change-core/

    I'm hitting a roadblock since I know I should be able to do this but my brain just isn't working (sick and lack of sleep probably the reason). Anyone who could help I would appreciate it.
     
    #1
  2. Lantiz

    Lantiz Biterkid Veteran

    Messages:
    719
    Likes Received:
    1,066
    Location:
    Brazil
    First Language:
    Portuguese
    Primarily Uses:
    RMMV
    Didn't test but... voila

    [​IMG]
     
    #2
  3. immatx

    immatx Veteran Veteran

    Messages:
    66
    Likes Received:
    16
    First Language:
    English
    If what @Lantiz suggested doesn't work you can just create a common event that checks the current class, and assigns a number to a variable based on the number of that class in the class index page. If you want an example I have a class changing common event I made a while back hidden away somewhere that I could try to find. It's a little different but follows the same principle.
     
    #3
  4. Andar

    Andar Veteran Veteran

    Messages:
    28,312
    Likes Received:
    6,437
    Location:
    Germany
    First Language:
    German
    Primarily Uses:
    RMMV
    If you don't get it to work, it would help if you explain what exactly you're doing, because I can't think of a single cutscene where it would be neccessary to change an actor class just to change it back when the cutscene ends - as long as you're inside a single cutscene, everything could be controlled directly and the class change would have no effect at all, because the player can't check the menu while a cutscene is running.
     
    #4
    Lantiz likes this.
  5. Johnboy

    Johnboy Veteran Veteran

    Messages:
    317
    Likes Received:
    104
    Location:
    Canadia
    First Language:
    English
    It's actually a two part cutscene, and there is a battle which takes place in between cutscenes. Basically I need to switch the character to a normally unselectable class, let them use said class for that one battle, and then swap them back afterwards. Sorry, I should have specified that from the start. But it looks like that should work for my purposes.
     
    #5

Share This Page