[RMVX ACE] DRAWING TEXT ON SCREEN [HELP MEH!]
Posts
Pages:
1
I foward this questions to every scripter here that works with VX Ace.
Here's what I'm looking for :
- Draw text anywhere on the screen
- The text drawn is from any type of variable
- Updates every frame
I'm doing some debugging on my game so I need this script to test things - knowing what the variable is at a certain time. I don't like doing this via message box because it doesn't give me a life feed of whats really going on with the variables I'm using. So guys, help meh :(
Here's what I'm looking for :
- Draw text anywhere on the screen
- The text drawn is from any type of variable
- Updates every frame
I'm doing some debugging on my game so I need this script to test things - knowing what the variable is at a certain time. I don't like doing this via message box because it doesn't give me a life feed of whats really going on with the variables I'm using. So guys, help meh :(
The thought in my head is that you could do something like...
...that, or whatever, to instantiate a global variable that you can use for that purpose. Making text appear isn't necessarily hard, per-say...
...but, just keep in mind the difference between local variables, public variables, and private variables.
*Edit: Actually, now that I think on it, that won't automatically update the value of the variable. So, you might need to do something like...
...that? At which point, you can then do...
...that to instantiate the object, as per normal. Then, when you have a value to test/check, you can do something like...
...that, only replace "Text to display" with whatever value you want to test/check.
$debug_window = Window_Base.new(0, 0, Graphics.width/2, fitting_height(1))
...that, or whatever, to instantiate a global variable that you can use for that purpose. Making text appear isn't necessarily hard, per-say...
$debug_window.draw_text(0, 0, contents.width, fitting_height(1), "Display this text")
...but, just keep in mind the difference between local variables, public variables, and private variables.
*Edit: Actually, now that I think on it, that won't automatically update the value of the variable. So, you might need to do something like...
class Window_Debug < Window_Base def initialize(x, y, width, height) super end def get_value(value) @value = value end def get_text draw_text(0,0,contents.width,contents.height, @value.to_s) end def update super contents.clear get_text end end
...that? At which point, you can then do...
$debug_window = Window_Debug.new(0,0,Graphics.width/2,fitting_height(1))
...that to instantiate the object, as per normal. Then, when you have a value to test/check, you can do something like...
$debug_window.get_value("Text to display")
...that, only replace "Text to display" with whatever value you want to test/check.
Pages:
1














