Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Topics - ShinjinNakamura

#1
I'm currently translating my game from English to Korean. However I can't add Korean text in the game script files, they end up appearing as question marks as well as in the rendered game.

How do I go about this?
#2
Salam,
I applied the following script to have my cursor change from walk icon to interact icon on mouse over. Thing is it works fine for characters, but when I apply to objects it just doesn't work.
Code: AGS

function room_RepExec()
{
if (Object.GetAtScreenXY(mouse.x, mouse.y) == oPaper)
{
Mouse.Mode = eModeInteract;
}
else Mouse.Mode = eModeWalkto;

This was added under room script.
#3
Salam,
I intended to use a global variable to make multiple dialogs on a single character.
I defined the variable in the interface (BoramTalk, with starting value 1), and wrote this code:
----------------------------------------------------------------------------
Code: AGS

function cBoram_Talk()
{
cHyomin.FaceCharacter(cBoram);
cHyomin.LockView (VIEW3);
cHyomin.Animate(0, 1, eOnce, eNoBlock, eForwards);
SetSkipSpeech(3);
cHyomin.Say ("Boram! What are you doing?!");
cBoram.Say("Eating cake!");
cHyomin.Say("How did you get IN the cake though?!");
cBoram.Say("A story better left untold.");
cHyomin.Say("If you say so...");
cHyomin.UnlockView();
cHyomin.Say("Enjoy your cake then I guess!");
cBoram.Say("Wait! Help me eat it all so I can get out!");
cBoram.Say("The boss will kill me if he finds out I went against my diet!");
cHyomin.Say("I can't eat all that!");
cBoram.Say("Well get the others here and help me then!");
cHyomin.Say("Ok...");
BoramTalk += 1;
}

if (BoramTalk == 2)
{
{cBoram_Talk() = false}
{
function  cBoram_Talk2()
{cBoram.Say ("Nom Nom");
}
}
}

-----------------------------------------------------------------
When the character Boram is clicked on once, the function cBoram_Talk runs.
With it I added the line BoramTalk += 1;
With this the variable value should go up to 2.
And going on to the if statement: it makes cBoram_Talk false and initiates cBoram_Talk2

The problem for me is this[ GlobalScript.asc(78): Error (line 78): Parse error: unexpected 'if']

Also I tried putting this dialog in the room script (because the character stays in the same room), but it doesn't initiate then.

#4
Salam,

I've checked the [Use GUI for dialog options] under general settings by inputting 1 (because the ID for the custom made gui I want to use is 1),
and made sure under the gui options to enable (PopupYPos). When I run the game, it doesn't appear.

I even tried enabling [Custom Text-Window GUI] under general settings by inputting 1. Still doesn't appear.
By the way Iam using lucasart style.

So I thought I would go script my own, using the manual's example as a template.
---------------------------------------------------------------------
Code: ags

function dialog_options_get_dimensions(DialogOptionsRenderingInfo *info)
{
  info.X = 335;
  info.Y = 312;
  info.Width = 200;
  info.Height = 600;
}

function dialog_options_render(DialogOptionsRenderingInfo *info)
{
DrawingSurface.DrawImage(335,  312, 13)};
}

--------------------------------------------------------------------------
Problem here is that when inputting the SpriteSlot number, the one I want to use is no. 13, the following error message appears:
GlobalScript.asc(12): Error (line 12): must have an instance of the struct to access a non-static member

If I could use the former easier method, that would be great. But I don't mind the latter scripting method either.

Please kindly help,
Thanks in Advance.
#5
Salam,

Iam trying to move an NPC up and down in the background in a constant loop, and have applied the following code in the room script file:
-----------------------------------------------------
Code: ags

// room script file
function room_load()
{
cBoram.y=370;
}

function repeatedly_execute() 
{
cBoram.y+=1;
if (cBoram.y=380) cBoram.y=370;
}

-----------------------------------------------------
Everytime I run it, the following error message appears:
_____________________________________________________
Failed to save room room1.crm; details below
room1.asc(10): Error (line 10): Parse error in expr near 'cBoram'
______________________________________________________
line 10 is  the last one with "if"
c.Boram is the NPC


SMF spam blocked by CleanTalk