Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

> HP/SP Recovery on Level Up
kowbrainz
post Nov 3 2011, 06:41 AM
Post #1


Level 1
Group Icon

Group: Member
Posts: 11
Type: Developer
RM Skill: Intermediate




Hi,

I'm fairly new to scripting, so this was just a basic thing to start off with. I'd just like to alter the default game script so that every time an actor levels up, their SP and HP are recovered fully.

Here's the part of the Actor class which deals with a change in level - anyone able to help with what I need to add to this (or whether I need to do anything else different) in order to get this to work? Thanks

CODE
  #--------------------------------------------------------------------------
  # * Change Level
  #     level : new level
  #--------------------------------------------------------------------------
  def level=(level)
    # Check up and down limits
    level = [[level, $data_actors[@actor_id].final_level].min, 1].max
    # Change EXP
    self.exp = @exp_list[level]

   #insert HP and SP recovery code here

   end
Go to the top of the page
 
+Quote Post
   
 
Start new topic
Replies
Tsukihime
post Nov 3 2011, 11:54 AM
Post #2


Level 25
Group Icon

Group: Revolutionary
Posts: 565
Type: None
RM Skill: Undisclosed
Rev Points: 25




Probably.
But would it have to be done on every map?


__________________________
My Scripts
Go to the top of the page
 
+Quote Post
   

Posts in this topic


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 18th June 2013 - 03:55 PM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker