minmike27

Warper
Member
Joined
Sep 11, 2021
Messages
3
Reaction score
2
First Language
English
Primarily Uses
RMVXA
I don't really have any knowledge with JS but I'm tryna make an actor who uses this skill get a weapon,
this is the script call I used in a common event but its not working.

$gameActors.actor($gameVariables.value(1)).forceChangeEquip(0, $dataWeapons[10]);
 

caethyril

^_^
Global Mod
Joined
Feb 21, 2018
Messages
3,812
Reaction score
2,872
First Language
EN
Primarily Uses
RMMZ
The script call looks OK to me. Ideas:
  1. Maybe the variable is not the value you think it is, so it's affecting a different actor. You can test by adding a Show Text command immediately before the script call, e.g.

    ◆Text:None, Window, Bottom : :TEST! Variable 1 is \v[1].

  2. Maybe the actor is correct, but they cannot use that weapon type. They'll need an Equip Weapon trait matching the weapon's type.
 

SGHarlekin

Veteran
Veteran
Joined
Jun 29, 2020
Messages
502
Reaction score
424
First Language
German
Primarily Uses
RMMV
I'm not 100% certain on this, but force change equip only works if you have whatever weapon you want to force equip in your inventory if I remember correctly. I had a similar issue back in the day but the memory is foggy.
 

minmike27

Warper
Member
Joined
Sep 11, 2021
Messages
3
Reaction score
2
First Language
English
Primarily Uses
RMVXA
The script call looks OK to me. Ideas:
  1. Maybe the variable is not the value you think it is, so it's affecting a different actor. You can test by adding a Show Text command immediately before the script call, e.g.

    ◆Text:None, Window, Bottom : :TEST! Variable 1 is \v[1].


  2. Maybe the actor is correct, but they cannot use that weapon type. They'll need an Equip Weapon trait matching the weapon's type.
yeah the variable value wasn't what I thought it was, i was able to fix it thank you
 

caethyril

^_^
Global Mod
Joined
Feb 21, 2018
Messages
3,812
Reaction score
2,872
First Language
EN
Primarily Uses
RMMZ
I'm not 100% certain on this, but force change equip only works if you have whatever weapon you want to force equip in your inventory if I remember correctly.
forceChangeEquip skips that check, you may be thinking of changeEquip.
yeah the variable value wasn't what I thought it was, i was able to fix it thank you
Great, you're welcome! :kaohi:
 

Latest Threads

Latest Profile Posts


Krow and Dova's Cool New Game | Release Trailer

Launch trailer!
Here is an work in progress (unfinished as of now) Music Album i'm making:


The songs are entirely made with this site:


Please tell me what you think about each song!
The game's already out there. Now what?

Forum statistics

Threads
124,576
Messages
1,164,511
Members
163,401
Latest member
ComfiCouch
Top