Please login or register.

Login with username, password and session length
Advanced search  

News:

For WME related articles and tutorials visit WME Resource Center.

Author Topic: String table support for scene entities custom properties  (Read 3795 times)

0 Members and 1 Guest are viewing this topic.

McCoy

  • The cocido eater
  • Frequent poster
  • ****
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 365
  • Spurrrrrrring
    • View Profile
    • Spur Games
String table support for scene entities custom properties
« on: June 25, 2003, 08:27:52 PM »

I didn't know where to post this, so I'll post it here.

Right now i'm using the custom properties of the scene entities to hold the action name that the character can perform over it. Let me explain it: I made a little system for my game that, everytime you try to perform an action over an object, shows a text at the bottom of the screen that sais what the action is going to be, for example, I have a door, if you select the hand in the right-hold menu, down appears "Open door". You know, all adventure games have this  ;D. Well, but the default text I used for the hand was "Pick up", so, for displaying "Open door" instead of "Pick up door", I add a custom property to the door entity, called "hand" with the value of "Open", so it override the "Pick up" default. It's the same for other actions, like "Speak to", I add a "mouth" property and I put the value of, for example "Eat". The problem is that when I try to add a string table identifier, like /ACTION01/Open, down the screen appears /ACTION01/Open door. And if I put "/ACTION01/Open" (notice the quotation marks), the engine DELETEs the property!!! I tried to do it by SceneEdit and by editting the .scene file by hand in notepad, and it was the same. So the only way to translate the actions is to edit them by hand one by one, and the worst is that it's me who must do it, the translator only knows how to write in msword  :P

So please, Mnemonic, fix this or add this feature or anything, I don't think it would be very hard. ;D
Logged

Click here to sign my sig!

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re:String table support for scene entities custom properties
« Reply #1 on: June 25, 2003, 10:30:11 PM »

Ok, WME doesn't expand string table references in custom properties, and I'm not sure it should. But you can expand them explicitly using the Game.ExpandString() method. Just pass your custom property value to this function and it will return a localized string.

About those quotes... well, SceneEdit shouldn't allow you to write quotes to the property value because it messes up the scene file. I'll have to fix that.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

McCoy

  • The cocido eater
  • Frequent poster
  • ****
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 365
  • Spurrrrrrring
    • View Profile
    • Spur Games
Re:String table support for scene entities custom properties
« Reply #2 on: June 25, 2003, 10:46:31 PM »

Yeah! now it works perfectly with Game.ExpandString()  ;D . I ever wondered what was the purpose of that method... now I know  ;D.

Wow, now I feel kinda silly, I wrote a lot for a simple solution like this  :P
Logged

Click here to sign my sig!
 

Page created in 0.033 seconds with 19 queries.