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

RPG_MAKER_LOVER_0319

Benedict Cumberbatch
Member
Joined
Jun 3, 2017
Messages
3
Reaction score
1
First Language
Korean
Primarily Uses
RMMV
Help I'm making a enemy that has a state that makes them turn invisible or untargetable help me
 

Attachments

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
13,224
Reaction score
13,760
First Language
English
Primarily Uses
RMVXA
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. Please be sure to post your threads in the correct forum next time. Thank you.

 

Ruiran

Veteran
Veteran
Joined
Nov 4, 2013
Messages
78
Reaction score
30
First Language
English
Primarily Uses
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.
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);
};
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

Does anyone find this hard to read?

Enjoying my weekend at home to stay Covid free. How is everyone else doing?
If you enjoy speed mapping for RPG Maker MV check out my YouTube Channel. My latest video includes custom made tiles which makes a simple map look dynamic!

Check out my short game Hikari's World! : Chapter I, on itch.io/games.
An actual dwarf with an actual axe is not so fascinating as the fantasy counterpart...

Forum statistics

Threads
100,603
Messages
977,705
Members
132,211
Latest member
Rkyfat
Top