Jump to content
AeghtyAteKees

Simple Message Feature

Recommended Posts

Hello! I'm using MA's Advanced Text System (extensively!) in my project. It's just missing one feature.

 

Displaying pictures in the message window. I need to add this option. :)

 

Yanfly even has a very similar script that HAS this feature, and it looks to me like it should be as simple as copying the code and adding it to MA's. Maybe I wasn't adding it in the right spot?

 

At line 556 in MA's script is the section for processing escape characters. Yanfly has a very similar section in his script at line 436. I'm unsure why it doesn't work to copy

    when 'PIC'
      text.sub!(/\[(.*?)\]/, "")
      bmp = Cache.picture($1.to_s)
      rect = Rect.new(0, 0, bmp.width, bmp.height)
      contents.blt(pos[:x], pos[:y], bmp, rect)

and add it to MA's script.

 

There's clearly something I don't understand. I'm not a coder. :)

 

Thank you guys for the help, as always.

Share this post


Link to post
Share on other sites

It was missing a piece.

    when 'PIC'
      text.sub!(/\[(.*?)\]/, "")
      bmp = Cache.picture($1.to_s)
      rect = Rect.new(0, 0, bmp.width, bmp.height)
      contents.blt(pos[:x], pos[:y], bmp, rect, 255)

with the instructions from yanfly

\pic[x]   - Draws picture x from the Graphics\Pictures folder.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×