States over Scripts

Discussion in 'Javascript/Plugin Support' started by G4merSylver, Nov 28, 2015.

    Tags:
  1. G4merSylver

    G4merSylver Villager Member

    Messages:
    17
    Likes Received:
    10
    Probably missed out something obvious again...

    Let's keep it simple: Apply State X on Actor Y.

    $gameActors.actor(1).addNewState(2);
    Code:
    $gameActors.actor(1).addState(2);
    Atleast this is what I unstood from the rpg_objects.js...?

    Without calling the axe dude would someone be so nice and explain to humble little me?
     
    #1
  2. Mellye

    Mellye Veteran Veteran

    Messages:
    347
    Likes Received:
    277
    First Language:
    Portuguese
    From those two, you should use .addState(STATE_ID).

    The logic inside addState() will check if this is an addable state for that battler, and if it isn't already present (in which case it will call addNewState()) or whether it already exists (in which case it will call resetStateCounts only).
     
    Last edited by a moderator: Nov 28, 2015
    #2

Share This Page