Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

 
Reply to this topicStart new topic
> Attacking Allies (solved), Is it possible?
LostSamurai
post Feb 13 2012, 11:35 AM
Post #1


Atrius
Group Icon

Group: Revolutionary
Posts: 144
Type: Musician
RM Skill: Advanced




I was wondering if it was possible to allow/modify the attack command (using RMXP's default battle system) to allow targeting allies rather than just enemies.

I need this for one particular fight only, and I would like to apply it only to one battle.

This is extremely crucial for my game, please help! biggrin.gif

It would be extremely beneficial if I could also make harmful spells target allies for this one particular fight as well, but that's not necessary.

This post has been edited by LostSamurai: Feb 22 2012, 06:48 PM


__________________________
Oh dear... it seems I may have one more project left in me before I retire... more info soon.

My Website

Ikode: The World of Infinity
Ikode 2: The Supreme Dragon
Ikode 3: Broken Mirror

The Two Moons (Joke RPG)
Go to the top of the page
 
+Quote Post
   
Jens of Zanicuud
post Feb 13 2012, 01:02 PM
Post #2


Dark Jentleman
Group Icon

Group: Local Mod
Posts: 904
Type: Scripter
RM Skill: Skilled
Rev Points: 120




This could be done, but requires a bit of scripting, since you should modify:

classes
Arrow_Enemy
Arrow_Actor
Scene_Battle 3

I've no time ATM, but if you wait three/four days, I can script it.
Before this, I need to know what Battle System you are using.
Without this info, nobody could create a system like this without finding compatibilities issues...

Well, let me know...

Jens

This post has been edited by Jens of Zanicuud: Feb 13 2012, 01:02 PM


__________________________
"Thorns are the rose's sweetest essence..."
-Jens of Zanicuud


Games I'm working on:
>

official website: TryAdIne eFfeCt

>

Games I worked on (mainly as a scripter):
>
(Warning: it's a 3rr3's project and it's in Italian!)


Awards

Go to the top of the page
 
+Quote Post
   
LostSamurai
post Feb 13 2012, 09:19 PM
Post #3


Atrius
Group Icon

Group: Revolutionary
Posts: 144
Type: Musician
RM Skill: Advanced




I'm using the RMXP default battle system. I have a few scripts modifying the battle system (sandgolem quicker combat, sandgolem levelup animation, jens009 view SP recovery, jens009 defend restores SP, and sandgolem autobattle.) I don't think any of them modify the scripts you're mentioning, so it should be compatible.

Also, would it be possible to make this only apply for one battle? There's only one battle in my game that requires attacking your own allies.

This post has been edited by LostSamurai: Feb 13 2012, 09:20 PM


__________________________
Oh dear... it seems I may have one more project left in me before I retire... more info soon.

My Website

Ikode: The World of Infinity
Ikode 2: The Supreme Dragon
Ikode 3: Broken Mirror

The Two Moons (Joke RPG)
Go to the top of the page
 
+Quote Post
   
Jens of Zanicuud
post Feb 14 2012, 12:24 AM
Post #4


Dark Jentleman
Group Icon

Group: Local Mod
Posts: 904
Type: Scripter
RM Skill: Skilled
Rev Points: 120




Urgh! Xcuse me, but this sounds... terrible. In my opinion, you should keep this setting active, it's the player choosing what to do. If he/she is dumb enough to attack their allies when not needed, well, it would not be your fault.

You provide the mechanics, how to use them is to the player smile.gif

Ok, then. Wait four days and I'll script it.

Jens


__________________________
"Thorns are the rose's sweetest essence..."
-Jens of Zanicuud


Games I'm working on:
>

official website: TryAdIne eFfeCt

>

Games I worked on (mainly as a scripter):
>
(Warning: it's a 3rr3's project and it's in Italian!)


Awards

Go to the top of the page
 
+Quote Post
   
LostSamurai
post Feb 14 2012, 10:03 AM
Post #5


Atrius
Group Icon

Group: Revolutionary
Posts: 144
Type: Musician
RM Skill: Advanced




Very true. I didn't think about that. Not to mention, if all of a sudden you can attack your allies for one battle, the puzzle will be pretty obvious. hehe

Thank you very much. I look forward to this smile.gif


__________________________
Oh dear... it seems I may have one more project left in me before I retire... more info soon.

My Website

Ikode: The World of Infinity
Ikode 2: The Supreme Dragon
Ikode 3: Broken Mirror

The Two Moons (Joke RPG)
Go to the top of the page
 
+Quote Post
   
Jens of Zanicuud
post Feb 15 2012, 01:17 PM
Post #6


Dark Jentleman
Group Icon

Group: Local Mod
Posts: 904
Type: Scripter
RM Skill: Skilled
Rev Points: 120




I've not forgotten your request, but I have to adapt one of my old scripts to fulfill it.
When I finish it, I'll reply here.

Jens

This post has been edited by Jens of Zanicuud: Feb 15 2012, 01:17 PM


__________________________
"Thorns are the rose's sweetest essence..."
-Jens of Zanicuud


Games I'm working on:
>

official website: TryAdIne eFfeCt

>

Games I worked on (mainly as a scripter):
>
(Warning: it's a 3rr3's project and it's in Italian!)


Awards

Go to the top of the page
 
+Quote Post
   
Vexus
post Feb 15 2012, 02:24 PM
Post #7


Level 19
Group Icon

Group: Revolutionary
Posts: 395
Type: Mapper
RM Skill: Intermediate




Give this script a try maybe it works:

http://forum.chaos-project.com/index.php?topic=2506.0


__________________________
Current Project/s:
Go to the top of the page
 
+Quote Post
   
TheCableGuy
post Feb 16 2012, 07:12 PM
Post #8


Level 4
Group Icon

Group: Member
Posts: 58
Type: Mapper
RM Skill: Beginner




If it's only for one battle, sounds like you could do better with an Event. Make a Doppelganger Enemy and have the event switch out your Ally for the enemy.

Of course, I reckon it might depend on how you want the Fight to occur, but that's the first thing I thought of.
Go to the top of the page
 
+Quote Post
   
Jens of Zanicuud
post Feb 17 2012, 01:44 AM
Post #9


Dark Jentleman
Group Icon

Group: Local Mod
Posts: 904
Type: Scripter
RM Skill: Skilled
Rev Points: 120




QUOTE (TheCableGuy @ Feb 17 2012, 04:12 AM) *
If it's only for one battle, sounds like you could do better with an Event. Make a Doppelganger Enemy and have the event switch out your Ally for the enemy.

Of course, I reckon it might depend on how you want the Fight to occur, but that's the first thing I thought of.


I'm sorry, but it think this could be tremendously inefficient, since events are not so easy to manage in RMXP battle system.
Moreover, if I understood correctly, you should be able to attak even enemies, not only allies in that battle.

@LostSamurai

Tell me if the script linked by Vexus works properly for you. If the answer is "No, it doesn't" I'll script it, if the answer is "Yes, it works in a perfect way" I'll consider this request solved.

Jens

This post has been edited by Jens of Zanicuud: Feb 17 2012, 01:45 AM


__________________________
"Thorns are the rose's sweetest essence..."
-Jens of Zanicuud


Games I'm working on:
>

official website: TryAdIne eFfeCt

>

Games I worked on (mainly as a scripter):
>
(Warning: it's a 3rr3's project and it's in Italian!)


Awards

Go to the top of the page
 
+Quote Post
   
LostSamurai
post Feb 17 2012, 09:32 AM
Post #10


Atrius
Group Icon

Group: Revolutionary
Posts: 144
Type: Musician
RM Skill: Advanced




I apprecaite your help Vexus, but that script is not what I am looking for. It does not allow the characters to attack their allies.

@TheCableGuy I currently have events to (sort of) deal with the problem. However, it's very sloppy and doesn't make for a very good puzzle.


__________________________
Oh dear... it seems I may have one more project left in me before I retire... more info soon.

My Website

Ikode: The World of Infinity
Ikode 2: The Supreme Dragon
Ikode 3: Broken Mirror

The Two Moons (Joke RPG)
Go to the top of the page
 
+Quote Post
   
Jens of Zanicuud
post Feb 17 2012, 12:39 PM
Post #11


Dark Jentleman
Group Icon

Group: Local Mod
Posts: 904
Type: Scripter
RM Skill: Skilled
Rev Points: 120




Alright, I'll script it then...

Jens


__________________________
"Thorns are the rose's sweetest essence..."
-Jens of Zanicuud


Games I'm working on:
>

official website: TryAdIne eFfeCt

>

Games I worked on (mainly as a scripter):
>
(Warning: it's a 3rr3's project and it's in Italian!)


Awards

Go to the top of the page
 
+Quote Post
   
Vexus
post Feb 17 2012, 12:40 PM
Post #12


Level 19
Group Icon

Group: Revolutionary
Posts: 395
Type: Mapper
RM Skill: Intermediate




Ops sorry I posted that link in the wrong thread blush.gif

This post has been edited by Vexus: Feb 17 2012, 12:40 PM


__________________________
Current Project/s:
Go to the top of the page
 
+Quote Post
   
Jens of Zanicuud
post Feb 17 2012, 01:27 PM
Post #13


Dark Jentleman
Group Icon

Group: Local Mod
Posts: 904
Type: Scripter
RM Skill: Skilled
Rev Points: 120




This should let you to attack your allies. Beware this script could be not compatible with a custom battle script.
Paste this above main.

CODE
#==============================================================================
#=#============================================================================
# #** Jens of Zanicuud target script v 1.0
# #   -free use, just credit
# #   -free customization, however, posting on RRR the modified version is
# #    mandatory
# #   -you can find me on www.rpgrevolution.com
#=#============================================================================
#==============================================================================

#==============================================================================
# ** Arrow_All
#------------------------------------------------------------------------------
#  This arrow cursor is used to choose targets. This class inherits from the
#  Arrow_Base class.
#==============================================================================

class Arrow_All < Arrow_Base
  def initialize(viewport,for_actors)
   @for_actors = for_actors
   if for_actors
    @troop = $game_party.actors + $game_troop.enemies
  else
    @troop = $game_troop.enemies + $game_party.actors
  end
  super(viewport)
  end
  #--------------------------------------------------------------------------
  # * Get Enemy Indicated by Cursor
  #--------------------------------------------------------------------------
  def target
    return @troop[@index]
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    super
    # Skip if indicating a nonexistant target
    @troop.size.times do
      break if self.target.exist?
      @index += 1
      @index %= @troop.size
    end
    # Cursor right
    if Input.repeat?(Input::RIGHT)
      $game_system.se_play($data_system.cursor_se)
      @troop.size.times do
        @index += 1
        @index %= @troop.size
        break if self.target.exist?
      end
    end
    # Cursor left
    if Input.repeat?(Input::LEFT)
      $game_system.se_play($data_system.cursor_se)
      @troop.size.times do
        @index += @troop.size - 1
        @index %= @troop.size
        break if self.target.exist?
      end
    end
    # Set sprite coordinates
    if self.target != nil
      self.x = self.target.screen_x
      self.y = self.target.screen_y
    end
  end
  #--------------------------------------------------------------------------
  # * Help Text Update
  #--------------------------------------------------------------------------
  def update_help
    # Display enemy name and state in the help window
    if self.target.is_a?(Game_Enemy)
    @help_window.set_enemy(self.target)
    else
    @help_window.set_actor(self.target)
    end
  end
end

#==============================================================================
# ** Scene_Battle
#==============================================================================
class Scene_Battle
  #--------------------------------------------------------------------------
  # * Start Actor Selection
  #--------------------------------------------------------------------------
  def start_actor_select
    # Make actor arrow
    @actor_arrow = Arrow_All.new(@spriteset.viewport2,true)
    @actor_arrow.index = @actor_index
    # Associate help window
    @actor_arrow.help_window = @help_window
    # Disable actor command window
    @actor_command_window.active = false
    @actor_command_window.visible = false
  end
  #--------------------------------------------------------------------------
  # * Start Enemy Selection
  #--------------------------------------------------------------------------
  def start_enemy_select
    # Make enemy arrow
    @enemy_arrow =  Arrow_All.new(@spriteset.viewport2,false)
    # Associate help window
    @enemy_arrow.help_window = @help_window
    # Disable actor command window
    @actor_command_window.active = false
    @actor_command_window.visible = false
  end
  #--------------------------------------------------------------------------
  # * Set target for skills & items
  #--------------------------------------------------------------------------
  def set_target_battlers(scope)
    # If battler performing action is enemy
    if @active_battler.is_a?(Game_Enemy)
      # Branch by effect scope
      case scope
      when 1  # single enemy
        index = @active_battler.current_action.target_index
        @target_battlers.push($game_party.smooth_target_actor(index))
      when 2  # all enemies
        for actor in $game_party.actors
          if actor.exist?
            @target_battlers.push(actor)
          end
        end
      when 3  # single ally
        index = @active_battler.current_action.target_index
        @target_battlers.push($game_troop.smooth_target_enemy(index))
      when 4  # all allies
        for enemy in $game_troop.enemies
          if enemy.exist?
            @target_battlers.push(enemy)
          end
        end
      when 5  # single ally (HP 0)
        index = @active_battler.current_action.target_index
        enemy = $game_troop.enemies[index]
        if enemy != nil and enemy.hp0?
          @target_battlers.push(enemy)
        end
      when 6  # all allies (HP 0)
        for enemy in $game_troop.enemies
          if enemy != nil and enemy.hp0?
            @target_battlers.push(enemy)
          end
        end
      when 7  # user
        @target_battlers.push(@active_battler)
      end
    end
    # If battler performing action is actor
    if @active_battler.is_a?(Game_Actor)
      case scope
      when 1  # single enemy
        index = @active_battler.current_action.target_index
        if index < $game_troop.enemies.size
          @target_battlers.push($game_troop.smooth_target_enemy(index))
        else
          @target_battlers.push($game_party.smooth_target_actor(index-$game_troop.enemies.size))
        end
      when 2 # all enemies
        for enemy in $game_troop.enemies
          if enemy.exist?
            @target_battlers.push(enemy)
          end
        end
      when 3  #fellow actor
        index = @active_battler.current_action.target_index
        if index > $game_party.actors.size-1
          @target_battlers.push($game_troop.smooth_target_enemy(index-$game_party.actors.size))
        else
          @target_battlers.push($game_party.smooth_target_actor(index))
          end
      when 4  # all allies
        for actor in $game_party.actors
          if actor.exist?
            @target_battlers.push(actor)
          end
        end
      when 5  # fellow (HP 0)
        index = @active_battler.current_action.target_index
        if index>$game_party.actors.size-1
           enemy = $game_troop.enemies[index-$game_party.actors.size]
          if enemy != nil
          @target_battlers.push(enemy)
          end
        else
          actor = $game_party.actors[index]
          if actor != nil
          @target_battlers.push(actor)
        end
          end
      when 6  # all allies (HP 0)
        for actor in $game_party.actors
          if actor != nil and actor.hp0?
            @target_battlers.push(actor)
          end
        end
      when 7  # self
        @target_battlers.push(@active_battler)
      end
    end
  end
  #--------------------------------------------------------------------------
  # * Make Basic Action Results
  #--------------------------------------------------------------------------
  def make_basic_action_result
    # If attack
    if @active_battler.current_action.basic == 0
      # Set anaimation ID
      @animation1_id = @active_battler.animation1_id
      @animation2_id = @active_battler.animation2_id
      # If action battler is enemy
      if @active_battler.is_a?(Game_Enemy)
        if @active_battler.restriction == 3
          target = $game_troop.random_target_enemy
        elsif @active_battler.restriction == 2
          target = $game_party.random_target_actor
        else
          index = @active_battler.current_action.target_index
          target = $game_party.smooth_target_actor(index)
        end
      end
      # If action battler is actor
      if @active_battler.is_a?(Game_Actor)
        if @active_battler.restriction == 3
          target = $game_party.random_target_actor
        elsif @active_battler.restriction == 2
          target = $game_troop.random_target_enemy
        else
          
        index = @active_battler.current_action.target_index

        if index < $game_troop.enemies.size
          target = $game_troop.smooth_target_enemy(index)
        else
          target = $game_party.smooth_target_actor(index-$game_troop.enemies.size)
        end
      
        end
      end
      # Set array of targeted battlers
      @target_battlers = [target]
      # Apply normal attack results
      for target in @target_battlers
        target.attack_effect(@active_battler)
      end
      return
    end
    # If guard
    if @active_battler.current_action.basic == 1
      # Display "Guard" in help window
      @help_window.set_text($data_system.words.guard, 1)
      return
    end
    # If escape
    if @active_battler.is_a?(Game_Enemy) and
       @active_battler.current_action.basic == 2
      # Display "Escape" in help window
      @help_window.set_text("Escape", 1)
      # Escape
      @active_battler.escape
      return
    end
    # If doing nothing
    if @active_battler.current_action.basic == 3
      # Clear battler being forced into action
      $game_temp.forcing_battler = nil
      # Shift to step 1
      @phase4_step = 1
      return
    end
  end
    end


BTW, rigene script is ready&working. Check the other topic's last post...
Ask for troubleshooting anytime.

I hope this can help...

Jens


__________________________
"Thorns are the rose's sweetest essence..."
-Jens of Zanicuud


Games I'm working on:
>

official website: TryAdIne eFfeCt

>

Games I worked on (mainly as a scripter):
>
(Warning: it's a 3rr3's project and it's in Italian!)


Awards

Go to the top of the page
 
+Quote Post
   
LostSamurai
post Feb 17 2012, 02:15 PM
Post #14


Atrius
Group Icon

Group: Revolutionary
Posts: 144
Type: Musician
RM Skill: Advanced




That works perfectly! Thank you very much biggrin.gif


__________________________
Oh dear... it seems I may have one more project left in me before I retire... more info soon.

My Website

Ikode: The World of Infinity
Ikode 2: The Supreme Dragon
Ikode 3: Broken Mirror

The Two Moons (Joke RPG)
Go to the top of the page
 
+Quote Post
   
TheCableGuy
post Feb 18 2012, 09:06 PM
Post #15


Level 4
Group Icon

Group: Member
Posts: 58
Type: Mapper
RM Skill: Beginner




QUOTE (Jens of Zanicuud @ Feb 17 2012, 02:44 AM) *
I'm sorry, but it think this could be tremendously inefficient, since events are not so easy to manage in RMXP battle system.
Moreover, if I understood correctly, you should be able to attak even enemies, not only allies in that battle.


Understood. I'm not really a Scripter so that's outside my range. I've just been working with events lot so that's the limit of my knowledge.

It was just a suggestion but maybe I should of kept it to myself.
Go to the top of the page
 
+Quote Post
   
LostSamurai
post Feb 19 2012, 10:09 AM
Post #16


Atrius
Group Icon

Group: Revolutionary
Posts: 144
Type: Musician
RM Skill: Advanced




QUOTE
It was just a suggestion but maybe I should of kept it to myself.


Don't be silly! Suggestions are always welcome and appreciated. Sometimes they are just not what's needed at the time. But there's always multiple ways to solve a problem. I originally used events to pseudo-solve this problem, but it was very sloppy. The script made everything much... cleaner.


__________________________
Oh dear... it seems I may have one more project left in me before I retire... more info soon.

My Website

Ikode: The World of Infinity
Ikode 2: The Supreme Dragon
Ikode 3: Broken Mirror

The Two Moons (Joke RPG)
Go to the top of the page
 
+Quote Post
   
LostSamurai
post Feb 21 2012, 05:54 PM
Post #17


Atrius
Group Icon

Group: Revolutionary
Posts: 144
Type: Musician
RM Skill: Advanced




Ummm, there's a massive glitch that I just noticed. I am unable to target dead allies. This means I am unable to use ressurection spells or items in combat. This is game breaking, please help!


__________________________
Oh dear... it seems I may have one more project left in me before I retire... more info soon.

My Website

Ikode: The World of Infinity
Ikode 2: The Supreme Dragon
Ikode 3: Broken Mirror

The Two Moons (Joke RPG)
Go to the top of the page
 
+Quote Post
   
Jens of Zanicuud
post Feb 22 2012, 12:55 PM
Post #18


Dark Jentleman
Group Icon

Group: Local Mod
Posts: 904
Type: Scripter
RM Skill: Skilled
Rev Points: 120




Try replacing my old script with this:

CODE
#==============================================================================
#=#============================================================================
# #** Jens of Zanicuud target script v 1.1
# #   -free use, just credit
# #   -free customization, however, posting on RRR the modified version is
# #    mandatory
# #   -you can find me on www.rpgrevolution.com
#=#============================================================================
#==============================================================================

#==============================================================================
# ** Arrow_All
#------------------------------------------------------------------------------
#  This arrow cursor is used to choose targets. This class inherits from the
#  Arrow_Base class.
#==============================================================================

class Arrow_All < Arrow_Base
  def initialize(viewport,for_actors)
   @for_actors = for_actors
   if for_actors
    @troop = $game_party.actors + $game_troop.enemies
  else
    @troop = $game_troop.enemies + $game_party.actors
  end
  super(viewport)
  end
  #--------------------------------------------------------------------------
  # * Get Enemy Indicated by Cursor
  #--------------------------------------------------------------------------
  def target
    return @troop[@index]
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    super
    # Skip if indicating a nonexistant target
    @troop.size.times do
      if (self.target.exist? or self.target.is_a?(Game_Actor))
      break
    end
      @index += 1
      @index %= @troop.size
    end
    # Cursor right
    if Input.repeat?(Input::RIGHT)
      $game_system.se_play($data_system.cursor_se)
      @troop.size.times do
        @index += 1
        @index %= @troop.size
    if (self.target.exist? or self.target.is_a?(Game_Actor))
      break
    end
      end
    end
    # Cursor left
    if Input.repeat?(Input::LEFT)
      $game_system.se_play($data_system.cursor_se)
      @troop.size.times do
        @index += @troop.size - 1
        @index %= @troop.size
    if (self.target.exist? or self.target.is_a?(Game_Actor))
      break
    end
      end
    end
    # Set sprite coordinates
    if self.target != nil
      self.x = self.target.screen_x
      self.y = self.target.screen_y
    end
  end
  #--------------------------------------------------------------------------
  # * Help Text Update
  #--------------------------------------------------------------------------
  def update_help
    # Display enemy name and state in the help window
    if self.target.is_a?(Game_Enemy)
    @help_window.set_enemy(self.target)
    else
    @help_window.set_actor(self.target)
    end
  end
end

#==============================================================================
# ** Scene_Battle
#==============================================================================
class Scene_Battle
  attr_reader :active_battler
  #--------------------------------------------------------------------------
  # * Start Actor Selection
  #--------------------------------------------------------------------------
  def start_actor_select
    # Make actor arrow
    @actor_arrow = Arrow_All.new(@spriteset.viewport2,true)
    @actor_arrow.index = @actor_index
    # Associate help window
    @actor_arrow.help_window = @help_window
    # Disable actor command window
    @actor_command_window.active = false
    @actor_command_window.visible = false
  end
  #--------------------------------------------------------------------------
  # * Start Enemy Selection
  #--------------------------------------------------------------------------
  def start_enemy_select
    # Make enemy arrow
    @enemy_arrow =  Arrow_All.new(@spriteset.viewport2,false)
    # Associate help window
    @enemy_arrow.help_window = @help_window
    # Disable actor command window
    @actor_command_window.active = false
    @actor_command_window.visible = false
  end
  #--------------------------------------------------------------------------
  # * Set target for skills & items
  #--------------------------------------------------------------------------
  def set_target_battlers(scope)
    # If battler performing action is enemy
    if @active_battler.is_a?(Game_Enemy)
      # Branch by effect scope
      case scope
      when 1  # single enemy
        index = @active_battler.current_action.target_index
        @target_battlers.push($game_party.smooth_target_actor(index))
      when 2  # all enemies
        for actor in $game_party.actors
          if actor.exist?
            @target_battlers.push(actor)
          end
        end
      when 3  # single ally
        index = @active_battler.current_action.target_index
        @target_battlers.push($game_troop.smooth_target_enemy(index))
      when 4  # all allies
        for enemy in $game_troop.enemies
          if enemy.exist?
            @target_battlers.push(enemy)
          end
        end
      when 5  # single ally (HP 0)
        index = @active_battler.current_action.target_index
        enemy = $game_troop.enemies[index]
        if enemy != nil and enemy.hp0?
          @target_battlers.push(enemy)
        end
      when 6  # all allies (HP 0)
        for enemy in $game_troop.enemies
          if enemy != nil and enemy.hp0?
            @target_battlers.push(enemy)
          end
        end
      when 7  # user
        @target_battlers.push(@active_battler)
      end
    end
    # If battler performing action is actor
    if @active_battler.is_a?(Game_Actor)
      case scope
      when 1  # single enemy
        index = @active_battler.current_action.target_index
        if index < $game_troop.enemies.size
          @target_battlers.push($game_troop.smooth_target_enemy(index))
        else
          @target_battlers.push($game_party.smooth_target_actor(index-$game_troop.enemies.size))
        end
      when 2 # all enemies
        for enemy in $game_troop.enemies
          if enemy.exist?
            @target_battlers.push(enemy)
          end
        end
      when 3  #fellow actor
        index = @active_battler.current_action.target_index
        if index > $game_party.actors.size-1
          @target_battlers.push($game_troop.smooth_target_enemy(index-$game_party.actors.size))
        else
          @target_battlers.push($game_party.smooth_target_actor(index))
          end
      when 4  # all allies
        for actor in $game_party.actors
          if actor.exist?
            @target_battlers.push(actor)
          end
        end
      when 5  # fellow (HP 0)
        index = @active_battler.current_action.target_index
        if index>$game_party.actors.size-1
           enemy = $game_troop.enemies[index-$game_party.actors.size]
          if enemy != nil
          @target_battlers.push(enemy)
          end
        else
          actor = $game_party.actors[index]
          if actor != nil
          @target_battlers.push(actor)
        end
          end
      when 6  # all allies (HP 0)
        for actor in $game_party.actors
          if actor != nil and actor.hp0?
            @target_battlers.push(actor)
          end
        end
      when 7  # self
        @target_battlers.push(@active_battler)
      end
    end
  end
  #--------------------------------------------------------------------------
  # * Make Basic Action Results
  #--------------------------------------------------------------------------
  def make_basic_action_result
    # If attack
    if @active_battler.current_action.basic == 0
      # Set anaimation ID
      @animation1_id = @active_battler.animation1_id
      @animation2_id = @active_battler.animation2_id
      # If action battler is enemy
      if @active_battler.is_a?(Game_Enemy)
        if @active_battler.restriction == 3
          target = $game_troop.random_target_enemy
        elsif @active_battler.restriction == 2
          target = $game_party.random_target_actor
        else
          index = @active_battler.current_action.target_index
          target = $game_party.smooth_target_actor(index)
        end
      end
      # If action battler is actor
      if @active_battler.is_a?(Game_Actor)
        if @active_battler.restriction == 3
          target = $game_party.random_target_actor
        elsif @active_battler.restriction == 2
          target = $game_troop.random_target_enemy
        else
          
        index = @active_battler.current_action.target_index

        if index < $game_troop.enemies.size
          target = $game_troop.smooth_target_enemy(index)
        else
          target = $game_party.smooth_target_actor(index-$game_troop.enemies.size)
        end
      
        end
      end
      # Set array of targeted battlers
      @target_battlers = [target]
      # Apply normal attack results
      for target in @target_battlers
        target.attack_effect(@active_battler)
      end
      return
    end
    # If guard
    if @active_battler.current_action.basic == 1
      # Display "Guard" in help window
      @help_window.set_text($data_system.words.guard, 1)
      return
    end
    # If escape
    if @active_battler.is_a?(Game_Enemy) and
       @active_battler.current_action.basic == 2
      # Display "Escape" in help window
      @help_window.set_text("Escape", 1)
      # Escape
      @active_battler.escape
      return
    end
    # If doing nothing
    if @active_battler.current_action.basic == 3
      # Clear battler being forced into action
      $game_temp.forcing_battler = nil
      # Shift to step 1
      @phase4_step = 1
      return
    end
  end
    end


This should work, though I'm not certain at 100%.
I hope this can help...

Jens

This post has been edited by Jens of Zanicuud: Feb 22 2012, 01:00 PM


__________________________
"Thorns are the rose's sweetest essence..."
-Jens of Zanicuud


Games I'm working on:
>

official website: TryAdIne eFfeCt

>

Games I worked on (mainly as a scripter):
>
(Warning: it's a 3rr3's project and it's in Italian!)


Awards

Go to the top of the page
 
+Quote Post
   
LostSamurai
post Feb 22 2012, 06:47 PM
Post #19


Atrius
Group Icon

Group: Revolutionary
Posts: 144
Type: Musician
RM Skill: Advanced




Yes! This worked. Thank you!


__________________________
Oh dear... it seems I may have one more project left in me before I retire... more info soon.

My Website

Ikode: The World of Infinity
Ikode 2: The Supreme Dragon
Ikode 3: Broken Mirror

The Two Moons (Joke RPG)
Go to the top of the page
 
+Quote Post
   

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 19th May 2013 - 11:37 AM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker