boornakaka

Warper
Member
Joined
Jul 20, 2016
Messages
3
Reaction score
0
First Language
English
Primarily Uses
So I am trying to make a simple conditional statement to check to see if a certain actor is equipped with the Equipment type "Shield". I can't seem to come up with what my script should be. Could I get some direction please?
 

 Masked 

Assistant
Veteran
Joined
Oct 28, 2015
Messages
113
Reaction score
298
First Language
Portuguese
Primarily Uses
RMMZ
$gameActors.actor(id).equips().some(function(equip) { return !!equip && equip.etypeId == 2; })


Just change the 'id' on $gameActors.actor(id) to be the id of the actor you are checking.
 
Last edited by a moderator:

boornakaka

Warper
Member
Joined
Jul 20, 2016
Messages
3
Reaction score
0
First Language
English
Primarily Uses
Wow. It works perfectly. Thank you.
 

MattDrummy

Villager
Member
Joined
Nov 11, 2016
Messages
8
Reaction score
1
First Language
English
Primarily Uses
I have a similar question, how could I modify that statement to check in the damage formula of an attack skill.  I wanted my damage formulas to be modified if the character has an open hand (visa vi DnD 3.5).

$gameActors.actor(id).equips().some(function(equip) { return !!equip && equip.etypeId == 2; })


Just change the 'id' on $gameActors.actor(id) to be the id of the actor you are checking.
 

Latest Threads

Latest Profile Posts

Writing a game about my trauma and I want to do a level about struggling with my sexuality. It's a horror game and each level is different with a different monster chase but I have no idea how to go about this level any ideas?
It's been a while since i posted so here's something i've been working on.
Game_Mockup7_6.png
Engine: RPG Maker VX Ace

I've decided to stop buying candy in supermarket and bulk buy 4.5kg of candy. The disadvantage of that is, now I eat a lot of candy. -_-
Microsoft has consumed Activision Blizzard. Makes me wonder if they're gonna make Blizzard Blizzard again.

Forum statistics

Threads
118,544
Messages
1,116,814
Members
155,580
Latest member
WISDOMDICK
Top