Is there a script to record Actor's Equiped items

Zoltor

Veteran
Veteran
Joined
Jan 18, 2014
Messages
1,550
Reaction score
211
First Language
English
Primarily Uses
Something along the lines of:

$game_temp.Actor ID_Equipmentslot Name_weapon/Armor ID

would be nice, so I can set variables for X equipment a Actor has equiped, there wouldn't be a script formula to that effect, would there be?
 
Last edited by a moderator:

tatsu

Warper
Member
Joined
Mar 21, 2014
Messages
1
Reaction score
0
First Language
English
Primarily Uses
To store the ID of one of the equipped weapons/armor you'd want to use something along the lines of the following:

if $game_actors[1].equips[0] != nil $game_variables[1] = $games_actors[1].equips[0].idendThis can also be used to fetch the name or description of the equipment, just replace .id with .name etc.Replace the actors number as appropriate and the equips are ordered as follows:

0: Weapon

1: Shield

2: Head

3: Body

4: Accessory

If you want to store everything the actor has equipped it would be a simple matter of using a loop.

Hope this helps.
 

Zoltor

Veteran
Veteran
Joined
Jan 18, 2014
Messages
1,550
Reaction score
211
First Language
English
Primarily Uses
To store the ID of one of the equipped weapons/armor you'd want to use something along the lines of the following:

if $game_actors[1].equips[0] != nil $game_variables[1] = $games_actors[1].equips[0].idendThis can also be used to fetch the name or description of the equipment, just replace .id with .name etc.Replace the actors number as appropriate and the equips are ordered as follows:

0: Weapon

1: Shield

2: Head

3: Body

4: Accessory

If you want to store everything the actor has equipped it would be a simple matter of using a loop.

Hope this helps.
Wasn't originally what I was looking for, but considering I just realized the editor doesn't let you add.or change items/equipment completely based on a variable(evidently in the editor, It's strictly for keeping track of how much of a specific item is "in" inventory/doing calcs based on such) so I am gonna need to script the whole feature revolving around such events from scratch, this is what I'm gonna need, thanks.
 

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

Latest Threads

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,853
Messages
1,016,990
Members
137,562
Latest member
tamedeathman
Top