Grumphlu

Veteran
Veteran
Joined
Mar 25, 2015
Messages
34
Reaction score
8
First Language
Français
Primarily Uses
Hi Everyone,

I am using Yanfly Scripts and i would like one of my skill to target only a specific ally.

I know that i have to use the formula <Custom Target Eval> in notetag, but then i am terrible with Javascript and i realy don't know what can come next. I just want this ability to work only on a specific ally. Can it be like actor.(ID) ?

Thanks in advance!
 

Tiamat-86

old jrpg gamer
Veteran
Joined
Dec 5, 2017
Messages
662
Reaction score
284
First Language
english
Primarily Uses
RMMV
if it is a skill that is designed to always target only the same specific ally (ie. skill only targets actor 1 even when cast by actor 3)
you could have the skill be a self target and all it does is trigger an event while the event does everything on actor 1

however that would still allow you to use the skill even when actor 1 is dead.
 

Wavelength

MSD Strong
Global Mod
Joined
Jul 22, 2014
Messages
5,969
Reaction score
5,596
First Language
English
Primarily Uses
RMVXA
Yeah, I think you could do something like (target._actorId === n) where n is the ID of the actor in the database. That should evaluate to either 'true' or 'false' depending on whether the target is indeed that actor. I believe this would make the correct notetag (change 7 to whatever ID you want):
Code:
<Custom Target Eval>
  for (var i = 0; i < allies.aliveMembers().length; i++) {
    var member = allies.aliveMembers()[i];
    if (member._actorId === 7) targets.push(member);
  }
  </Custom Target Eval>

PS - In the future, if you need help writing a notetag for an existing script, "Plugin Support" is the correct forum for it (not "Plugin Requests"). Moving this topic to Plugin Support.
 

Grumphlu

Veteran
Veteran
Joined
Mar 25, 2015
Messages
34
Reaction score
8
First Language
Français
Primarily Uses
@Wavelength @Tiamat-86 Thank you so much for your answer, i did it in another way. I just put a Passive State to my character and then with Selection Control target if the actor has this specific state or not. It work realy well. I was using it for summoning a monster by a character then be able to buff only him.

Thanks for your time and have a good day!
 

Latest Threads

Latest Posts

Latest Profile Posts

constructionworkconcept.pngezgif-2-0acb620ecf8d.gifezgif-2-afeaf16ebb8d.gif "The Great Wall is great. But, most people can only be the slaves who built it, leaving their bones underneath that wall. They spent their whole life to build that wall and the empire, an empire that enslaves them." :kaoswt2: I'm just going to turn it into a modern-day sad tale.

No edits, just gameplay from one area to the next. Plus all my new shiny interface stuff... And I even remember to bolt down the portal so it won't escape this time. :kaopride:
You guys just freely offer up your Autonomy?
I don't know about you, but today the covid frustration is seriously getting to me. Haven't really seen many of my friends for two years, since i moved towns the year before this all started, and well, i miss them :(
so, here's a cute alpacaraptor sketch to heighten the mood:
W7Fhp9n.png
Whenever I start on a new chapter, it doesn't feel like the next episodes, but more like sequels :)

Forum statistics

Threads
110,660
Messages
1,055,011
Members
143,785
Latest member
Alessandroiejdhfj
Top