Please login or register.

Login with username, password and session length
Advanced search  

News:

Latest WME version: WME 1.9.1 (January 1st, 2010) - download

Author Topic: On-screen text and dialog - a little help?  (Read 3034 times)

0 Members and 1 Guest are viewing this topic.

goodtimesfreegrog

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 2
    • View Profile
On-screen text and dialog - a little help?
« on: March 14, 2009, 11:57:54 AM »

Hay folks, I've just gotten started messing around with WME for a project I'm working on, and I was looking to see if I could get some help to get me started.

Long story short, the sort of project I'm planning to get started on is a first-person adventure game where all the on-screen text and dialog (including scene descriptions and such) are printed in an omnipresent box at the bottom of the screen for the player to read, and moving on to the next line of dialog happens with the click of a mouse button when in conversation. To this end, I'd need to get to know a few things:
1) How to configure the game so that every line of dialog (or subtitle text) stays onscreen indefinitely, until it is clicked away by the user, and
2) How to get all the on-screen text to appear in the same space, instead of text hovering over the actors' heads by default.

To further illustrate the sort of thing I'm looking for, I whipped up a quick mockup of an in-game screenshot to show you what I mean. You can find the image here. Hopefully the final result won't look quite as garish, but eh. Much thanks in advance for reading all of this!
Logged

Akusa

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 46
    • View Profile
Re: On-screen text and dialog - a little help?
« Reply #1 on: March 14, 2009, 02:30:16 PM »

Well the answer to your two question ist simple:

Just create a wintermute window with a text-box (static control for example) and with a function you call this window and replace the text of the static control with your desired text. Fairly easy as soon as you know how wintermute handles the windows.

Basic Code could look like this:
Code: WME Script
  1. loc_Textbox = Game.LoadWindow("windows\SpeechBox.window");
  2. loc_Text = loc_Textbox.GetControl("TextField");
  3. loc_Text.Text = "Hello, this is your example text!";
  4.  

As you see, the Window "SpeechBox.window" is loaded, then you calls the object "TextField" from the window SpeechBox and you replace the Text with your desired text (or the text from a variable).
« Last Edit: April 10, 2009, 12:08:20 PM by Akusa »
Logged

goodtimesfreegrog

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 2
    • View Profile
Re: On-screen text and dialog - a little help?
« Reply #2 on: March 15, 2009, 10:20:21 AM »

Thank you very much for the help, but I think I already have it figured out (by using a constant textbox actor as my "player character".
However, right now I've got a few additional questions too, which I assume are still really basic stuff, but still.
1) How can I add manual line breaks to a single subtitle?
2) When a character starts a conversation in-game with another, I'd like to display a large character portrait in the background displaying the character who's being talked to, which also changes depending on what's said and dissapears when the conversation is over. What's a simple way to perform this?
« Last Edit: March 15, 2009, 10:23:19 AM by goodtimesfreegrog »
Logged

Akusa

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 46
    • View Profile
Re: On-screen text and dialog - a little help?
« Reply #3 on: March 15, 2009, 01:21:02 PM »

Quote
How can I add manual line breaks to a single subtitle?
In windows or strings you can use the character "|" for forcing a line break. Unfortunatly that does not work in text that appears above actors.
I think there are some work arrounds like rewriting the caption window so that it also works for character sentences etc.
But i think you should use a simple invisible and static text window for this task, simmilar to the caption window who shows the text besides of the cursor.

Quote
When a character starts a conversation in-game with another, I'd like to display a large character portrait in the background displaying the character who's being talked to, which also changes depending on what's said and dissapears when the conversation is over. What's a simple way to perform this?
Again, use a window object and change the background sprite with the sprite you want to use. Simple and easy.
« Last Edit: March 15, 2009, 02:22:03 PM by Akusa »
Logged
 

Page created in 0.046 seconds with 25 queries.