hoboayoyo

Regular
Regular
Joined
Oct 29, 2016
Messages
106
Reaction score
23
Primarily Uses
Is there a way to have a state force an actor to randomly target an enemy with the players selected skill?
This is different from confusion when on your turn you do not have control of your actor.
Ex. You can select your skill like normal, but if it's a single target attack the target will be picked randomly.
 

Trihan

Speedy Scripter
Regular
Joined
Apr 12, 2012
Messages
6,879
Reaction score
7,968
First Language
English
Primarily Uses
RMMZ
You could do this with YEP Target Core.
 

hoboayoyo

Regular
Regular
Joined
Oct 29, 2016
Messages
106
Reaction score
23
Primarily Uses
Thanks for the response.
I didn't think Target Core worked with States?
How would I do it with that plugin?
 

Trihan

Speedy Scripter
Regular
Joined
Apr 12, 2012
Messages
6,879
Reaction score
7,968
First Language
English
Primarily Uses
RMMZ
Yeah, you'd have to do it via script calls rather than notetags. I don't have the time right now to figure out the exact syntax though.
 

hoboayoyo

Regular
Regular
Joined
Oct 29, 2016
Messages
106
Reaction score
23
Primarily Uses
Yeah, you'd have to do it via script calls rather than notetags. I don't have the time right now to figure out the exact syntax though.
Finally got back to looking at this. I can't find the syntax that changes the target of an attack. So far I have the following as testing.
<Custom Initiate Effect>
var action = user.currentAction();
console.log("User command target" + user._commandTarget + "action" + action._targetIndex)
console.log("targets " + JSON.stringify(target));
user._commandTarget = 1;
action._targetIndex = 1
</Custom Initiate Effect>
 

MemoriesLP

Regular
Regular
Joined
Jun 12, 2016
Messages
41
Reaction score
11
First Language
Portuguese
Primarily Uses
Code:
  <Custom Target Eval>
  for (var i = 0; i < foes.aliveMembers().length; ++i) {
    var member = foes.aliveMembers()[i];
    if (member.level % 3 === 0) targets.push(member);
  }
  </Custom Target Eval>
Maybe you can use something like this at the Skill. This is at the documentation of Target Core.

If your character is affected by state X, you can make a random variable that randomly chooses an enemy or ally to be the target. Not 100% sure how to do that, I could look in to that.
 

hoboayoyo

Regular
Regular
Joined
Oct 29, 2016
Messages
106
Reaction score
23
Primarily Uses
I'm looking for something I could add to one state instead of adding it to every skill that every actor could use.
 

Latest Threads

Latest Profile Posts

On NEOLITHIC's 2nd Steam Anniversary, we walk on the path of Gabe's blessing. :p
GabeNFaithEN.jpg
What might the petitdevil be thinking right now?
1702054100193.png
And did you leave all your love and comments on the advent calendars today already?
So my babbling about doors and light-blocking makes sense, take a look at a finished lightmap. (Also I cannot take a low enough quality picture to actually get the forums to upload it.)

Boss revives another Boss(ARPG)


anybody likes it?

Forum statistics

Threads
136,841
Messages
1,270,637
Members
180,602
Latest member
ohaithere
Top