RMRK is retiring.
Server is paid up for the rest of 2026, but the forum may go after that. See here for more information. Please archive or save anything you would like to keep before 2027.
Main Menu
  • Welcome to The RPG Maker Resource Kit.

Targetting Enemies AND party with the same skill.

Started by Xelzor, September 27, 2006, 01:59:43 PM

0 Members and 1 Guest are viewing this topic.

Xelzor

Hey,

I feel like this MUST be something a billion people have already asked about, but I cannot, for the life of me, find anything about it....

Is there a script anywhere to allow you to create skills that can be used on both party members AND monsters?  (i.e. "ooh, I should use my Cure spell on this zombie and hurt it!" or "I have a character that is healed by fire spells for some stupid reason!")

On that note, as well, is there a way to make it such that you could ATTACK your buddies?

The major problem I see with all of this is how monsters would deal with the ability to target ANYTHING they wished -- odds are, they'd end up roasting themselves with their own magic.

If anyone can point me in the right direction on this matter, it would be greatly appreciated!  I can't tell if scripting this would be an unfathomable mess, or just a single line plopped down somewhere.

Thanks!

          ~ Nicholai

Blizzard

Use this snipplet:


IDS = []

class Scene_Battle
 
  alias make_skill_action_result_target_all_later make_skill_action_result
  def make_skill_action_result
    if IDS.include?(@active_battler.current_action.skill_id)
      @target_battlers = []
      for enemy in $game_troop.enemies
        @target_battlers.push(enemy) if enemy.exist?
      end
      for actor in $game_party.actors
        @target_battlers.push(actor) if not actor.dead?
      end
    end
    make_skill_action_result_target_all_later
  end

end


Add IDs of skills that target all enemies and all actors into the IDS = [1, 2, 3] etc. and make them target nobody.
Get King of Booze for Android, for iOS, for OUYA or for Windows!
Visit our website.
You can also love/hate us on Facebook or the game itself.



Get DropBox, the best free file syncing service there is!

Xelzor

Hey,

I must be some kind of jackass or something, because I just realized that I phrased that question rather stupidly;

What I meant was more along the lines of having a skill that only targets ONE person, but you can target either a monster OR a party member with it.  So, "Hmm, should I use this cure spell and heal my buddy, OR should I hurt this zombie with it?"

What would be even cooler in addition to that would be being able to choose (on certain skills) whether a it targets one enemy or all enemies.  Is that possible to work out?

Though the code you just sent me is kind of interesting as well!  I suspect I can probably come up with some uses for it!

Thanks!

       ~ Nicholai

Blizzard

Go to www.hbgames.org/forums and find a script by "Trickster" that allows that. Sadly I forgot how it is called, but I think it was "Advanced Targeting" or something like this.
Get King of Booze for Android, for iOS, for OUYA or for Windows!
Visit our website.
You can also love/hate us on Facebook or the game itself.



Get DropBox, the best free file syncing service there is!