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: In-game notes  (Read 4151 times)

0 Members and 1 Guest are viewing this topic.

mRax

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 55
    • View Profile
In-game notes
« on: January 16, 2007, 04:19:24 PM »

Good morning! I have one question :) The situation is in item "notebook", player have to read some notes to solve quest successfully. How can I print these notes before notebook sprite entity? (sprite entities for words/sentences aren't desired) Also I need in the fade-in effect: notes aren't showen quickly (at the moment), but each word are written letter-to-letter slowly...

The simple solution is in usage window with many captions, buttons or edits... But maybe there are pretty and more "unversal" way, aren't there?
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: In-game notes
« Reply #1 on: January 16, 2007, 04:46:59 PM »

A window is definitely the way to go. You don't need "many" captions, you can use just one big static control and programatically change its .Text property to add one letter at a time.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

mRax

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 55
    • View Profile
Re: In-game notes
« Reply #2 on: February 01, 2007, 05:28:07 PM »

Hi! Some questions :)

1. For example, string table considers of such line:
Code: [Select]
NOTE_000 Day 4. Well, I think it's inhabitted islandIn the game I use
Code: [Select]
var temp_static=note_window.GetControl("page0");
temp_static.Text="/NOTE_000/";
The result text is definitely "/NOTE_000/" not "Day 4..." But when I create window from file
Code: [Select]
STATIC{
...
TEXT = "/NOTE_000/"
...
}
result text is "Day 4...". What's wrong with temp_static.Text?

2. Is there something like #10#13 (Pascal) or "\n" (C)?
I need to type one string
Code: [Select]
Day 4.

Well,..
instead of
Code: [Select]
Day 4. Well,..
3. The last trouble is in game use one font only. Those .font lines don't change anything :(
Code: [Select]
;FACE = "Arial"
FILENAME = "fonts\MyFont.ttf"
CHARSET = 1
The game always use strange standard system font. Yeah, BOLD and ITALIC properties is operational, but why game doesn't load MyFont.ttf? Or "Arial" font?
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: In-game notes
« Reply #3 on: February 02, 2007, 01:58:41 PM »

Quote
What's wrong with temp_static.Text?
In this case you'll need to explicitly translate the string (the automatic translation only happens when loading the window from file).

Code: [Select]
temp_static.Text = Game.ExpandString("/NOTE_000/");

Quote
2. Is there something like #10#13 (Pascal) or "\n" (C)?
In scripts use "~n", in string table the translators can use the pipe character ("|").

Quote
3. The last trouble is in game use one font only. Those .font lines don't change anything
You need to specify the typeface name (FACE = "something"), that is the logical name of the font.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

mRax

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 55
    • View Profile
Re: In-game notes
« Reply #4 on: February 02, 2007, 04:16:23 PM »

Thanks :)
Logged

adonf

  • Regular poster
  • ***
  • Karma: 0
  • Offline Offline
  • Posts: 124
    • View Profile
Re: In-game notes
« Reply #5 on: February 02, 2007, 05:17:00 PM »

Thanks, too. I spent a lot of time looking for this function in the documentation this morning (maybe it should be mentionned in the page about localization)
Logged
I am the Milkman. My milk is good.

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: In-game notes
« Reply #6 on: February 02, 2007, 06:33:53 PM »

Yes, that's a good point. I'll add it.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

mRax

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 55
    • View Profile
Re: In-game notes
« Reply #7 on: February 05, 2007, 03:52:21 PM »

Hi again, I'm sorry, but I don't really understand, how fonts are worked :( Can someone give me a little "sample"? For example, I used window in data package
Code: [Select]
WINDOW{
  X = 0
  Y = 0
  WIDTH = 1280
  HEIGHT = 1024
  NAME = "notebook"
  FONT = "fonts\note.font"
  SCRIPT = "scenes\items\notebook\scr\notebook.script"
  VISIBLE = FALSE
  STATIC{
    NAME = "page0"
    TEXT = ""
    TEXT_ALIGN = "left"
    VERTICAL_ALIGN = "top"
    ;BACK = "ui_elements\but_normal.image"
    FONT = "fonts\note.font"
    X = 130
    Y = 209
    WIDTH = 440
    HEIGHT = 580
    VISIBLE = TRUE
  }
}
with note.font in second localization package
Code: [Select]
TTFONT{
  SIZE = 23.8
  FACE = "Arial"
  FILENAME = "fonts\arial.ttf"
  BOLD = FALSE
  ITALIC = FALSE
  UNDERLINE = FALSE
  STRIKE = FALSE
  CHARSET = 1
  COLOR { 0, 0, 0 }
  ALPHA = 255
  LAYER{
    OFFSET_X = 0
    OFFSET_Y = 0
    COLOR { 0, 0, 0 }
    ALPHA = 255
  }
}
Maybe the trouble is in separate packages? (fonts isn't in primary data package, but in another)
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: In-game notes
« Reply #8 on: February 05, 2007, 04:56:02 PM »

I believe the above should work. Unless you're running the game from *compiled* packages. In that case the TTF files need to be stored directly in game directory, not inside the packages.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave
 

Page created in 0.047 seconds with 20 queries.