Main Menu
  • Welcome to The RPG Maker Resource Kit.

Setting characters' max SP

Started by blazinhandle, February 02, 2007, 06:06:58 PM

0 Members and 1 Guest are viewing this topic.

blazinhandle

Anybody know how to set the maximum sp a character can reach (I want to set it to 100)?

I think it would be something like this but im not sure
if actor.max_sp >= 100
  set actor.max_sp = 100

i'm looking at where to set this limit (script wise) so that characters cannot curve past 100 sp.

i hope thats not too confusing,
thanks!

Snailer

Yes i think that is the right way putting it..

blazinhandle

lol, yes but do u know what script to throw it in?

Snailer

I'm guessing in game_character 1 or 2 or 3..

modern algebra

Why not just set it in the database?

Blizzard

Oh, you wanted the limitation IN GENERAL! Lol, I thought you wanted it for the CSGS specifically. Then just use this code:

class Game_Actor

  def maxsp
    n = super
    return (n > 100 ? 100 : n)
  end
 
  def maxsp=(val)
    super(val > 100 ? 100 : val)
  end
 
end


Sorry for the misunderstanding, blazin'. (>.<)
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!

blazinhandle

aaaaand blizzard comes in clutch yet again. RESOLVED!

thanks, blizz.

btw who is that baaaaaaanging chick in ur avator?

Blizzard

It's a friend of a girl I chat with on ICQ.
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!