Engine saying weapon isn't equipped when it is...

Capitán

kind of a big deal
Veteran
Joined
Jul 9, 2013
Messages
572
Reaction score
145
First Language
Engilsh
Primarily Uses
RMMV
I run this during my battle script and it's giving me false

Code:
console.log($gameParty.isAnyMemberEquipped($dataWeapons[weaponId]));
the weaponID variable is set to 6 and I make sure that the weapon is equipped during the battle test, yet it still returns false.

I decided to do a deeper dive and look into the actors equips by printing the actor object to the console as a JSON object and got this:

Code:
{
    "_equips": [
        {
            "_etypeId": 1,
            "_item": {
                "_dataClass": "",
                "_itemId": 0
            }
        }
    ],
    "_hp": 4867,
    "_mp": 1070,
    "_tp": 23,
    "_hidden": false,
    "_paramPlus": [
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0
    ],
    "_states": [],
    "_stateTurns": {},
    "_stateSteps": {},
    "_buffs": [
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0
    ],
    "_buffTurns": [
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0
    ],
    "_cooldownTurns": {
        "1": -1,
        "2": -1,
        "16": 0,
        "21": 0
    },
    "_warmupTurns": {
        "1": -1,
        "2": -1,
        "16": -1,
        "21": -1
    },
    "_actions": [],
    "_speed": 438,
    "_result": {
        "used": false,
        "missed": false,
        "evaded": false,
        "physical": false,
        "drain": false,
        "critical": false,
        "success": false,
        "hpAffected": false,
        "hpDamage": 0,
        "mpDamage": 0,
        "tpDamage": 0,
        "addedStates": [],
        "removedStates": [],
        "addedBuffs": [],
        "addedDebuffs": [],
        "removedBuffs": [],
        "guarded": false,
        "elementRate": 1,
        "newAddedStates": []
    },
    "_actionState": "acting",
    "_lastTargetIndex": 0,
    "_animations": [],
    "_damagePopup": [],
    "_effectType": null,
    "_motionType": null,
    "_weaponImageId": 0,
    "_motionRefresh": false,
    "_selected": false,
    "_actorId": 1,
    "_name": "Roy",
    "_nickname": "",
    "_classId": 1,
    "_level": 99,
    "_characterName": "roy",
    "_characterIndex": 0,
    "_faceName": "Roy",
    "_faceIndex": 0,
    "_battlerName": "roy_sv",
    "_exp": {
        "1": 2547133
    },
    "_skills": [],
    "_actionInputIndex": 0,
    "_lastMenuSkill": {
        "_dataClass": "",
        "_itemId": 0
    },
    "_lastBattleSkill": {
        "_dataClass": "skill",
        "_itemId": 1
    },
    "_lastCommandSymbol": "",
    "_profile": "",
    "_battleSkills": [
        0,
        0,
        0,
        0,
        0
    ],
    "_checkPassiveStateCondition": [],
    "_passiveStatesRaw": [],
    "_battleSkillMaxPlus": 0,
    "_anchorY": 1,
    "_replaceAttackSkillId": 0,
    "_replaceGuardSkillId": 0,
    "_cooldownTickRate": {},
    "_freeStateTurn": [],
    "_immortalState": false,
    "_selfTurnCount": 1,
    "_flinched": false,
    "_statusRefreshRequested": false
}
It seems as though the weapon id is 0 when its equipped and I can't figure out why this is happening...
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,004
First Language
Tagalog
Primarily Uses
RMVXA
Can you post the code of isAnyMemberEquipped?

Also, when are you exactly calling it?
 

Capitán

kind of a big deal
Veteran
Joined
Jul 9, 2013
Messages
572
Reaction score
145
First Language
Engilsh
Primarily Uses
RMMV
Can you post the code of isAnyMemberEquipped?
Not sure what you're asking for here...

Also, when are you exactly calling it?
It is being called during battle after each turn.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

HexMozart88 wrote on Citali's profile.
Kikuo!
The lack of bike trails and bungee jump areas in this city should be criminalized.
SF_Actor3_8 added!



A recent screenshot that I also shared on Reddit and the likes, links in my signature if you want to follow :)


I am starting to get a hang of this parallaxing mapping business. Still inexperienced, but at least I can be a lot more creative now :)

Forum statistics

Threads
107,416
Messages
1,029,544
Members
139,542
Latest member
NJP
Top