Author Topic: TEMPLATE: 9-verb MI-style 1.6.3 - Last update: 21th June 2018  (Read 72218 times)

Re: TEMPLATE: 9-verb MI-style 1.2.1 - updated 10/03/25
« Reply #40 on: 10 Oct 2010, 12:42 »
Left-clicking on a hotspot does cause the character to go to the object if the hotspot has a WalkToPoint other than (0,0). Objects however do not have WalkToPoints. This has nothing to do with this template - AGS simply does not specifiy WalkToPoints for objects.

This is what I do:

Code: Adventure Game Studio
  1. function oMyObject_AnyClick()
  2. {
  3.   player.Walk(X,Y, eBlock, eWalkableAreas);
  4.  
  5.   if(UsedAction(eGA_LookAt)) {
  6.     player.Think("It's my object.");
  7.   }
  8.   else if(UsedAction(eGA_Use)) {
  9.     player.Think("I can't touch this - daa da da daaa.");
  10.   }
  11.   else Unhandled();
  12. }
  13.  

Manually make the player go to (X,Y) before processing any specific actions. Sometimes I only include the walk command in the physical actions such as push/pull/open... and let the character "look" from away without moving. But what you may then want to include is a player.FaceX command to at least face the object.
ca. 50% completed

[Solved] When left ...
« Reply #41 on: 10 Oct 2010, 19:24 »
First thank you very much for answering so quickly.
It works great.

Really, thanks for answering.

Now I see it as an easy thing to do, but I was obfuscated trying to find a solution.
For the next time, I will drink a cool beer before make a question.

Thanks again.

Re: TEMPLATE: 9-verb MI-style 1.2.1 - updated 10/03/25
« Reply #42 on: 10 Oct 2010, 23:17 »
I am happy to be of service! There's a lot to be learned on these forum, but only if questions are asked.
Cheers!
ca. 50% completed

abstauber

  • Cavefish
  • Mittens Knight
  • still mowing the lawn
    • abstauber worked on a game that was nominated for an AGS Award!
      abstauber worked on a game that won an AGS Award!
Re: TEMPLATE: 9-verb MI-style 1.2.1 - updated 10/03/25
« Reply #43 on: 12 Oct 2010, 13:05 »
If you use the build-in function MovePlayer, you can also get rid of the blocking movement. That's even more SCUMM-esque :)

Code: Adventure Game Studio
  1. function oMyObject_AnyClick()
  2. {
  3.  
  4.   if (MovePlayer(X, Y)) {
  5.  
  6.     if(UsedAction(eGA_LookAt)) {
  7.       player.Think("It's my object.");
  8.     }
  9.     else if(UsedAction(eGA_Use)) {
  10.       player.Think("I can't touch this - daa da da daaa.");
  11.     }
  12.     else Unhandled();
  13.   }
  14. }
  15.  

Re: TEMPLATE: 9-verb MI-style 1.2.1 - updated 10/03/25
« Reply #44 on: 12 Oct 2010, 14:28 »
I have to shamefully admit that I didn't have a proper look at the new built-in functions that come with the template. That's because it is my first game (blah blah not recommended blah ;) ) so I kept the "new things" to a minimum.
ca. 50% completed

Re: TEMPLATE: 9-verb MI-style 1.2.1 - updated 10/03/25
« Reply #45 on: 21 Oct 2010, 21:18 »
Maybe someone can help me: I need to draw a gui above the dialog gui (gDialogsgui) but I just can't make the other gui appear above the dialog, despite the ZOrder property indicating that it should work... Any thoughts?
ca. 50% completed

Khris

    • Lifetime Achievement Award Winner
    •  
    • I can help with play testing
    •  
    • I can help with scripting
    •  
    • I can help with translating
    •  
    • Khris worked on a game that was nominated for an AGS Award!
Re: TEMPLATE: 9-verb MI-style 1.2.1 - updated 10/03/25
« Reply #46 on: 21 Oct 2010, 22:15 »
This isn't specific to the template, is it?

Nevermind, I suspect that the Dialog GUI is always drawn above everything else, regardless of its z-Order property.
Not knowing what exactly you want to achieve I'll simply point you here:
http://www.adventuregamestudio.co.uk/manual/DialogOptionsRenderingInfoFunctions.htm
This allows you to completely customize the rendering of the Dialog GUI.

Re: TEMPLATE: 9-verb MI-style 1.2.1 - updated 10/03/25
« Reply #47 on: 21 Oct 2010, 23:28 »
This isn't specific to the template, is it?

I wasn't sure and thought maybe it was a special property of this template's dialog gui, which on second thought seems rather stupid. ::)

