[Resolved]Blizz-ABS 2.85 Idle sprite Error

Started by hirasu, October 28, 2013, 10:08:01 pm

Previous topic - Next topic

hirasu

October 28, 2013, 10:08:01 pm Last Edit: November 02, 2013, 05:14:20 pm by hirasu
Hey :)
I have problem with the Blizz-ABS (2.85) idle animation(enemy,Actor) i get this error:

" undefined method `-' for nil:NilClass "

and the marked error code:

#----------------------------------------------------------------------------
 # sprite_animation_setup
 #  Processes the sprite-animation timing.
 #----------------------------------------------------------------------------
 def sprite_animation_setup
   # if not Scene_Map, spriteset doesn't exist, not valid or no action sprites
   if !$scene.is_a?(Scene_Map) || $scene.spriteset == nil || !valid? ||
       !action_sprites?
     # stop
     return
   end
   # if defending
   if @ai.act.defend?
     # set spriteset name add-ons
     @current_sprite, @weapon_sprite = BlizzABS::SPRDefend, ''
     # set spriteset name
     @character_name = @character_name_org + @current_sprite
   # spriteset name add-on exists
   elsif @current_sprite != '' && @character_name_org != ''
     # decrease frame timer
     @sframes[@sindex] -= 1                                        <----------------- HERE IS THE ERROR  :o
     # increase frame index if this frame is over
     @sindex += 1 if @sframes[@sindex] <= 0
     # if animation expired
     if @sindex >= @sframes.size
       # reset sprites
       reset_sprites
       # set the index back
       @sindex = 0
     else
       # set spriteset name
       @character_name = @character_name_org + @current_sprite
     end
   else
     # reset sprites
     reset_sprites
   end
   # if sprite extension doesn't exist already
   if @current_sprite == '' && @character_name_org != ''
     # set up movement sprite handling
     sprite_movement_animation_setup
   end
 end


The code can be found in the Blizz-ABS part 3 at line 1222 hope someone can help me :(

Thanks ahead.

PS: Sorry for my bad english and greetings from Germany ;)
(Using RPGXP 102E)

WhiteRose

I'm not sure what could be wrong; I don't think I've heard of this error before. Are you sure that all of your sprites are named correctly, and that you don't have sprites enabled that you don't use (idle sprites, running sprites, etc.)?

hirasu

At the moment  only Actor action sprites and idle sprites are enabled and i have all the sprites (_atk1, _wpn1, _idle,_idl....)  :(

WhiteRose

Quote from: hirasu on October 31, 2013, 06:07:08 pm
At the moment  only Actor action sprites and idle sprites are enabled and i have all the sprites (_atk1, _wpn1, _idle,_idl....)  :(


Oh, that is strange. I'm sorry that it's not working. :( Do you think that you could upload a small demo with the scripts and graphics that you are using so that someone can test it and see if they can figure out what is wrong? You don't need to upload your whole project if you don't want to - just one with the graphics and the scripts is all we need.

hirasu

November 01, 2013, 03:41:45 pm #4 Last Edit: November 01, 2013, 03:49:14 pm by hirasu
Here is a demo with my problem hope someone can fix this for me  :(

Link1: http://www.workupload.com/file/cjn2aFKK
link2: http://www.megafileupload.com/en/file/465528/Idle-problem-rar.html

KK20

I recall this error being reported before. I can't remember the exact cause, and I know in 2.85 it was more of an issue than in 2.84.

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

hirasu

November 01, 2013, 08:12:39 pm #6 Last Edit: November 02, 2013, 05:14:02 pm by hirasu
I tested it with 2.84 and TaDa! its works for the Actor but the Enemy idle sprite are not displayed  :???:

EDIT: I forgot to check the "Stop Animation" on the Event.

Sase

November 20, 2013, 08:12:27 am #7 Last Edit: November 20, 2013, 08:14:13 am by Sase
Hey, sorry if this topic is old but I managed to fix it in 2.85 by fiddling with the script.

In script 3, around line 1250~ removing the @current_sprite seemed to eliminate this error (at least for me). I don't know how legit this is and if it will fuck something up, but it's something.

Changed this
    elsif self.idle? && idle_sprites?
     @current_sprite = BlizzABS::SPRIdle
     @character_name = @character_name_org + @current_sprite


To this
    elsif self.idle? && idle_sprites?
     @character_name = @character_name_org + BlizzABS::SPRIdle


Eliminating the use of @current_sprite on the other parts too (BlizzABS::SPRRunning for example) fixed them too.

This is the way it was in 2.84 I think. The weirdest thing is, when I used 2.85 for script parts 1 and 2 in conjunction of 2.84 part 3, the game didn't crash. Can someone explain what the hell is going on.

One more thing: the game crashed only when it tried to load the correct sprite. When _idl sprite didn't exist, it crashed because of that (unable to find graphic). When it was added to the game folder, it crashed for the nomethod error. Incase it matters