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.

IN-Depth Scenes&Windows for you(Includes CMS)

Excellent, I honestly don't know anything about scripts, this helped me out a lot! Thank you, and I hope you finish this soon!
 

Jason

Awesome Bro

Damn you Mr.Mo !!!!!! This was awesome, it helped alot with making a CMS, You've gotta carry it on ! Don't give up on it ! :(
 
thanks but no thanks. This should atleast help you guys start and get used to other tutorials. I don't have time for this anymore. i have Netplay Plus and some other projects to finish.
 

Mac

Member

Awww this is a shame actually...but as you said you have bigger priorities. When i have some open time i will try and finish the last bits off, if thats alright with you Mr. Mo
 

bnosam

Member

Mr.Mo;150701 said:
thanks but no thanks. This should atleast help you guys start and get used to other tutorials. I don't have time for this anymore. i have Netplay Plus and some other projects to finish.
Damn, that's too bad, good luck with them.


Mac;150719 said:
Awww this is a shame actually...but as you said you have bigger priorities. When i have some open time i will try and finish the last bits off, if thats alright with you Mr. Mo

:)
 
I've had a problem for awhile, maybe you can help with it. Say I make a window that has a width of 100 and a height of 100, giving it an 1000 pixel area. I want to be able to draw something in every single pixel without the window cutting off the contents. Even if i take off the "- 32" when creating the Bitmap it still does it.
 

Mac

Member

100 x 100 = 10,000 not 1000 :p

You will need to do something with the Window Class...if you try and just change the bitmap in the window it will cause problems.
 
Whoops, left off a 0... Hmm, I'd rather not change the whole window class since it's a super class of a lot of things, so I'll just try and tighten everything to fit. Maybe later when I'm brave I'll play around with it
 

Songee

Member

I have got one problem. When calling my scene I replace
$scene = Scene_Item.new in Scene_Menu line 128 with
$scene = Scene_ShowWindow.new as you written in your tutorial. When I choose item in the menu, this error appears :

Script 'Scene_ShowWindow' line 27: NoMethodError occurred.
undefined method `update` for MyCustomWindow:Class

What can be wrong? :-(
 
there is a no method called update for your Scene, create a method called update. like

def update
#Whatever you want to update
end
 

Songee

Member

Look how my script looks like:
First script:

class Window_Options < Window_Base
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
super(50, 50, 320, 240)
self.contents = Bitmap.new(width - 32, height - 32)
refresh
end

def refresh
self.contents.clear
self.contents.font.color = normal_color
self.contents.font.size = 20
cx = contents.text_size("Options").width
self.contents.draw_text(20, 20, cx, 32, "Options")
end

def update
@window.update
end
end


Second script:

#==============================================================================
# * Scene_Options
#==============================================================================

class Scene_Options
#--------------------------------------------------------------------------
# * Main Processing
#--------------------------------------------------------------------------
def main
@window = Window_Options
Graphics.transition
loop do
Graphics.update
Input.update
if $scene != nil
update
break
end
end
Graphics.freeze
@window.dispose
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
@window.update
end
end

In Scene_Options is update method, but the same error appears. :(
 
There is an error in the tutorial :p..

If your script doesn't have main or initialize, it won't crash, since class Object has initialize ;).

Other than that..wow I used to write quite odd. I'm glad people like it still though.

I'll finish it up one of these days :)
 

Ioto

Member

I'm having a bit of an issue. An error actually.
You see, I AM new to all this, so its probably something logical I'm overseeing.
But I tried few things and nothing happend, I was wondering if you guys could look at it.
Thanks in advance.

PS: I changed the line 128, so thats not it.

MyCustomWindow
class MyCustomWindow < Window_Base

def initialize
  super(100, 100, 200, 200)
  self.contents = Bitmap.new(width - 32,  height - 32)
  refresh
end

def refresh
  self.contents.clear
  self.contents.font.color = normal_color
  self.contents.font.size = 20
  cx = contents.text_size("test").width
  self.contents.draw_text(50, 50, cx, 32, "test")
end

end

Scene_ShowWindow
class Scene_ShowWindow

def main
  MyCustomWindow.new
  Graphics.transition
  loop do
  Graphics.update
  Input.update
  update
  if $scene != self
  break
  end
  end
  Graphics.freeze
  @window.dispose
end

def update
  @window.update
end

end

The Error when I open 'Items' ingame
Script 'Scene_ShowWindow' line 19: NoMethodError occured.
undefined method `update' for nil:NilClass
 

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