Thanks for pointing in that direction, though I'm not sure if that's going to help me.
ca. 50% completed

Khris

    • Lifetime Achievement Award Winner
    •  
    • I can help with play testing
    •  
    • I can help with scripting
    •  
    • I can help with translating
    •  
    • Khris worked on a game that was nominated for an AGS Award!
Re: TEMPLATE: 9-verb MI-style 1.2.1 - updated 10/03/25
« Reply #48 on: 22 Oct 2010, 02:24 »
So, what effect do you want to achieve? Maybe there's an easier way.

abstauber

  • Cavefish
  • Mittens Knight
  • still mowing the lawn
    • abstauber worked on a game that was nominated for an AGS Award!
      abstauber worked on a game that won an AGS Award!
Re: TEMPLATE: 9-verb MI-style 1.2.1 - updated 10/03/25
« Reply #49 on: 22 Oct 2010, 07:39 »
Another trick is be to make the dialog GUI's background completely transparent and only let the text appear.
Then a GUI behind looks like it's the actual gui.

If it's about scroll buttons or other customisations, take a look at this module. http://www.adventuregamestudio.co.uk/yabb/index.php?topic=36313.0

Re: TEMPLATE: 9-verb MI-style 1.2.1 - updated 10/03/25
« Reply #50 on: 22 Oct 2010, 10:47 »
Changing the transparency to 100 doesn't suffice as then there's still the black box of the GUI instead of the GUI below being visible. However, it did give me an idea... I can dynamically build a sprite to my needs (as it is just about displaying some info) and then switch the background image of the dialog GUI.

Since you asked, this is what I'm doing:

At some point in the game there appears a dialog gui with text options for the player's wager. I then want to display his remaining chips in an info field on the right (guess what this is all about ;) ). So it should look like this (without text here):


Before you two had posted I made this workaround:


Now I have to decide which way I go... The first option is prettier I think, and it doesn't clutter the screen like using an additional row. In the second version however, the dialog GUI doesn't "change" so drastically, which is generally desirable, because you'd want consistency with your GUI . I don't think this is a big issue though, so I will probably go with version 1. I also think by now this belongs in the Critics Loungs so enough of this talk already. :)

Anyways, thanks for your help! I still have no clue how one would easily display another functional GUI without delving deep into the above quoted section of the manual. For my needs though, I have a solution. :)
ca. 50% completed

Khris

    • Lifetime Achievement Award Winner
    •  
    • I can help with play testing
    •  
    • I can help with scripting
    •  
    • I can help with translating
    •  
    • Khris worked on a game that was nominated for an AGS Award!
Re: TEMPLATE: 9-verb MI-style 1.2.1 - updated 10/03/25
« Reply #51 on: 22 Oct 2010, 19:26 »
As a final note maybe, you don't have to use the built-in dialog mechanism for this; why not create a standard GUI with appropriate buttons and turn it on?

Re: TEMPLATE: 9-verb MI-style 1.2.1 - updated 10/03/25
« Reply #52 on: 22 Oct 2010, 19:44 »
As a final note maybe, you don't have to use the built-in dialog mechanism for this; why not create a standard GUI with appropriate buttons and turn it on?

Yes, that would be another option. But I do use a lot of the dialog functinality in this part so this is the most convenient way to do it.
ca. 50% completed

Hello there!!!

First of all, let me say that's AWESOME (with capital letters) the work you've done with this template!!

It's all I was going after :)

Now let me explain the matter...

I want to do an adventure using your MI-style template, but I want to translate it to Spanish (I didn't see translated it yet). And I read the manual section of "Translation" but I'm a little lost and didn't see anything of "change the gui image" or something like that...

I see that with the template comes a PSD document to modify it with Photoshop. No problem at all here, because it's a piece of cake to translate it in Photoshop.

The hard thing (to me, that I'm a newbie) is to use the PSD translated version and OVERALL, to translate the commands and its keyboard shortcuts (Give -> Dar, Talk to -> Hablar con, Give -g- Dar -d-, Talk to -t- Hablar con -h-...).

Did I explained myself correctly?

Can you guide me into the correct path, please :)

A lot of thanks!!
« Last Edit: 18 Nov 2010, 20:56 by josemarg »

Khris

    • Lifetime Achievement Award Winner
    •  
    • I can help with play testing
    •  
    • I can help with scripting
    •  
    • I can help with translating
    •  
    • Khris worked on a game that was nominated for an AGS Award!
Re: TEMPLATE: 9-verb MI-style 1.2.1 - updated 10/03/25
« Reply #54 on: 18 Nov 2010, 21:03 »
Edit: I probably misinterpreted your post; open guiscript.asc in the project tree and navigate to the AdjustLanguage() function. In there you can set the button sprites and shortcuts. Just uncomment the German block and alter it.


The template is already built to make the translation of the GUI as easy as possible.
All you do is import the modified GUI buttons into the Sprite manager, then translate the game as usual. In the translation source you'll find lines like this:
Talk to %s

a_button_give 5 802 803 Gg
Translating the verb line is obvious; in the case of the button line it's important not to put the text into the translation (don't really know why, all I know is keeping it in the translating screws things up).
So as an example, say the give button is supposed to be at position 3 on the GUI, its up and down sprites are 45 and 46 and the shortcut is d, the translation file is supposed to look like this:
...
a_button_give 5 802 803 Dd
3 45 46 Dd
...
« Last Edit: 18 Nov 2010, 21:12 by Khris »

