Please login or register.

Login with username, password and session length
Advanced search  

News:

IRC channel - server: waelisch.de  channel: #wme (read more)

Author Topic: Use of string.tab  (Read 3148 times)

0 Members and 1 Guest are viewing this topic.

HelLRaiseR

  • I don't want to make a Monkey Island clone :(
  • Wiki editor
  • Frequent poster
  • ****
  • Karma: 4
  • Offline Offline
  • Posts: 270
    • View Profile
    • Adventure Box Studios
Use of string.tab
« on: May 21, 2009, 11:26:43 PM »

Hi,

I'm going to prepare the string.tab for the demo game, and I made several test, but only works in some cases.

For example:

If I put in the caption of a entity /ID_TEXT/Default text, works OK. If I put in the script a line like actor.Talk("/ID_TEXT/Default text"); works OK.

But if I put in the script a call like MyObject.DisplayText("/ID_TEXT/Default text"); this string not is interpretated, and WME pass to the DisplayText method the string "/ID_TEXT/Default text" and the method print in the screen /ID_TEXT/Default text not Default text only.

Is it correct? The Localization system works only with captions & methods like actor.Talk() or works will all strings of the game?
Logged
Regards,

    Fernando

Azrael

  • Regular poster
  • ***
  • Karma: 9
  • Offline Offline
  • Gender: Male
  • Posts: 155
    • View Profile
    • Mad Orange
Re: Use of string.tab
« Reply #1 on: May 22, 2009, 07:24:32 AM »

Yes, sometimes it didn't work directly.
But you can use Game.ExpandString(); to obtain the right text from string tab.
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: Use of string.tab
« Reply #2 on: May 22, 2009, 08:02:06 AM »

It definitely doesn't work with all strings in the game, that wouldn't be desirable. WME only localizes strings if it knows for sure they should be localized (i.e. in built-in methods such as Talk, and in definition files, like .window files).
If you're dealing with strings yourself, and you want those localized, use Game.ExpandString(), like Azrael said.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

HelLRaiseR

  • I don't want to make a Monkey Island clone :(
  • Wiki editor
  • Frequent poster
  • ****
  • Karma: 4
  • Offline Offline
  • Posts: 270
    • View Profile
    • Adventure Box Studios
Re: Use of string.tab
« Reply #3 on: May 22, 2009, 12:54:23 PM »

Works perfectly. Thanks
Logged
Regards,

    Fernando
 

Page created in 0.038 seconds with 23 queries.