Jibble

Author Topic: LucasArts GUI Help Thread (NEW Scumm GUI Available!)  (Read 198750 times)

abstauber

  • Cavefish
  • Mittens Knight
  • still mowing the lawn
    • abstauber worked on one or more games that won an AGS Award!
    •  
    • abstauber worked on one or more games that was nominated for an AGS Award!
Re: LucasArts GUI Help Thread (NEW Scumm GUI Available!)
« Reply #540 on: 09 May 2017, 12:26 »
Sure, go to guiscript.asc and take a look at the Unhandled Function
instead of:
Code: [Select]
    // unhandled USE INV
    else if (UsedAction(eGA_UseInv)) player.Say("That won't do any good.");
you could write
Code: [Select]
    // unhandled USE INV
    else if (UsedAction(eGA_UseInv)) {
      if (player.ActiveInventory == iKnife) player.Say("I don't want to cut that.");
      else if (player.ActiveInventory == iOtherStuff) player.Say("I don't even know what it is.");
      else player.Say("That won't do any good.");
}
The unhandled function is all yours to be edited :)
« Last Edit: 09 May 2017, 14:01 by abstauber »

Re: LucasArts GUI Help Thread (NEW Scumm GUI Available!)
« Reply #541 on: 09 May 2017, 14:32 »
great! thanks again:)

Re: LucasArts GUI Help Thread (NEW Scumm GUI Available!)
« Reply #542 on: 12 Jul 2017, 10:44 »
Hu guys!

I have 2 questions, both regarding the doorscript.
1. That may be the simpler one: where can I define the default door sounds for opening and closing? The 9Verb pdf says that these sounds will be called if the script is used... but I don't know where to insert them ^^

2. My game is set in a house, hence I use a lot of doors. So when I test the game and run around the rooms, from time to time it happens that doors lock themselves(and of course then there is no key exising). Or doors that should be closed are open. Or the door is open, but the object sprite is not displayed. Anyone else has similar experiences?

Re: LucasArts GUI Help Thread (NEW Scumm GUI Available!)
« Reply #543 on: 12 Jul 2017, 11:51 »
1. open the main guiscript, check lines 48 - 52

2. double check your any_click_on_door functions; this definitely sounds like user error (i.e. wrong parameters)

abstauber

  • Cavefish
  • Mittens Knight
  • still mowing the lawn
    • abstauber worked on one or more games that won an AGS Award!
    •  
    • abstauber worked on one or more games that was nominated for an AGS Award!
Re: LucasArts GUI Help Thread (NEW Scumm GUI Available!)
« Reply #544 on: 12 Jul 2017, 12:06 »
1. in addition to that, you can also use "any_click_on_door_special". In this function you can set a custom audioclip for each door. (Useful if you have a wooden and an iron door.)

2. Make sure you keep track of your door ids. It sounds like some doors share the same id.

Re: LucasArts GUI Help Thread (NEW Scumm GUI Available!)
« Reply #545 on: 12 Jul 2017, 13:29 »
Thanks to you both :)

Just to clarify: Does that mean that every door in the whole game should have an ID on it's own? I thought that was linked to the room, so I started over from ID 1 in every room. Ahehehe...

abstauber

  • Cavefish
  • Mittens Knight
  • still mowing the lawn
    • abstauber worked on one or more games that won an AGS Award!
    •  
    • abstauber worked on one or more games that was nominated for an AGS Award!
Re: LucasArts GUI Help Thread (NEW Scumm GUI Available!)
« Reply #546 on: 12 Jul 2017, 13:42 »
Yup, every door is unique (nod)

Re: LucasArts GUI Help Thread (NEW Scumm GUI Available!)
« Reply #547 on: 12 Jul 2017, 19:21 »
Just to be really clear: a door that connects two rooms and is visible in both needs to use the same ID in both room scripts.
If you lock door 7 in room 2, then circle back through the entire mansion to room 3 and look at the same "physical" door from the other side, it has to be set up as door 7 in room 3, too, so the status of being open or locked is retained.

Think of the doors as global objects - each with its unique ID - that can be accessed from multiple rooms. Exactly like Characters.

Re: LucasArts GUI Help Thread (NEW Scumm GUI Available!)
« Reply #548 on: 12 Jul 2017, 23:01 »
Ah, ohmygod that makes so much sense... I never thouhgt of the doors working that way. It seems to work now :)

Now regarding the sound...

That's what I find in the script:
Code: Adventure Game Studio
  1. #ifdef USE_OBJECT_ORIENTED_AUDIO
  2. // In AGS 3.2 you do it this way:
  3. //   Audioclip *openDoorSound = aDoorsound;
  4. AudioClip*  openDoorSound,  
  5.             closeDoorSound,
  6.             unlockDoorSound;    
  7. #endif

Aaaand I don't relly get the pointer stuff...
So this here doesn't work.
Code: Adventure Game Studio
  1. #ifdef USE_OBJECT_ORIENTED_AUDIO
  2. // In AGS 3.2 you do it this way:
  3. //   Audioclip *openDoorSound = aDoorsound;
  4. AudioClip *openDoorSound = aTuerAuf,
  5.             closeDoorSound = aTuerzu,
  6.             unlockDoorSound = aTuerAuf;    
  7. #endif
  8.  
