The RPG Maker Resource Kit

RMRK RPG Maker Creation => RPG Maker General => General Tutorials and Eventing => Topic started by: Kail200X on October 29, 2008, 12:53:33 AM

Title: "Switch" Techniques - - Single Target
Post by: Kail200X on October 29, 2008, 12:53:33 AM
Yeah, is it possible to use a technique (a switch one) that targets one specific enemy, as opposed to every monster on the field? @_@
Title: Re: "Switch" Techniques - - Single Target
Post by: Nightwolf on October 30, 2008, 07:44:12 AM
You mean hitting one enemy with an attack instead of all?


if so,
LOL
Title: Re: "Switch" Techniques - - Single Target
Post by: tSwitch on October 30, 2008, 01:15:25 PM
do you mean, a move that could select -either- all enemies on the field, or just one, and change damage based on that?

if so: I'm not sure about it in 2k3, but it could be scripted in XP or VX
Title: Re: "Switch" Techniques - - Single Target
Post by: Nightwolf on October 30, 2008, 01:38:58 PM
lol,  I think he means a move that is like either for one enemy or for all.


In which case, i say again,

LOL
Title: Re: "Switch" Techniques - - Single Target
Post by: Sated on November 01, 2008, 02:07:52 PM
@Ceasar + Andrew: He means a skill that activates a Switch and then targets only one enemy instead of all of them. You use the Skill and it turns on a Switch that activates a an Event in battle. When you use Switch events in battle the DBS will NOT ask you which enemy you want to target, so I am guessing that is the problem here.

@Kail: To answer the question, you can have the attack target only one enemy by using "Change Enemy HP" as part of the event. The player wouldn't be able to choose the enemy that is targetted directly, as I already explained, so you would have to do this yourself. Simply use the "Show Choice" tab to give the player a choice between each enemy on screen and then take the appropriate amount of HP off that target and "Show Battle Animation on that target. You would have to input this for every single enemy group that you made, and edit the choice for every enemy there, so it could be difficult.

I don't see why you would want to do this with a Switch instead of just using a normal attack - any particular reason? Also, if you're still confused I'll write out an example of the exact code needed.
Title: Re: "Switch" Techniques - - Single Target
Post by: Nightwolf on November 01, 2008, 04:37:16 PM
but there's an option in the spell tab in databse which allows you to chose wether it effects one or all enemies..

...


LOL.
If you mean one random enemy, then yes..that may be a problem.
Just put "one enemy" move you arrow keys and press enter at random
Title: Re: "Switch" Techniques - - Single Target
Post by: Kail200X on November 01, 2008, 06:41:50 PM
Well, for example... a skill that attacks each enemy, but not all at once (think PSI Thunder). The switch activates, and the spell is cast x number of times, hitting (or missing) an enemy each time.
Title: Re: "Switch" Techniques - - Single Target
Post by: Sated on November 01, 2008, 07:21:54 PM
Quote from: RMRK on November 01, 2008, 04:37:16 PM
but there's an option in the spell tab in databse which allows you to chose wether it effects one or all enemies.

Not for Switch events, hence the point...

Quote from: KailWell, for example... a skill that attacks each enemy, but not all at once (think PSI Thunder). The switch activates, and the spell is cast x number of times, hitting (or missing) an enemy each time.

In that case, for each enemy group you're going to have to make a seperate event. They'll all basically be edited versions of this kind of thing, though...

>Change Var: Var[xxxx: Random Monster Choice] Set Random: 0-1
>If Var[xxxx: Random Monster Choice] Equals 0 Then
  >Show Battle Animation: Lightning: Monster 1
  >Change Monster 1 HP: Some Value Here
>End If
>If Var[xxxx: Random Monster Choice Equals 1 Then
  >Show Battle Animation: Lightning: Monster 2
  >Change Monster 2 HP: Some Value Here
>End If


You just need to repeat this over as many times as you want the attack to hit, and remember to change the random choice so that it equals the right number of monsters and change the If statements so the right number are available... I guess that's kinda obvious. You could also use a loop rather than repeating the same thing over and over so you could reduce the number of things you need to change. Also, if you want the attack to hit a random number of times each time it is cast then you could modify the loop so that it happens a random number of times before dropping out. If you want something more like that I could show you that too.

Haha, I may well have to steal this idea...
Title: Re: "Switch" Techniques - - Single Target
Post by: Kail200X on November 01, 2008, 07:32:47 PM
^o^ This'll be great for PSI thunder... now I just have to work out a damage algorythm. x3...
Title: Re: "Switch" Techniques - - Single Target
Post by: Sated on November 01, 2008, 08:07:02 PM
I forgot to mention, you'll need to add a message telling the player that damage has been done or the player won't actually know...

Message: Superman did \v[xxxx] damage to Spiderman.

Or whatever.
Title: Re: "Switch" Techniques - - Single Target
Post by: Kail200X on November 01, 2008, 08:10:06 PM
Actually, if you reduce the HP, then the damage done will show. I've used it to make a Graviga spell once upon a time, so... yah ^^;
Title: Re: "Switch" Techniques - - Single Target
Post by: Sated on November 01, 2008, 08:21:19 PM
Oh, are you using RM2K3? RM2K isn't quite as smart. :P