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.

Read and display text from a text file

sudsiv

Member

Script Request Template
This is a request for a new script, an edit or debug of an existing script.

Script Title:
Read and display text from a text file
RMXP:

Detailed Description:
Can someone please make a script that reads a text file and displays the text in it.
I am going to use it with berkas http and ftp download net module to make a system to send message to my players
note: i dont know rgss
Screen shots:
none
Other Scripts I am using (in order):
Download & Upload Files with RGSS by berka
XAS 3.6 by Xiderwog
Mode 7
Zeriab's Caterpillar Script
 

sudsiv

Member

I wanted something more simple with no compatibility issues
im going to use berkas Download & Upload files with Rgss and this to make a message system where i could send messages to my players
 
If you want to call the message from an event...

Install this script:

Code:
class Interpreter

  def msg_from_file(filespec)

    @message_waiting = true

    $game_temp.message_proc = Proc.new { @message_waiting = false }

    fs = File.open(filespec, "r")

      $game_temp.message_text = fs.read

    fs.close

  end

end

Then use:

msg_from_file("Data\\msg.txt")

In an event Script command to call it.

Be Well
 

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