Chaos Project

RPG Maker => RPG Maker Scripts => Script Troubleshooting => Topic started by: Shadonking on May 09, 2009, 06:37:21 am

Title: Help with message scripts
Post by: Shadonking on May 09, 2009, 06:37:21 am
How do you move the position of text in a message e.g. move it down by 5 pixels and right by 7 pixels. done


im trying to collect small scripts to make my self a AMS

this script is to have a picture as a background for messages.

Spoiler: ShowHide
#-----------------------------------------------------------------------------
#  Window Message Rewrite by Mac
#=============================================================================
class Window_Message < Window_Selectable
  # Alias Message_Window initialize 
  alias message_window_init initialize
    def initialize
    message_window_init
      self.opacity = 0
      @message = Sprite.new
      @message.bitmap = RPG::Cache.picture('Message')
      @message.y = self.y - 30
      @message.x = self.x - 30
      @message.visible = self.visible
      @message.opacity = 255
    end
  # Alias Message_Window update 
  alias message_window_upda update
    def update
       message_window_upda
        @message.visible = self.visible
      end
      end


im also looking for a letter by letter script and a script that can make the window fit to text message (not the picture, the actual windowskin) .
Title: Re: How to move the text
Post by: fugibo on May 09, 2009, 06:56:25 am
draw_text(x, y, width, height, "Text", alignment (0/left, 1/center, 2/right, I believe))
Title: Re: How to move the text
Post by: Shadonking on May 10, 2009, 12:28:43 pm
ok thanks, i'll try it when i finish work

Edit

it wouldent work, im thinking of putting it so the above script will only work when a switch is on, so i will just need a little help with how to do that. also can that script sniplet (example) able to go in to the above script (picture script) so it only changes the position of the text when that script is active.


edit

ok iv got the text where i want it and the picture looks good with the text but the very first message works with the picture script but after that it stops working. any clues on what the problem is.


edit (second one of the day -_-)

iv figured out the problem, what happens is when i use the erease picture option it stops messages using the picture, can some one please script it so this doesnt happen.

p.s iv stopped looking for the fit window to text script becuase iv found a better way of making alert boxes.
Title: Re: Help with message scripts
Post by: Shadonking on May 14, 2009, 07:20:07 am
Quote from: Shadonking on May 10, 2009, 12:28:43 pm
ok thanks, i'll try it when i finish work

Edit

it wouldent work, im thinking of putting it so the above script will only work when a switch is on, so i will just need a little help with how to do that. also can that script sniplet (example) able to go in to the above script (picture script) so it only changes the position of the text when that script is active.


edit

ok iv got the text where i want it and the picture looks good with the text but the very first message works with the picture script but after that it stops working. any clues on what the problem is.


edit (second one of the day -_-)

iv figured out the problem, what happens is when i use the erease picture option it stops messages using the picture, can some one please script it so this doesnt happen.

p.s iv stopped looking for the fit window to text script becuase iv found a better way of making alert boxes.
Title: Re: Help with message scripts
Post by: Shadonking on May 18, 2009, 12:01:39 pm
please help all i need is some way to stop the picture from the picture background massage script from erasing the picture when using erase picture option in events.

edit

i was testing my project last night and i deleted all the erase picture things and show picture things but after the first message the picture background disapears. can some one please help me with this becuase i have no idea whats wrong. do you think it can be a compatiblity problem with an other script.