Skill that only work on a specific ally

Mkingdom

Veteran
Veteran
Joined
Nov 1, 2019
Messages
82
Reaction score
7
First Language
English
Primarily Uses
RMMV
One of my characters is an engineer who has a skill called drone repair. It will only work on one of my actors who is a drone. How would I set this up?
 

Accatosh

Veteran
Veteran
Joined
Dec 16, 2018
Messages
85
Reaction score
14
First Language
Swedish
Primarily Uses
RMMV
I may have a solution. Try putting this in the skill's damage formula:

b.isStateAffected(x) ? 200 : 0;

It checks if the targeted unit has a specific state or not. So you want the drone to permanently have a specific state. Change the "x" in the formula to the state id.

So this formula heals by 200 HP if the targeted unit has the specific state, else 0 HP.
 

Aesica

undefined
Veteran
Joined
May 12, 2018
Messages
1,017
Reaction score
949
First Language
English
Primarily Uses
RMMV
Without any plugins, I'd try it like this:
  1. Add a note tag to any "drone" actors. Something like <Drone> is fine.
  2. In your damage/healing formula: c = b.isActor() ? b.actor() : b.enemy(); c.meta.Drone ? YOUR_FORMULA_HERE : 0
Note that the <Drone> note tag is case sensitive, so if you have it as <Drone> in the note tag, it needs to be c.meta.Drone in the formula box. c.meta.drone won't work.
 

Kes

Global Moderators
Global Mod
Joined
Aug 3, 2012
Messages
21,633
Reaction score
10,931
First Language
English
Primarily Uses
RMVXA
Would it not be simpler to just use the actor id as the identifier in the skill? As there is only one character to which this applies, the note tag option (I do like it, btw, for other things) seems a bit too much, and it would save having to create a state just for this.

To illustrate what I mean, in Ace the syntax would be (using actor 3 as an example):

b.id==3? your damage formula : 0

I hesitate to give the Javascript equivalent, because I am much less familiar with it, but I hope that is enough to make clear what I am suggesting as an option.

EDIT
It occurs to me that if, in fact, the OP ends up with more than one drone actor, it still might be possible to just use the damage formula using the class id instead of the actor id. Just a thought.
 

Aesica

undefined
Veteran
Joined
May 12, 2018
Messages
1,017
Reaction score
949
First Language
English
Primarily Uses
RMMV
It occurs to me that if, in fact, the OP ends up with more than one drone actor, it still might be possible to just use the damage formula using the class id instead of the actor id. Just a thought.
That only works if all drone actors are using the same class (or previously, just that one actor). The note tag approach I suggested will allow any number of actors with any number of different classes to all be treated as valid targets for this skill, although I'm pretty sure that goes beyond what the OP is trying to do. Figured I'd throw it out there anyway since its the most flexible approach.
 

Mkingdom

Veteran
Veteran
Joined
Nov 1, 2019
Messages
82
Reaction score
7
First Language
English
Primarily Uses
RMMV
Without any plugins, I'd try it like this:
  1. Add a note tag to any "drone" actors. Something like <Drone> is fine.
  2. In your damage/healing formula: c = b.isActor() ? b.actor() : b.enemy(); c.meta.Drone ? YOUR_FORMULA_HERE : 0
Note that the <Drone> note tag is case sensitive, so if you have it as <Drone> in the note tag, it needs to be c.meta.Drone in the formula box. c.meta.drone won't work.
Ok that works. Thanks.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Well it's been almost a whole year since I joined RMW, so i figured I should update my status.
This is my updated status.
Here's a sample of some pixel edits I made.

Maybe for use as sidewalks.
If there are any mods or admins online, could you please see about the re-translation pages for RPG Maker MV? They are all down :rsad:
Werewolf cons: you lose control of yourself once a month and could accidentally kill your friends. Vampire cons: no garlic bread. The choice is simple. Werewolf for sure.
2 huge market drops in 2 days. So glad I sold my non-dividend stocks about 2 weeks ago. And if the dividend ones drop heavily, hey more cheap stocks for me!

Forum statistics

Threads
94,526
Messages
921,605
Members
124,378
Latest member
friskyomega
Top