April 28, 2024, 03:49:44 AM
Welcome,
Guest
Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
For WME related articles and tutorials visit
WME Resource Center
.
Home
Help
Search
Calendar
Login
Register
Wintermute Engine Forum
>
Wintermute Engine
>
Technical forum
>
Topic:
Use of string.tab
« previous
next »
Pages: [
1
]
Print
Author
Topic: Use of string.tab (Read 2980 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
Posts: 270
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
Gender:
Posts: 155
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
Gender:
Posts: 5683
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.
HelLRaiseR
I don't want to make a Monkey Island clone :(
Wiki editor
Frequent poster
Karma: 4
Offline
Posts: 270
Re: Use of string.tab
«
Reply #3 on:
May 22, 2009, 12:54:23 PM »
Works perfectly. Thanks
Logged
Regards,
Fernando
Print
Pages: [
1
]
« previous
next »
Wintermute Engine Forum
>
Wintermute Engine
>
Technical forum
>
Topic:
Use of string.tab