Help!
I am having my last game translated, so I am trying to test the code where a language GUI in the game would let you choose it. Before I make the GUI, I thought I'd check I can get it working first, so just threw it in a specific interaction within the game. I have created a translation trs file called French, and filled in a space with words for the specific line the character says when interacting with a magazine, using notepad (Would that mess it up?). With the below code however, the character speaks the standard English line.
Code: ags
This isn't the code in the manual, as it has a "static bool" I think it said at the top of the entry, which doesn't work as it says it needs to be outside a function, which is no good when it should be activated in a function!
To add to the confusion, the example given in the manual for using the code is as follows:
Code: ags
Now I'm no expert, but that code reads to me that it is just checking if the language is in Spanish, with nothing in that example being code to change the translation at all!? The only actions it will do is display some text! I've tried the code anyway, and sure enough it just says the second line "Unable to..", even in addition to the top code I gave.
What am I missing here? Thanks!
I am having my last game translated, so I am trying to test the code where a language GUI in the game would let you choose it. Before I make the GUI, I thought I'd check I can get it working first, so just threw it in a specific interaction within the game. I have created a translation trs file called French, and filled in a space with words for the specific line the character says when interacting with a magazine, using notepad (Would that mess it up?). With the below code however, the character speaks the standard English line.
function hKerrang_Interact()
{
cEgo.FaceDirection(eDirectionUpLeft, eBlock);
Game.ChangeTranslation("French");
cEgo.Think("&430 I like Sonic Boom Six, but I don't have time to read this.");
}
This isn't the code in the manual, as it has a "static bool" I think it said at the top of the entry, which doesn't work as it says it needs to be outside a function, which is no good when it should be activated in a function!
To add to the confusion, the example given in the manual for using the code is as follows:
if (Game.ChangeTranslation("Spanish") == true)
{
Display("Changed the translation to Spanish!");
}
else
{
Display("Unable to change the translation");
}
will attempt to change the translation to Spanish
Now I'm no expert, but that code reads to me that it is just checking if the language is in Spanish, with nothing in that example being code to change the translation at all!? The only actions it will do is display some text! I've tried the code anyway, and sure enough it just says the second line "Unable to..", even in addition to the top code I gave.
What am I missing here? Thanks!