View previous topic :: View next topic |
Author |
Message |
Sephiron Master Cheater Reputation: 34
Joined: 23 Aug 2008 Posts: 292 Location: JAPAN circa 1653, fucking some seagulls
|
Posted: Thu Sep 24, 2009 4:12 pm Post subject: Rmxp RGSS Hunger script and HUD |
|
|
My first WORKING script
Grats to myself. This script is free to use and such.
First, the script part:
Code: | class Window_hunger < Window_Base
def initialize
super(100, 400, 100, 80)
self.back_opacity = 145
self.contents = Bitmap.new(200 - 32, 80 - 32)
refresh
end
def refresh
self.contents.clear
@hunger = $game_variables[1]
self.contents.draw_text(0, 0, 190, 70, $game_variables[1].to_s)
self.contents.draw_text(0, -15, 190, 70, 'Hunger'.to_s)
end
def update
super
if $game_variables[1] != @hunger
refresh
end
end
end
#HUD2 UPDATE
class Scene_Map
alias hunger_main main
alias hunger_update update
def main
@hunger = Window_hunger.new
hunger_main
@hunger.dispose
end
def update
@hunger.update
hunger_update
end
end
|
And now the EVENT part.
Just put the event on any map that you want hunger enabled. You can also edit this script to be used for sleep and other motives used in survival/Sim games (which i am currently working on).
The event should look like the attachment below...
Description: |
|
Filesize: |
117.82 KB |
Viewed: |
27012 Time(s) |
|
Description: |
|
Filesize: |
82.89 KB |
Viewed: |
27013 Time(s) |
|
_________________
Nirojan wrote: | picked up 1,.5 g and them budduty picled up quarter o today we blase all of |
|
|
Back to top |
|
|
Cryoma Member of the Year Reputation: 198
Joined: 14 Jan 2009 Posts: 1819
|
Posted: Thu Sep 24, 2009 6:28 pm Post subject: |
|
|
Haha awsome job!
I'd like to see a variable for obesity, modified by eating while full.
Hear that, Tyler?
Now try translating it to RGSS2. :]
|
|
Back to top |
|
|
Sephiron Master Cheater Reputation: 34
Joined: 23 Aug 2008 Posts: 292 Location: JAPAN circa 1653, fucking some seagulls
|
Posted: Fri Sep 25, 2009 10:08 am Post subject: |
|
|
Cryoma wrote: | Haha awsome job!
I'd like to see a variable for obesity, modified by eating while full.
Hear that, Tyler?
Now try translating it to RGSS2. :] |
It wouldn't be hard, and it would only need a small portion of scripting to put it on the menu.
i can add in the event, if variable hunger is greater than or equal to 101, display message You are full! change variables Obesity + 10.
Change variables hunger= 100
_________________
Nirojan wrote: | picked up 1,.5 g and them budduty picled up quarter o today we blase all of |
|
|
Back to top |
|
|
Cryoma Member of the Year Reputation: 198
Joined: 14 Jan 2009 Posts: 1819
|
Posted: Fri Sep 25, 2009 1:53 pm Post subject: |
|
|
Exactly, then you could even switch character sprites based on obesity, as well as movement speed/agility/dexterity/etc.
|
|
Back to top |
|
|
False Prophet Expert Cheater Reputation: -1
Joined: 28 May 2006 Posts: 121
|
Posted: Thu Oct 15, 2009 8:21 pm Post subject: |
|
|
Obesity could randomly kill the character with a higher percentage each point!
|
|
Back to top |
|
|
shitposter Newbie cheater Reputation: 5
Joined: 12 Nov 2008 Posts: 13
|
Posted: Sun Nov 15, 2009 9:05 pm Post subject: |
|
|
Oggy wrote: | Obesity could randomly kill the character with a higher percentage each point! |
That's OP.
|
|
Back to top |
|
|
|