Re: TEMPLATE: 9-verb MI-style 1.2.1 - updated 10/03/25
« Reply #55 on: 18 Nov 2010, 21:35 »
Wow! That was a fast answer!!

Thanks for your time! I've done the text translations, now I'm going to try to change the GUI sprites.

Thanks!!!

Khris

    • Lifetime Achievement Award Winner
    •  
    • I can help with play testing
    •  
    • I can help with scripting
    •  
    • I can help with translating
    •  
    • Khris worked on a game that was nominated for an AGS Award!
Re: TEMPLATE: 9-verb MI-style 1.2.1 - updated 10/03/25
« Reply #56 on: 18 Nov 2010, 21:45 »
In case you missed my edit at the top of my previous post:
Changing the GUI with the translation file method is only suitable if you want to translate a finished game.
To translate the game while/before making it, use the AdjustLanguage function.

Re: TEMPLATE: 9-verb MI-style 1.2.1 - updated 10/03/25
« Reply #57 on: 18 Nov 2010, 22:43 »
Yep, understood :)

I add the Spanish Buttons in this post. Maybe are useful for somebody without Photoshop knowledges. Download them from:

http://www.elmeuprofe.com/ButtonsSPA.rar

Thanks for your help!!!

abstauber

  • Cavefish
  • Mittens Knight
  • still mowing the lawn
    • abstauber worked on a game that was nominated for an AGS Award!
      abstauber worked on a game that won an AGS Award!
Re: TEMPLATE: 9-verb MI-style 1.2.1 - TRANSLATION HELP, PLZ
« Reply #58 on: 19 Nov 2010, 11:43 »
Cool, thanks for sharing!
This brought my attention to a more elegant way of internationalisation, so I'd like to deliver verbs buttons in the most common languages (plus my own since I'm selfish ;) )

In a first step, translating the GUI buttons (including options) would be great, so I've prepared a code block and it would be awesome if some native speakers could punch in their language :)

Same goes for the verb buttons themselves, I already included english, german and now also spanish.
So if anyone could grab that photoshop file, and create some verbs, that would be cool too. (Even more cool, if you could provide a little txt with the english translation of those verbs).

Anyhow, here's the code block.

Code: Adventure Game Studio
  1. // English
  2.     OptionsTitle.Text   = "Options";
  3.     OptionsMusic.Text   = "Music Volume";
  4.     OptionsSound.Text   = "Sound Effects ";
  5.     OptionsSpeed.Text   = "Game Speed";
  6.     OptionsDefault.Text = "Default";
  7.     OptionsSave.Text    = "Save";
  8.     OptionsLoad.Text    = "Load";
  9.     OptionsRestart.Text = "Restart";
  10.     OptionsQuit.Text    = "Quit";
  11.     OptionsPlay.Text    = "Resume";
  12.     gPausedText.Text    = "Game Paused. Press Space to Continue";
  13.     RestoreTitle.Text   = "Please choose a game to load";
  14.     RestoreCancel.Text  = "Cancel";
  15.     SaveTitle.Text      = "Please enter a name";
  16.     SaveOK.Text         = "Save";
  17.     SaveCancel.Text     = "Cancel";
  18.     gConfirmexitText.Text = "Are you sure, you want to quit? (Y/N)";
  19.     gRestartText.Text   = "Are you sure, you want to restart? (Y/N)";
  20.  


If this is working out, I'd also like to provide default unhandled events, but of course that depends on the success of the first step.

Thanks in advance ;)

Re: TEMPLATE: 9-verb MI-style 1.2.1 - TRANSLATION HELP, PLZ
« Reply #59 on: 04 Dec 2010, 12:57 »
Hi
Trying out this template and I have one embarrassing problem.
How do you make cEgo clickable (the player)?
Like if I have an apple in inventory that I want him to eat.

I have tried with the same script as Bman but it dont work...