I'm having a bug with the script WeaponOverActor

SushiAssado

Villager
Member
Joined
Apr 22, 2018
Messages
7
Reaction score
0
First Language
portugues br
Primarily Uses
RMMV
@LadyBaskerville when I activate this script and I do not have any equipped weapons and enter into battle, this error appears "can not read property 'meta' of null" ,but when I'm equipped with a weapon nothing happens, sSorry for the inconvenience, I do not want to be boring. ;c
 

Attachments

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
@LadyBaskerville asked for screenshots showing how you set up the actors and their equipment, as she needs to know that to confirm if her suspicions are correct. Unfortunately the screenshot you provided is of very little use. If you get that error, press F8 to open the developer tools, go to the Console tab, and grab a screenshot of that, which us much more useful. But also provide the actor/equipment info.

I'd also be interested to know if you've set up your party members correctly - if you don't want all 4 actors in the starting party, did you delete them from the System tab (which is the correct way) or from the Actors tab (which is the incorrect way that a lot of people mistakenly do, as you then have "empty" party members).
 

SushiAssado

Villager
Member
Joined
Apr 22, 2018
Messages
7
Reaction score
0
First Language
portugues br
Primarily Uses
RMMV
@LadyBaskerville asked for screenshots showing how you set up the actors and their equipment, as she needs to know that to confirm if her suspicions are correct. Unfortunately the screenshot you provided is of very little use. If you get that error, press F8 to open the developer tools, go to the Console tab, and grab a screenshot of that, which us much more useful. But also provide the actor/equipment info.

I'd also be interested to know if you've set up your party members correctly - if you don't want all 4 actors in the starting party, did you delete them from the System tab (which is the correct way) or from the Actors tab (which is the incorrect way that a lot of people mistakenly do, as you then have "empty" party members).
I did not know about the console, here is f12 :c
 

Attachments

LadyBaskerville

Hell-poodle
Veteran
Joined
Sep 12, 2016
Messages
645
Reaction score
524
First Language
German
Primarily Uses
RMMV
I couldn't test it yet, but try replacing the plugin's content with this:

Code:
/*:
 * @plugindesc For sideview battle, change the order in which weapon and actor are drawn.
 * @author LadyBaskerville
 *
 * @help
 * Use the notetag <Weapon Over Actor> in the actor or weapon notebox
 * to draw the weapon image on top of the actor image.
 * Might not work when changing weapons during battle.
 *
 * Free for use in both non-commercial and commercial games.
 * No credit required.
 * Edits and reposts allowed.
 */

Sprite_Actor.prototype.initMembers = function() {
    Sprite_Battler.prototype.initMembers.call(this);
    this._battlerName = '';
    this._motion = null;
    this._motionCount = 0;
    this._pattern = 0;
    this.createSprites();
};

Sprite_Actor.prototype.createSprites = function() {
    this.createShadowSprite();
    if (this._actor && ($dataActors[this._actor._actorId].meta["Weapon Over Actor"] ||
                        ($dataWeapons[this._actor._equips[0]._itemId] && $dataWeapons[this._actor._equips[0]._itemId].meta["Weapon Over Actor"]))) {
        this.createMainSprite();
        this.createWeaponSprite();
    } else {
        this.createWeaponSprite();
        this.createMainSprite();
    }
    this.createStateSprite();
};

Sprite_Actor.prototype.setBattler = function(battler) {
    Sprite_Battler.prototype.setBattler.call(this, battler);
    var changed = (battler !== this._actor);
    if (changed) {
        this._actor = battler;
        if (battler) {
            this.setActorHome(battler.index());
        }
        this.createSprites();
        this.startEntryMotion();
        this._stateSprite.setup(battler);
    }
};
I only added a check whether the actor has a weapon equipped in the first play before trying to access the notetag of the equipped weapon; hopefully that was everything that was wrong. If you still get an error, please post a screenshot of the console with again with the new error.
 

SushiAssado

Villager
Member
Joined
Apr 22, 2018
Messages
7
Reaction score
0
First Language
portugues br
Primarily Uses
RMMV
I couldn't test it yet, but try replacing the plugin's content with this:

Code:
/*:
 * @plugindesc For sideview battle, change the order in which weapon and actor are drawn.
 * @author LadyBaskerville
 *
 * @help
 * Use the notetag <Weapon Over Actor> in the actor or weapon notebox
 * to draw the weapon image on top of the actor image.
 * Might not work when changing weapons during battle.
 *
 * Free for use in both non-commercial and commercial games.
 * No credit required.
 * Edits and reposts allowed.
 */

Sprite_Actor.prototype.initMembers = function() {
    Sprite_Battler.prototype.initMembers.call(this);
    this._battlerName = '';
    this._motion = null;
    this._motionCount = 0;
    this._pattern = 0;
    this.createSprites();
};

Sprite_Actor.prototype.createSprites = function() {
    this.createShadowSprite();
    if (this._actor && ($dataActors[this._actor._actorId].meta["Weapon Over Actor"] ||
                        ($dataWeapons[this._actor._equips[0]._itemId] && $dataWeapons[this._actor._equips[0]._itemId].meta["Weapon Over Actor"]))) {
        this.createMainSprite();
        this.createWeaponSprite();
    } else {
        this.createWeaponSprite();
        this.createMainSprite();
    }
    this.createStateSprite();
};

Sprite_Actor.prototype.setBattler = function(battler) {
    Sprite_Battler.prototype.setBattler.call(this, battler);
    var changed = (battler !== this._actor);
    if (changed) {
        this._actor = battler;
        if (battler) {
            this.setActorHome(battler.index());
        }
        this.createSprites();
        this.startEntryMotion();
        this._stateSprite.setup(battler);
    }
};
I only added a check whether the actor has a weapon equipped in the first play before trying to access the notetag of the equipped weapon; hopefully that was everything that was wrong. If you still get an error, please post a screenshot of the console with again with the new error.
Worked perfectly C: thank you very much, sorry for the way I did the post, it's my first time here
 

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

Latest Threads

Latest Posts

Latest Profile Posts

How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:
To whom ever person or persons who re-did the DS/DS+ asset packs for MV (as in, they are all 48x48, and not just x2 the pixel scale) .... THANK-YOU!!!!!!!!! XwwwwX

Forum statistics

Threads
105,849
Messages
1,016,981
Members
137,563
Latest member
cexojow
Top