[XP] Blizz ABS Smart Auto Targeting

Started by LiTTleDRAgo, February 25, 2011, 10:21:24 pm

Previous topic - Next topic

Shalaren


Zexion

okay the new version is so awesome! but now i get an error during the fight. for some reason it only happens when 1 enemy is alive, and I'm facing up.
Script 'Auto Target' line 178: NoMethodError occurred.
undefined method x for nil:NilClass


I copied exactly whats in the script, no mods were made to this one yet.

Shalaren

Quote from: Zexion on February 28, 2011, 07:29:25 pm
okay the new version is so awesome! but now i get an error during the fight. for some reason it only happens when 1 enemy is alive, and I'm facing up.
Script 'Auto Target' line 178: NoMethodError occurred.
undefined method x for nil:NilClass


I copied exactly whats in the script, no mods were made to this one yet.


Yep I just got that too, its like it gets confused for its target and crashes.

anyway BUG REPORT!

LiTTleDRAgo


Shalaren

Flaw!
if u use charge for skills, when the charge stops, it puts the targetting screen S:.

LiTTleDRAgo

could you upload a demo? since I didn't use charged attack/charged skill

Shalaren

uploading is not something i can do in this computer ><"
besides it takes longer uploading a demo then actually putting charge on a skill.

LiTTleDRAgo

March 01, 2011, 02:28:24 am #27 Last Edit: March 01, 2011, 03:00:10 am by LiTTleDRAgo
I didn't understand how to make charged skill because it's seem "weird" in my game
empty project with your blizz abs configuration, auto target script, and graphic needed will do


edit : nevermind, I think I got it

Zexion

oh as long as this one is fixed I don't care :P I don't use charge anyway lol

Shalaren

Quote from: LiTTleDRAgo on March 01, 2011, 02:28:24 am
I didn't understand how to make charged skill because it's seem "weird" in my game
empty project with your blizz abs configuration, auto target script, and graphic needed will do


edit : nevermind, I think I got it

so did you get charge fixed? o:

LiTTleDRAgo

Quote from: Shalaren on March 06, 2011, 04:11:28 pm
so did you get charge fixed? o:


not yet


edit : I don't think I'll be able to fix that, because it seemed create a massive bug in blizz abs if I editing charged function, sorry

Shalaren

S: then add
"Not Compatible with Babs Charging"

LiTTleDRAgo

yeah, I already add the note in author's notes yesterday

Aqua

When a skill is forced to be used as part of a combo, the selection window comes up. D:

Tazero

Other than the 'Nearest enemy thing' Wondering could you maybe assign a button to DE target and enemy or turn targeting back on? like this http://www.youtube.com/watch?v=dMb4rmKLO78 Skip to about 20 seconds in :3

And a switch target like Lock on to next nearest but not the one I just targeted sorta thing?

I mean that would be amazing and I would use this hands down :)

I'll prolly use it anyways but thats just a suggestion ;D


If you were a fish...

Felix0

Quote from: Aqua on March 13, 2011, 04:51:57 pm
When a skill is forced to be used as part of a combo, the selection window comes up. D:

Yes I am getting this problem, Although I am using it as a common event, and a combo.
Really would love for this to be fixed <3

Kiwa

Just for future reference for anyone using this script....or someone wants to fix the bug.

Here are the symptoms.

1. Target is locked on something and my damn fire ball is shooting things off in the distance im NOT targeting!!!
2. I have to spam the living crap out of my HotKey to get the damn spell to work!!!


I shared your despair until just a moment ago when i decided it was time to look into my games targeting system.

here is the problem....
Your skill is set "Freeze on Charge" or "Move on Charge" or "Trigger after Charge"

If you set your skill to "No Charge" the world is beautiful.

**further note that may help if someone has the know how and desire to fix this. if the skill is set to "Charge" and the charge is short (under 40 frames or so) it can be spammed like MAD and it will/may shoot the fireball. if the charge is 40-80 frames (2 seconds or so?)..  i had no such luck spamming the key like a champion.

