How to make a state making the target untargetable or invisible?

● ARCHIVED · READ-ONLY
Started by RPG_MAKER_LOVER_0319 3 posts View original ↗
  1. Help I'm making a enemy that has a state that makes them turn invisible or untargetable help me
  2. You can't with the default engine, you will need a plug-in to do that.

    I've moved this thread to Plug-In Requests. Thank you.

  3. Here is a little snippet you can use, you can change the stateID variable under the ////HERE//// to the invicibility state id, it allows the target to still be selected but no skills can hit the target with the state corresponding to the stateID.
    Not quite what you asked though.
    Spoiler
    Code:
    BattleManager.startAction = function() {
        var subject = this._subject;
        var action = subject.currentAction();
        var targets = action.makeTargets();
        //////////////////////////////HERE//////////////
        var stateID = 6;
        if(action.makeTargets().some(function(e, k){
            e.states().some(function(b){
                if(b.id == stateID) {
                    targets.splice(k, 1);
                }
            })
        }))
        ////////////////////////////////////////////////
        this._phase = 'action';
        this._action = action;
        this._targets = targets;
        subject.useItem(action.item());
        this._action.applyGlobal();
        this.refreshStatus();
        this._logWindow.startAction(subject, action, targets);
    };