Super simple question

Started by mroedesigns, August 29, 2011, 01:38:23 pm

Previous topic - Next topic

ForeverZer0

Spoiler: ShowHide
class QuickMessage < Sprite
 
 def initialize(message, timer = 160)
   super()
   self.bitmap = RPG::Cache.picture("message")
   self.x = 32
   self.y = 32
   # I don't know what the pic your using is, so you'll have to adjust the
   # values of the x, y here.
   self.bitmap.draw_text(0, 0, self.bitmap.width, 32, message, 1)
   loop {
     Graphics.update
     Input.update
     timer -= 1
     break if timer == 0
     break if Input.trigger?(Input::C)
   }
   Input.update
   self.dispose
 end
end


This is easier.  Same syntax, but use QuickMessage.new instead of QuickMessage.show
You need to change the x and y of the sprite, and the coordinates where the text is drawn maybe, but it will be self-centering.
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

mroedesigns

now it's doing the same thing as before, no error but no text either. And for some reason it shows a blank text box as well. Like if you did an event showtext and left it empty, it just pops up and then goes away when the image does.

ForeverZer0

Then you're not passing text to the method.  What string are you using?
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.


ForeverZer0

That script call:
Spoiler: ShowHide


Result (just made some dummy picture with rendered clouds for example)
Spoiler: ShowHide


What other scripts are you using?
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

mroedesigns

In order;

Spoiler: ShowHide
RMX-OS Options
RMX-OS Script
RMX-OS Versioning
Global Variables and Switches for RMX-OS
Single Instance
Actor Class Mod
Quick Message Script
Quest Log
- Quest Logs RMX-OS Controller
Equipment Requirements
Passive Skills
A.T.E.S.
Global Day & Night for RMX-OS
Blizz ABS
Visual Equipment for Blizz-ABS
Blizz ABS RMX-OS Controller
Ring Menu
RMX-OS Main


Single Instance is just a script to keep players from opening multiple game sessions at once. The Actor Class mod is a script that replaces all instances of the actor name with the rmx-os network username.

ForeverZer0

I don't anything there that would prevent the script from working.  The only thing that I know that really COULD even screw it up would be something that alters the Sprite or Bitmap class.  Also there is no reason a blank text box is being displayed.  Somewhere, you have another script that is doing some screwy stuff.  If you want, PM me a demo of your game and I'll look at it.
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.