Sylphe

May 03, 2015, 01:15:49 pm #37 Last Edit: May 03, 2015, 05:25:22 pm by Sylphe
Hey ... I didn't know where to post that ... I thought it was in script troubleshooting but Blizzard rules said "If there is a topic related to your script in script database then post in this topic"  so here I am ...

I think it is a very good script and I decided to use it in my game, but I don't have good animation to show a "target" for now so ... I decided to add a little something :
show the targeting graphic with a picture. And it works, but I just have one issue.

When I teleport my hero from a map to another, then an automatic event run but ...  the graphic is still here ! And it targets an empty place I don't know why xD (even when I put wait at the first line of the event).

I think it is not really related to this script in particular but to every scripts that use pictures, I'm not a very good scripter I think so here is the part I changed ( "labelled" with Stanley's add) :

Spoiler: ShowHide


#==============================================================================
# Sprite_Targeter
#==============================================================================

class Sprite_Targeter < RPG::Sprite
 
  attr_accessor :character
 
  def initialize(viewport, character = nil)
    super(viewport)
    # stanley's add : if else
    if LiTTleDRAgo::TARGET_ANIMATION_ID == nil
      self.bitmap = RPG::Cache.picture("Curseur ennemi") # the name of the picture
      self.src_rect = Rect.new(0, 0, 32, 32)
      self.visible = false
    else
      self.bitmap = Bitmap.new(1, 1)
    end
    @character = character
    update
  end
 
  # STANLEY'S ADD : method dispose
  def dispose
    if self.bitmap != nil
      self.bitmap.dispose
    end
    self.visible = false
    super
  end
 
  def update
    @character = $BlizzABS.autotarget
    if @character == nil
      @loop_animation_id = 0
      loop_animation(nil)
      return
    end
    super
    # stanley's add : if
    if LiTTleDRAgo::TARGET_ANIMATION_ID == nil
      self.visible = true
      self.src_rect.x += 32 if Graphics.frame_count % 5 == 0
      self.src_rect.x %= 128
      self.src_rect.y = 0 # or 32 for blue one
      if $BlizzABS.autotarget == nil 
        self.visible = false
      else
        self.x = @character.screen_x - 16
        self.y = @character.screen_y - 23
        self.z = @character.screen_z(0)
      end
     
    elsif @loop_animation_id == 0
      @loop_animation_id = LiTTleDRAgo::TARGET_ANIMATION_ID
      loop_animation($data_animations[@loop_animation_id])
     
      self.x = @character.screen_x
      self.y = @character.screen_y
      self.z = @character.screen_z(0)
    end
 
  end
 
end

#==============================================================================
# Spriteset_Map
#==============================================================================

class Spriteset_Map
 
  alias init_autotarget_later initialize
  def initialize
    #Stanley's add : we check in the class Sprite_Targeter if it is set to nil
   # if LiTTleDRAgo::TARGET_ANIMATION_ID != nil
     @autotarget = Sprite_Targeter.new(@viewport1)
  # end
   $game_temp.target_cursor_sprite = @target_cursor_sprite
    init_autotarget_later
  end
 
  alias update_autotarget_later update
  def update
    @autotarget.update if @autotarget != nil
    update_autotarget_later
  end
 
  alias dispose_autotarget_later dispose
  def dispose
    if @autotarget != nil
      @autotarget.dispose
      @autotarget = nil
    end
    dispose_autotarget_later
  end
 
end


Also I tried to see if it entered in the Sprite_Targeter "dispose" method when changing map, and yes. So I added this "visible = false" in the dispose method, but it doesn't changed anything :/

EDIT : Waiting for a better idea I made a global variable that I set to false to temporarily desactivate the cursor
blindly follow his heart can lead to the loss

Sylphe, descendant of Zoldik Family.
Quote from: TedBearTRY KEEP UP