Xyzoxious

Villager
Member
Joined
Oct 11, 2017
Messages
12
Reaction score
1
First Language
English
Primarily Uses
RMVXA
Hey guys!
I'm currently making an attack that hits really hard! The downside to using it is that it targets a random enemy OR ally... But I'm having trouble figuring out how to do that.

I also have Yanfly's Battle Engine Core and Action Sequence Packs 1, 2 and 3. I just haven't figured out how to target a random enemy or ally with the base RPG Maker or Action Sequence Pack. Any solutions?
 

Mystic_Enigma

A scattered memory, hoping to be recalled...
Veteran
Joined
Mar 7, 2018
Messages
333
Reaction score
1,728
First Language
English
Primarily Uses
RMMV
You could have the skill apply an "invisible" state that forces the user to attack randomly before an attack is launched. I'm not too versed in the Action Sequences, but that's a start.
 

Silva

Scoobityboo
Veteran
Joined
Nov 5, 2018
Messages
406
Reaction score
232
First Language
English
Primarily Uses
RMMV

Terozu

That guy who started two years ago. (wow O:)
Veteran
Joined
Mar 3, 2019
Messages
58
Reaction score
39
First Language
English
Primarily Uses
RMMV
If you'd prefer to not use plugins, make it so a dummy skill the player can select activates a common event, then have that common event make the actor use the actual skill on a random target, via the third page's Force Action command, you can select "Random" from the target drop down menu.

I don't know for sure if this is truly random though tbh.
 
Last edited:

Xyzoxious

Villager
Member
Joined
Oct 11, 2017
Messages
12
Reaction score
1
First Language
English
Primarily Uses
RMVXA
You could have the skill apply an "invisible" state that forces the user to attack randomly before an attack is launched. I'm not too versed in the Action Sequences, but that's a start.

I hadn't thought of that, but unfortunately, it doesn't work. The skill's "Scope" overrides the state that the character receives through Action Sequences...

I'd advise looking at Yanfly's Target Core, specifically this notetag:

<Target: x Random Any>

This worked great! Unfortunately, it also targets the user, which is what I do not want... Any way to exclude the user of the skill?

If you'd prefer to not use plugins, make it so a dummy skill the player can select activates a common event, then have that common event make the actor use the actual skill on a random target, via the third page's Force Action command, you can select "Random" from the target drop down menu.

I don't know for sure if this is truly random though tbh.
Would that not be the same as using the Target Core plugin? I feel like this would also make the user a target.

EDIT: Also, any monster/actor in my game is going to be able to use this skill. Where it asks for the "Subject" to use the skill, I'd have to just pick the actor OR make 300+ common events for each monster/actor that can use the skill, if I'm seeing this correctly.
 
Last edited:

Terozu

That guy who started two years ago. (wow O:)
Veteran
Joined
Mar 3, 2019
Messages
58
Reaction score
39
First Language
English
Primarily Uses
RMMV
If you want enemies to function like this, just make 2 copies of the spell where one targets random allies and the other targets random enemies, then give them equal priority.
 

Silva

Scoobityboo
Veteran
Joined
Nov 5, 2018
Messages
406
Reaction score
232
First Language
English
Primarily Uses
RMMV
This worked great! Unfortunately, it also targets the user, which is what I do not want... Any way to exclude the user of the skill?

I don't see an option in the plugin help but you could just use a custom js eval instead:

Code:
<Custom Target Eval>
choices = foes.aliveMembers();
for (var i = 0; i < allies.aliveMembers().length; i++) {
   member = allies.aliveMembers()[i];
   if (a !== member) {
      choices.push(member);
   }
}
var t = Math.randomInt(choices.length);
targets.push(choices[t]);
</Custom Target Eval>

This should make choices equal to all alive enemies then uses a loop to add every ally that isn't the user. It will then pick a random member of the choices group and make that the target.

EDIT: Original eval would have targeted everyone but the user, not one random target. Updated.
 
Last edited:

jhuetter

Warper
Member
Joined
May 31, 2022
Messages
2
Reaction score
0
First Language
English
Primarily Uses
RMMV
If you want enemies to function like this, just make 2 copies of the spell where one targets random allies and the other targets random enemies, then give them equal priority.
That's genius.
 

Latest Threads

Latest Posts

Latest Profile Posts

Here's a showcase of layers of visual effects I've added over a scene. By stripping them off, one by one. :kaoblush:












Aaaaand, here's me working on the above scene, adding weather effects to it: :kaoeh:


DamageActor1_2.png added!
index.php


Krow and Dova's Cool New Game | Release Trailer

Forum statistics

Threads
124,577
Messages
1,164,526
Members
163,403
Latest member
jirohdyt
Top