Downloaded Templates + GUI background images

Started by , Fri 12/05/2006 18:36:22

Previous topic - Next topic

Ebudiel

Ã,  Hello,

Ã,  I'm a new user of AGS and I'm confronted with a problem about the creation of a GUI. But above all, please excuse my English which is not perfect. :)

Ã,  I want to make a game with an interface in the LucasArts style. So, I firstly simply tried to intall some templates I've downloaded on the site "Look at you, hacker" (http://www.freewebs.com/skimbleshanks/templatesandmodules.htm).

Ã,  No one has really worked. In fact, when I want to start a new game and click on a new template (for example, FOA_temp_V20c) many error messages are displayed:

- This game was saved with an old version of AGS, and so all your room files need to be re-compiled. Do you want to do this now?

- There was an error compiling your script. The problem was:
Ã,  Ã,  In 'Global script'
Ã,  Ã,  Error (line 223): 'gui' is a global var; cannot use as name for local
Ã,  Ã,  Do you want to fix the script now?

Ã,  What does it mean? I suppose this template is actually a "beginning" of game with rooms and objects. Isn't it possible to find a "clean" template with only guis, fonts and a main character, just like the "Default Template" included in the AGS program ?

Ã,  Facing this problem, I tried to make my own interface: one gui including verbs and the inventory. But another problem appeared: I firstly wanted to insert a background image in the gui. In my game (640 * 480), I want an interface at the bottom with the same witdh than the screens of game. I'n that way, I've imported with the Sprites Manager an image with a 640 * 200 size. However, I've heard that I have to specify for the GUI itself a size of 320 * 100 in the Gui Editor. So, I did it and finally, the image is too big for the gui in the preview of the Gui Editor and I can't place any button. Only a part of the image is displayed. I tried to specify a size of 640 * 200 in the guy editor but the program denies.

Ã,  Ã, Could you help me? Thanks.

Khris

1. Since most of those templates are written for AGS 2.62 or below and scripting has changed dramatically since 2.7, you'll have to use the old version of AGS or rewrite all the scripts.
The first "error" notifies you that you are loading a game/template that was made with an older version. If the scripts are compatible, your game is rebuilt and afterwards will work fine with AGSEdit 2.7+. The second one, however, occures due to major scripting command changes. (E.g. MoveCharacter(EGO, blah...) became cEgo.Walk(blah...), and some previously available variable names aren't any longer.)

2. After you've downloaded the old version and started it using a template, just save the game, then exit AGS and delete all roomX.crm files in the game's dir. That way, every room will be gone and you can start fresh with the interface only. (Objects are saved within the rooms, only sprites are stored seperately and will still be there.)

3. I have no experience using 640, but try to set the background pic after you've added everything else to the GUI, then test the game. Some variables and dimensions are handled as 320-coordinates regardless of the room's size/game's resolution. Check the manual for further detail on this.

Ebudiel

Thank you for your answers, especially for the URL of the AGS old version.

I'll try it!

Ashen

Another (possibly easier) solution is to search the template script for gui and replace it with any other word - even altering the capitalisation will do (GUI[ ] is taken as different to gui[ ]).

As of V2.7, gui is a reserved word - it's used by the GUIs, so that gui[0] is equal to gStatusline, in the same way character[0] is equal to cEgo.
I know what you're thinking ... Don't think that.

A�rendyll (formerly Yurina)

My first simple suggestion about the width of the GUI: did you check the import for 640x400 option when you imported the sprite? If you didn't, you will get a 640x480 game with sprites which use 4 pixels (in a square shape) as one. Maybe you didn't even change the resolution also. If this isn't the problem with the graphics, I can't help. (Simple answers are always the best.)

KhrisMUC is right about the templates, the most are outdated. You'd better download graphics and ask around for codes yourself. It also helps if you state your AGS version in your signature, personal text, posts and/or PM's (like I did) so people don't make mistakes with which codes to give to you.

Good luck with your game!

~Yurina
Yuna: Give me a Y!
Rikku: Give me an R!
Paine: Give me a break...
~Final Fantasy X-2

I've been

Ebudiel

Thank you for your help. I've installed an old version of AGS and all is OK now.

Moreover, Yurina-chan was right: I changed the resolution between two imports of sprites. So, the "new" sprites weren't in the same resolution tant the first ones.

A�rendyll (formerly Yurina)

Always try checking simple things you might have overlooked first. I run into a lot of problems like these which are really simple to solve, but hard to think about.

Glad I could help! ;D

~Yurina
Yuna: Give me a Y!
Rikku: Give me an R!
Paine: Give me a break...
~Final Fantasy X-2

I've been

SMF spam blocked by CleanTalk