Debugger says: "Cannot assign initial Value to global pointer"
Sry guys, for the most part of the coding stuff I'm doing fine, but here I don't get how it's done right :/


Re: LucasArts GUI Help Thread (NEW Scumm GUI Available!)
« Reply #549 on: 12 Jul 2017, 23:19 »
Right, you have to assign them inside a function.

Code: Adventure Game Studio
  1. #ifdef USE_OBJECT_ORIENTED_AUDIO
  2. // In AGS 3.2 you do it this way:
  3. //   Audioclip *openDoorSound = aDoorsound;
  4. AudioClip*  openDoorSound,
  5.             closeDoorSound,
  6.             unlockDoorSound;
  7.  
  8. // called by the engine if it exists, at the very start of the game
  9. void game_start() {
  10.   openDoorSound = aTuerAuf;
  11.   closeDoorSound = aTuerzu;
  12.   unlockDoorSound = aTuerAuf;
  13. }
  14. #endif

Re: LucasArts GUI Help Thread (NEW Scumm GUI Available!)
« Reply #550 on: 22 Mar 2019, 09:25 »
 I was looking for how to add arrows to scroll in the inventory and also in the dialogs to add more than 5 options. However the links I find plugins or modules are obsolete. I can not find the way Could someone help me please?

abstauber

  • Cavefish
  • Mittens Knight
  • still mowing the lawn
    • abstauber worked on one or more games that won an AGS Award!
    •  
    • abstauber worked on one or more games that was nominated for an AGS Award!
Re: LucasArts GUI Help Thread (NEW Scumm GUI Available!)
« Reply #551 on: 22 Mar 2019, 09:41 »
The template that comes with AGS already has this build in. The scroll arrows appear automatically as soon as they are needed.

Re: LucasArts GUI Help Thread (NEW Scumm GUI Available!)
« Reply #552 on: 22 Mar 2019, 10:48 »
You're right, I forgot to add the item and it did not come out. Take me, but in any case, thank you very much for the quick response

Re: LucasArts GUI Help Thread (NEW Scumm GUI Available!)
« Reply #553 on: 27 Mar 2019, 14:52 »
How could I change the GUI language from the game? I would like to press a button to change to another language. I do not know what it puts in any_click of an object exactly

Re: LucasArts GUI Help Thread (NEW Scumm GUI Available!)
« Reply #554 on: 28 Mar 2019, 16:06 »
I was trying with this, but nothing happens

Code: Adventure Game Studio
  1. function english_AnyClick()
  2. {
  3.  //switch the GUI to English
  4.   int lang = eLangEN;
  5.   AdjustLanguage();
  6.   AdjustGUIText();
  7.  
  8.   if (Game.ChangeTranslation("English") == true) {
  9.     Display("English loaded");
  10. }
  11. }
  12.  

Can anyone help me please?

Re: LucasArts GUI Help Thread (NEW Scumm GUI Available!)
« Reply #555 on: 28 Mar 2019, 22:40 »
Open guiscript.ash (header), then add this anywhere in a separate line:

Code: Adventure Game Studio
  1. import int lang;

Then open the main guiscript.asc and find
Code: Adventure Game Studio
  1. int lang = eLangEN;
It's line 16 for me.
Right below, add this:
Code: Adventure Game Studio
  1. export lang;

Finally, in your code, remove "int":

Code: Adventure Game Studio
  1.   lang = eLangEN; // change global variable

For further questions best use the template's thread: https://www.adventuregamestudio.co.uk/forums/index.php?topic=38874.0

Re: LucasArts GUI Help Thread (NEW Scumm GUI Available!)
« Reply #556 on: 29 Mar 2019, 15:33 »
I had to delete "import lang" from GlobalScript.ash, but now all run perfect with your directions. That's perfect!! Thank you very much Khris :)

Re: LucasArts GUI Help Thread (NEW Scumm GUI Available!)
« Reply #557 on: 29 Mar 2019, 15:50 »
Wuooops! I have been checking that only the verbs change, however, the screen to load the game, pause, exit the game and the rest is still untranslated. Is this normal?

Re: LucasArts GUI Help Thread (NEW Scumm GUI Available!)
« Reply #558 on: 01 Apr 2019, 10:18 »
I've been trying and trying to see what's wrong, but I do not find much sense. When the game starts in English, everything is completely in English. When you click on Spanish, everything is activated in Spanish, the nine verbs change, the action text changes, and even the entire save and load game menu. Up to here everything perfect. However, when I press the button to return to English, the 9 verbs and the action text change perfectly to English again, but the entire GUI of F5 continues in Spanish.
I'm sorry to continue on this subject despite your recommendation Khris, but I thought maybe it was better to finish it here and take into account your guidance for other future questions and definitely ask there.

Cassiebsg

  • Cavefish
  • Fleeing the Cylon tyrrany...
    • Cassiebsg worked on one or more games that won an AGS Award!
    •  
    • Cassiebsg worked on one or more games that was nominated for an AGS Award!
Re: LucasArts GUI Help Thread (NEW Scumm GUI Available!)
« Reply #559 on: 01 Apr 2019, 20:42 »
-i think you should move to the proper thread like Khris suggested, as the author follows that thread and will more quickly give you a quick straight answer.
There are those who believe that life here began out there...