User Tag List

Results 1 to 8 of 8

Thread: RPG-Style Text Box

  1. #1
    No Products Registered

    Join Date
    Nov 2006
    Posts
    38
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    RPG-Style Text Box

    Hello! This is my first post to the forums.

    I'm trying to make an RPG Style Text Box. I need the text box to

    1)be able to load certain lines from a file (Example: line 1 in the file would have one person's line, and then line 2 would have another person's line that gets displayed after user clicks next)

    2)Print the text character by character like in most RPGs instead of displaying the entire line at once.

    I'm using a Rich Edit Object, and I'm trying to load the whole file into another Rich Edit Object and pull lines from there, but I'm not sure if this is the best way to do it.

    Tips? Examples? Thanks!

  2. #2
    No Products Registered

    Join Date
    Jul 2006
    Posts
    239
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: RPG-Style Text Box

    get the progressive text tutorial.

    cant remember where it is today tho.

  3. #3
    Clicker Fusion 2.5 Developer

    Join Date
    Jun 2006
    Location
    Hampshire, UK
    Posts
    963
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: RPG-Style Text Box

    To get text that appears to be "writing" itself, follow these quick steps:


    1. Create two strings, one for display, one to be hidden. Create a counter.

    2. Set the hidden text to the text you want to be displayed on screen.

    3. Create the event:

    [events]
    *Always (or a time period of your choice)
    -Add one to the counter
    -Set the onscreen string to: Left$(string$( "Hidden string" ), value( "Counter" ))
    [/events]


    This will basically calculate the number of letters at the begining of the string equal to the counter. This is how i do it, but their may be better ways, i don't know. This method may cause small issues with the word at the end of each line of text, trying to be on the previous line, then realising its too long and moving to a new line.

  4. #4
    No Products Registered

    Join Date
    Nov 2006
    Posts
    38
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: RPG-Style Text Box

    That works great! Thanks. Next, I need to be able to read a certain line from a file. I'm playing around with loading the file from the Rich Edit, but no luck yet...

  5. #5
    Clicker Fusion 2.5 Developer

    Join Date
    Jun 2006
    Location
    Hampshire, UK
    Posts
    963
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: RPG-Style Text Box

    Well, you can either use an external file, like an ini file [obj_ini]
    But personally, i would use the window list object [obj_list]

    I'm sure you can find an example of how to use the ini object around here somewhere.

    With the list object you could just store the lines of text in them, each line will have it's own number, then you can retrieve that line by:

    [events]
    *When player clicks Next
    -Set hidden text to: List Line Text$( "List", LineNumberWanted)
    [/events]

    Then, after that run the events to read out the text.

  6. #6
    No Products Registered

    Join Date
    Nov 2006
    Posts
    38
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: RPG-Style Text Box

    Ok, I've figured out a way to do that. However I'm still stuck using the Rich Edit object, which I don't really like because I can't use the cursor. Is there anyway to get rid of the cursor, OR is there another text object I can use that can be on top of active objects?

  7. #7
    Clicker Fusion 2.5 Developer

    Join Date
    Jun 2006
    Location
    Hampshire, UK
    Posts
    963
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: RPG-Style Text Box

    If you just want text use the standard String object [obj_string]. I always use that for everything, I've never used the Rich Edit object.

    If you want the string object to display above active objects, make sure you have unticked "Display as background", as this option will treat it as a backdrop object.

  8. #8
    No Products Registered

    Join Date
    Nov 2006
    Posts
    38
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: RPG-Style Text Box

    That's perfect! Thank you so much!

Similar Threads

  1. The difference between text in expression editor and text in strings?
    By RobertRule in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 21st July 2013, 10:13 PM
  2. Quick Question Regarding Text Objects VS Graphic Made With Text
    By Rolando in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 7th April 2013, 04:10 AM
  3. Creating floating damage text with the Text Blitting Object - How?
    By edman3d in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 8th January 2013, 02:06 AM
  4. Append lines to Text Blitter in top-down style
    By JoKa in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 8th July 2008, 09:41 AM
  5. RTF - Rich Text Format - Formatting Text
    By Gustav in forum File Archive
    Replies: 4
    Last Post: 2nd February 2007, 08:59 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •