Chaos Project

RPG Maker => RPG Maker Scripts => Script Troubleshooting => Topic started by: lpjz2 on May 15, 2012, 02:24:31 pm

Title: [SOLVED] Blizz-ABS Trying to Give Exp to guard?
Post by: lpjz2 on May 15, 2012, 02:24:31 pm
So im working with Blizz-ABS and everything is working fine apart from this...

I added a new monster (lizzard) and when i attack him and kill him i get 2 xp, works fine. However when a guard (npc) kills him i think its trying to give the guard some exp crashing my game...

Heres what my game looks like before the guard attacks the lizard :

Before (http://dl.dropbox.com/u/32011766/help1.jpg)


And when the guard attacks and kills the lizard :

After (http://dl.dropbox.com/u/32011766/Help2.jpg)
Title: Re: Blizz-ABS Trying to Give Exp to guard?
Post by: G_G on May 15, 2012, 06:08:25 pm
While this probably isn't the best solution to use and you'll have to wait until it gets fixed in the official version, add this snippet above Blizz-ABS and it should fix your problem.
Class Game_Enemy < Game_Battler
  def exp=(n)
  end
end
Title: Re: Blizz-ABS Trying to Give Exp to guard?
Post by: winkio on May 15, 2012, 07:07:45 pm
Change the line after the error (line 2055) from

bat.exp += exp if !bat.cant_get_exp?


to

bat.exp += exp if !bat.cant_get_exp? && bat.is_a?(Game_Actor)
Title: Re: Blizz-ABS Trying to Give Exp to guard?
Post by: Blizzard on May 16, 2012, 02:04:20 am
Or:

class Game_Enemy
  def cant_get_exp?
    return true
  end
end
Title: Re: Blizz-ABS Trying to Give Exp to guard?
Post by: winkio on May 16, 2012, 03:58:49 am
all usable fixes, but the correct behavior is to only distribute EXP to the actors, thus checking for the actor as a condition is the best choice.
Title: Re: Blizz-ABS Trying to Give Exp to guard?
Post by: Blizzard on May 16, 2012, 04:04:04 am
Of course. I was just being a smartass by providing an alternative and rather hacky solutio.
Title: Re: Blizz-ABS Trying to Give Exp to guard?
Post by: lpjz2 on May 16, 2012, 12:40:55 pm
Quote from: winkio on May 15, 2012, 07:07:45 pm
Change the line after the error (line 2055) from

bat.exp += exp if !bat.cant_get_exp?


to

bat.exp += exp if !bat.cant_get_exp? && bat.is_a?(Game_Actor)



Thankyou :) worked perfectly!