How can I make a skill hit a random enemy?

Soul

Veteran
Veteran
Joined
Aug 14, 2013
Messages
222
Reaction score
59
First Language
English
Primarily Uses
Open up the Database editor, go to the Skills tab, and the option is located under "Scope".
 

_Shadow_

Tech Magician Level:
Moderator
Joined
Mar 2, 2014
Messages
4,078
Reaction score
2,654
First Language
Greek
Primarily Uses
RMMZ
Open up the Database editor, go to the Skills tab, and the option is located under "Scope".
And check for any potential bug fixing scripts... just saying. 
 

Erika Fuzzbottom

Spotted Skunk Dragon
Veteran
Joined
Apr 27, 2015
Messages
97
Reaction score
59
First Language
English
Primarily Uses
Other
I just checked under Scope.  There is no random option in 2k3.  There is an alternative, but it's complicated.  You'd have to create the effect of randomness in every individual enemy troop.

* First, the skill you want to make, change the "Skill Type" to "Switch".  Choose a switch that you'll dedicate for this spell.

* Now, in the enemy troop, you'll want a page condition for that switch being turned on.

* In the script below, set a variable to a random number.  The range will be however enemies are in the troop.  If there are three enemies, set it random from 1-3.  If there's five enemies, set it random from 1-5.  Basically we're assigning each enemy an imaginary number.

* Then, you'll want a conditional branch based on that variable.  If the variable is 1, call a special effect and do to enemy #1 what you want the spell to do.  If the variable is 2, do the same with enemy #2 instead.  And so forth.

* At the end of the script, make sure to turn that switch back off.

Again, you'll have to do this for every troop in the game.  Or at least, the troops that you can encounter while you have this skill.
 

Ninten0

Villager
Member
Joined
Mar 30, 2015
Messages
10
Reaction score
2
First Language
English
Primarily Uses
How do you "call a special effect"
 

Ninten0

Villager
Member
Joined
Mar 30, 2015
Messages
10
Reaction score
2
First Language
English
Primarily Uses
It shows the animation and hits a random enemy (Yay!) but it just shows the animation and doesn't do any damage (Wow using rpg maker 2003 makes me so much more thankful for the conveniences rpg maker vx ace has)
 
Last edited by a moderator:

Erika Fuzzbottom

Spotted Skunk Dragon
Veteran
Joined
Apr 27, 2015
Messages
97
Reaction score
59
First Language
English
Primarily Uses
Other
All the skill does is turn on the switch, so you have to remove the targeted enemy's health, yourself.
 

- Aërendyll -

Noodle arms
Veteran
Joined
Mar 26, 2012
Messages
63
Reaction score
29
First Language
Dutch / Aenese
Primarily Uses
I just checked under Scope.  There is no random option in 2k3.  There is an alternative, but it's complicated.  You'd have to create the effect of randomness in every individual enemy troop.

* First, the skill you want to make, change the "Skill Type" to "Switch".  Choose a switch that you'll dedicate for this spell.

* Now, in the enemy troop, you'll want a page condition for that switch being turned on.

* In the script below, set a variable to a random number.  The range will be however enemies are in the troop.  If there are three enemies, set it random from 1-3.  If there's five enemies, set it random from 1-5.  Basically we're assigning each enemy an imaginary number.

* Then, you'll want a conditional branch based on that variable.  If the variable is 1, call a special effect and do to enemy #1 what you want the spell to do.  If the variable is 2, do the same with enemy #2 instead.  And so forth.

* At the end of the script, make sure to turn that switch back off.

Again, you'll have to do this for every troop in the game.  Or at least, the troops that you can encounter while you have this skill.
Does this method take defeated enemies into account?
 

Marston

Veteran
Veteran
Joined
Dec 9, 2013
Messages
195
Reaction score
40
First Language
German
Primarily Uses
Does this method take defeated enemies into account?
Nope. You have to use conditionals to ask if the monster is alive when the skill is used. If not, reroll to another, if it is, deal damage. And you have to do it for every monster group, as said. There is no easy way to implement a random target or more than 1-times attack skill in 2k3.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:
To whom ever person or persons who re-did the DS/DS+ asset packs for MV (as in, they are all 48x48, and not just x2 the pixel scale) .... THANK-YOU!!!!!!!!! XwwwwX

Forum statistics

Threads
105,853
Messages
1,016,990
Members
137,562
Latest member
tamedeathman
Top