Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

SP regeneration

Status
Not open for further replies.
I need help again.

I need a script, that reloads 1 sp every few seconds on the map.
it should work with the sdk

i figured it should look somehow like this

def main
@wait_count = 0


end



if @wait_count == 0
@actor.sp += 1
@wait_count = 80

end

def update

if @wait_count > 0
@wait_count -= 1
return
end

end

But since I dont know rgss so far...

Can somebody please help me making this thing work.
 

Anonymous

Guest

In Scene_Map#update, add this:

Code:
if (Graphics.frame_count % 40) == 0  # 2 seconds, or thereabouts
  for actor in $game_party.actors
    actor.sp += 1
  end
end
 

Anonymous

Guest

No problem. :)

This topic has been resolved. If lucien or any other users have any questions or further problems regarding this topic, please create a new thread about them.

Thank you!
 
Status
Not open for further replies.

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top