Check for Actor's Class [SOLVED]

Discussion in 'Learning Ruby and RGSSx' started by IneptAttoney_08, Jun 18, 2019.

Thread Status:
Not open for further replies.
  1. IneptAttoney_08

    IneptAttoney_08 MMORPG! Veteran

    Messages:
    67
    Likes Received:
    10
    Location:
    Here!
    First Language:
    Indonesia
    Primarily Uses:
    RMVXA
    Hello!
    is there a script call that can check the actor class?

    for example:
    I created a script that will display the class of the actor. or like a conditional branch:
    if class id 1
    else
    end

    maybe someone can help me?
     
    #1
  2. Hero_Claive

    Hero_Claive (Phoenix Ember) Veteran

    Messages:
    149
    Likes Received:
    83
    First Language:
    English
    Primarily Uses:
    RMVXA
    Quite simply, it's actor.class depending on which (Ruby) class you're working in. The ID of that class is stored under actor.class_id.

    If you're using a script call in a conditional branch, you'd use $game_actors[x].class_id == y, with x being the actor id and y being the class id. Alternatively you can do $data_actors[x] but that returns the class value that is set in the database, not necessarily the class that an actor currently has.
     
    #2
  3. IneptAttoney_08

    IneptAttoney_08 MMORPG! Veteran

    Messages:
    67
    Likes Received:
    10
    Location:
    Here!
    First Language:
    Indonesia
    Primarily Uses:
    RMVXA
    Thank you for very quick respond!
    this theard was solved !
    Thanks Again!
     
    #3
  4. slimmmeiske2

    slimmmeiske2 Little Red Riding Hood Moderator

    Messages:
    5,434
    Likes Received:
    4,091
    Location:
    Belgium
    First Language:
    Dutch
    Primarily Uses:
    RMXP

    This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

     
    #4
Thread Status:
Not open for further replies.

Share This Page