LucasArts GUI Help Thread (NEW Scumm GUI Available!)

Started by TerranRich, Fri 01/08/2003 06:04:47

Previous topic - Next topic

abstauber

Well, this can be done with plain AGS functions, all those "any_click_walk" functions are shortcuts for walking, talking and doing things.
But nothing stops you from using stock AGS ;)

e.g. like this:

Code: ags

function cup_AnyClick()
{
  if(UsedAction(eGA_PickUp)) {
      player.AddInventory(iCup);
      oCup.Visible=false;
      player.Say("Yoink!");
    }
}

rmonic79

Quote from: abstauber on Tue 18/11/2014 08:02:06
Well, this can be done with plain AGS functions, all those "any_click_walk" functions are shortcuts for walking, talking and doing things.
But nothing stops you from using stock AGS ;)

e.g. like this:

Code: ags

function cup_AnyClick()
{
  if(UsedAction(eGA_PickUp)) {
      player.AddInventory(iCup);
      oCup.Visible=false;
      player.Say("Yoink!");
    }
}

if i try to use standard ags talk, the player try to go near the character yet even if i specify coordinates and with standard object "look" works using left click (first examine and then click on object) but the right click shortcut give me nothing. The scene is : the main character can't goes near some object on a desk but he could be able to examine them and to talk with npc without go close to him (if i specify coordinates, ego first goes near npc and then goes back to xy and talk and is this i want to avoid). thanks

abstauber

Yeah, you're right. That behavior is hard-coded.

Try to paste the contents from the linked file to guiscript.asc (overwrite it ;) )
guiscript.txt

In-game you can re-enable the old behavior via set_approaching_char().

rmonic79

Quote from: abstauber on Tue 18/11/2014 14:38:00
Yeah, you're right. That behavior is hard-coded.

Try to paste the contents from the linked file to guiscript.asc (overwrite it ;) )
guiscript.txt

In-game you can re-enable the old behavior via set_approaching_char().
it seems to work fine :) but i had to import set_approaching_char() in the header to make it selectable, is it correct?

abstauber

Yeah, that's correct. Could you solve that other translation issue in the meantime?

rmonic79

Quote from: abstauber on Tue 18/11/2014 19:24:41
Yeah, that's correct. Could you solve that other translation issue in the meantime?
no, the problem persists but i bypassed it overwriting the English gui with Italian and setting language to it, because i've noticed that if want to make an english translation and set the language to "en", even if the English gui is overwritten the text is shown in english, i don't know why but it works :) but i'm curious about the reason :)

abstauber

hehe - also a valid workaround. The initial problem with the translated GUI is actually a bug, which I've just fixed. I'll upload a new template soon in the according thread.

rmonic79

Quote from: abstauber on Wed 19/11/2014 08:52:12
hehe - also a valid workaround. The initial problem with the translated GUI is actually a bug, which I've just fixed. I'll upload a new template soon in the according thread.
Thanks a lot :) you saved us :)we look forward for update. Thanks for your work

rmonic79

#468
i can't find a right way to use set_door_strings. I'm trying to define different string for "look at" command for each door in game. Can someone help me? if i try to change it inside a room script it gives me an error and the game crash

abstauber

Well, set_door_strings is meant to set things global for all doors. But you can adjust it for each hotspot of course. At least this doesn't crash for me:
Code: ags

function hDoor_AnyClick()
{
  set_door_strings("Hello door","It is locked.","I can't unlock it with that.","I have to close it first.","Now it's unlocked.","The door is locked again.");
  if (any_click_on_door_special(20, oDoor.ID, 61, 104, eDir_Left, 2, 180, 88, eDir_Left, null, null, 4, 0)==0) Unhandled();

}



rmonic79

Quote from: abstauber on Tue 25/11/2014 16:49:49
Well, set_door_strings is meant to set things global for all doors. But you can adjust it for each hotspot of course. At least this doesn't crash for me:
Code: ags

function hDoor_AnyClick()
{
  set_door_strings("Hello door","It is locked.","I can't unlock it with that.","I have to close it first.","Now it's unlocked.","The door is locked again.");
  if (any_click_on_door_special(20, oDoor.ID, 61, 104, eDir_Left, 2, 180, 88, eDir_Left, null, null, 4, 0)==0) Unhandled();

}


Works fine :) i didn't put set_door_strings in the function hdoor_anyclick but in room load  :-[  sometimes i do such a stupid thing... :)

rmonic79

is there a way to scroll dialogue? i have this problem
and i didn't find any solution :(
thanks

abstauber

Yes there's is way but it involves somewhat advanced custom dialog scripting.

For starters you can do remove the current GUI to get AGS' default behavior.
In "General Settings" under "Dialog" set "Use GUI for dialog options" to 0. That way the dialog box scales up to show all the topics.

rmonic79

Quote from: abstauber on Sun 07/12/2014 08:42:50
Yes there's is way but it involves somewhat advanced custom dialog scripting.

For starters you can do remove the current GUI to get AGS' default behavior.
In "General Settings" under "Dialog" set "Use GUI for dialog options" to 0. That way the dialog box scales up to show all the topics.

with zero i have this result


abstauber

But you have to admit that now all topics are being shown ;)

This module can provide scrolling dialogs, but it takes some time to get used to it.
http://www.adventuregamestudio.co.uk/forums/index.php?topic=36313.0

I'm also using a scumm style scrolling dialog GUI in AeroNuts, which has been open-sourced.

rmonic79

Quote from: abstauber on Mon 08/12/2014 14:55:40
But you have to admit that now all topics are being shown ;)

This module can provide scrolling dialogs, but it takes some time to get used to it.
http://www.adventuregamestudio.co.uk/forums/index.php?topic=36313.0

I'm also using a scumm style scrolling dialog GUI in AeroNuts, which has been open-sourced.
the module works fine thanks, for aeronuts where i can find the sourcecode?

abstauber



rmonic79

#478
i have a little problem using inventory item with "use with". The centre of the cursor moves diagonally upleft and it's difficult to higlight small objects. Is there a way to avoid this?

Solved:I didn't know i have to set a mouse cursor for every inventory Item, now works fine.

rmonic79

Hi guys i've encountered some problems with ags 3.4 alpha. First facecharachter is already defined and i commented the script in the guiscript to avoid error, then when the options of the dialogues are displayed them cannot be choosen , instead the click give an highlight . The game was originally make with ags 3.2 and i disabled Enforce object-based scripting to make processclick works but nothing. Any help?

SMF spam blocked by CleanTalk