Main Menu
  • Welcome to The RPG Maker Resource Kit.

Reflection

Started by LiLTreLL1217, December 01, 2006, 07:26:25 PM

0 Members and 1 Guest are viewing this topic.

LiLTreLL1217

i search after i tried for hours and failed with events and switches. so can somebody please show me how to make it so when somebody attacks you its reflects their attack @ them.
i made it so when u have the "Reflection" status effect, somebody's attack will be reflected back to them but i cant make the attack reflect back @ them. i tried forced action and a lot more stuff. please help.

Owner of ChaosDreamz© Productions.
Progress of:
Silent Dynasty©-Death Nightmare       
Storyline:  |||||||||| [62%]
Mapping:    |||||||||| [3%]
Scripting:  |||||||||| [1%]
Database:   |||||||||| [1%]
Audio:      |||||||||| [1%]
Overall:    ||||||||||[3%]
Demo:    ||||||||||[75%]

Arrow

Which version of the program are you using? If you are using XP, then Blizzard has made a script that should suit your needs perfectly.

LiLTreLL1217

Quote from: arrowone on December 01, 2006, 07:29:57 PM
Which version of the program are you using? If you are using XP, then Blizzard has made a script that should suit your needs perfectly.

yes i am using xp and what should i search? and thank u in advance in case i find it before u post.  ;D

Owner of ChaosDreamz© Productions.
Progress of:
Silent Dynasty©-Death Nightmare       
Storyline:  |||||||||| [62%]
Mapping:    |||||||||| [3%]
Scripting:  |||||||||| [1%]
Database:   |||||||||| [1%]
Audio:      |||||||||| [1%]
Overall:    ||||||||||[3%]
Demo:    ||||||||||[75%]

Arrow

Well, Blizzard made it, so it should be in that topic that...I think BOE made...I'll go check it out. Edit when found.

EDIT: The link in the topic died, but I know it's still around here somewhere. Look for this:

Full Reflection System v1.0b  Blizzard

LiLTreLL1217

Quote from: arrowone on December 01, 2006, 09:06:01 PM
Well, Blizzard made it, so it should be in that topic that...I think BOE made...I'll go check it out. Edit when found.

EDIT: The link in the topic died, but I know it's still around here somewhere. Look for this:

Full Reflection System v1.0b  Blizzard
i searched and all it found was this thread we're typing in right now. :(

Owner of ChaosDreamz© Productions.
Progress of:
Silent Dynasty©-Death Nightmare       
Storyline:  |||||||||| [62%]
Mapping:    |||||||||| [3%]
Scripting:  |||||||||| [1%]
Database:   |||||||||| [1%]
Audio:      |||||||||| [1%]
Overall:    ||||||||||[3%]
Demo:    ||||||||||[75%]

Arrow

And that is bizzarre. I'll find the topic in the morning.

Blizzard

You can always use the search button if you can't find something. If you're looking for script, it's always a good idea to check out the Scripts Database first.

http://rmrk.net/index.php/topic,7197.0.html
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!

LiLTreLL1217

#7
ok i loaded in the script but i get this error what i did was i change verything that said "_ID" to "_17" for te status effect ID. and i get this 1 error everytime so heres the script and come somebody configure it for me.

NOTE: The IDs are there. before the script


#==============================================================================
# Full Reflection System by Blizzard
# Version: 1.0b
# Date: 5.9.2006
#
#
# Compatiblity:
#
# Is compatible with nearly everything. You might experience problems with
# exotic CBS-es
#
#
# Configuration:
#
# Make a status effect and call it "Reflect". Remember the ID number. Now make
# an animation that should be displayed when reflecting magic.
#
# REFLECT_ID - the ID of the reflect status
# REFLECT_ANIMATION - the ID of animation displayed when magic is being
#                     reflected
#
# Note:
# A magical skill is considered a skill that has a ATK-F equal to zero and
# either INT-F greater than zero or MDEF-F greater than zero. Create
# unreflectable skills by just setting ATK-F greater than zero.
#
# Important note:
# It is better if you don´t use sounds and screen/target flashing in the
# animation for the reflecting effect.
#
#==============================================================================

REFLECT_ID = 17
REFLECT_ANIMATION = 101

#==============================================================================
# Game_Battler
#==============================================================================

class Game_Battler
 
  attr_accessor :reflect_flag
 
  alias init_reflect_later initialize
  def initialize
    init_reflect_later
    @reflect_flag = false
  end
 
  alias skill_effect_reflect_later skill_effect
  def skill_effect(user, skill)
    @reflect_flag = false if not self.states.include?(REFLECT_ID)
    if not self.test_reflection(skill)
      return self.skill_effect_reflect_later(user, skill)
    end
  end
 
  def test_reflection(skill)
    if self.states.include?(REFLECT_17) and @reflect_flag
      return true if (skill.int_f > 0 or skill.mdef_f > 0) and skill.atk_f == 0
    end
    return false
  end
   
end

#==============================================================================
# Scene_Battle
#==============================================================================

class Scene_Battle

  def update_phase4_step4
    for i in 0...@target_battlers.size
      if @skill != nil and @target_battlers[i].test_reflection(@skill)
        @target_battlers[i].animation_id = REFLECT_ANIMATION
        @target_battlers[i] = swap_targets(@target_battlers[i], @active_battler)
        target = @target_battlers[i]
        dam = 0
        dam = target.damage if target.damage.is_a?(Numeric)
        target.skill_effect(@active_battler, @skill)
        target.damage += dam if target.damage.is_a?(Numeric)
      end
      @target_battlers[i].animation_id = @animation2_id
      @target_battlers[i].animation_hit = (@target_battlers[i].damage != "Miss")
    end
    for actor in $game_party.actors
      actor.reflect_flag = true if actor.states.include?(REFLECT_ID)
    end
    for enemy in $game_troop.enemies
      enemy.reflect_flag = true if enemy.states.include?(REFLECT_ID)
    end
    @wait_count = 6
    @phase4_step = 5
  end
 
  def swap_targets(battler1, battler2)
    if battler1.is_a?(Game_Enemy) and battler2.is_a?(Game_Enemy)
      actors = []
      for actor in $game_party.actors
        actors.push(actor) if actor.exist?
      end
      battler3 = actors[rand(actors.size)]
    elsif battler1.is_a?(Game_Actor) and battler2.is_a?(Game_Actor)
      enemies = []
      for enemy in $game_troop.enemies
        enemies.push(enemy) if enemy.exist?
      end
      battler3 = enemies[rand(enemies.size)]
    else
      battler3 = battler2
    end
    return battler3
  end
 
  alias battle_end_reflect_later battle_end
  def battle_end(result)
    for actor in $game_party.actors
      actor.reflect_flag = false
    end
    battle_end_reflect_later(result)
  end
 
end

Owner of ChaosDreamz© Productions.
Progress of:
Silent Dynasty©-Death Nightmare       
Storyline:  |||||||||| [62%]
Mapping:    |||||||||| [3%]
Scripting:  |||||||||| [1%]
Database:   |||||||||| [1%]
Audio:      |||||||||| [1%]
Overall:    ||||||||||[3%]
Demo:    ||||||||||[75%]

Falcon


Blizzard

Lol change the number, not the name of the constant:

REFLECT_ID = 17

Change it to:

REFLECT_ID = 18

or

REFLECT_ID = 19

or...

As I said, the number has to be changed.
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!

LiLTreLL1217

Quote from: Blizzard on December 05, 2006, 01:52:02 PM
Lol change the number, not the name of the constant:

REFLECT_ID = 17

Change it to:

REFLECT_ID = 18

or

REFLECT_ID = 19

or...

As I said, the number has to be changed.

u mean change the number to 18 or 19 and put it in "REFLECT_ID" TO "REFLECT_18 or w/e number"
or do you mean where i put the numbers at before the script?
because i changed all the "_ID" to "_18" and it still doesnt work.

Owner of ChaosDreamz© Productions.
Progress of:
Silent Dynasty©-Death Nightmare       
Storyline:  |||||||||| [62%]
Mapping:    |||||||||| [3%]
Scripting:  |||||||||| [1%]
Database:   |||||||||| [1%]
Audio:      |||||||||| [1%]
Overall:    ||||||||||[3%]
Demo:    ||||||||||[75%]

Blizzard

No, don't touch REFLECT_ID, just change the number.
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!