LucasArts GUI Help Thread (NEW Scumm GUI Available!)

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

Previous topic - Next topic

Scummbuddy

This most likely has to do with the version of AGS you are using. Find out through the template documentation what version of AGS the template was built for, and then we can get you that version to use with the template, and you shouldn't run into any problems using it.
- Oh great, I'm stuck in colonial times, tentacles are taking over the world, and now the toilets backing up.
- No, I mean it's really STUCK. Like adventure-game stuck.
-Hoagie from DOTT

Wonko The Sane

#321
i am using 2.71
...that is when I figured out that the world had gone insane, so I built an asylum for it. Poor thing, I hope it gets better.
-Wonko The Sane

Amaury

#322
Hi, i've got a problem.
I use MI2.7, and Walk-Behinds hotspot don't seem to work. Serveral time, it's working when I pute a Baseline but serveral time, it didn't work.

Somebody know what's happening ?


(Sorry for my crappy english, i'm french)

[Edit :] Resolved, i forget to put de Baseline, ROFL

Amaury

Quote from: Wonko The Sane on Mon 15/05/2006 22:52:00
I havedownload the GUI template and I keep getting an erro when I try the test game. It says: Error (line 631): Type mismatch: cannot convert 'const string' to 'string' Iam sorry if this problem has been addressed in previous posts but I don't have time to go through 16 pagesÃ,  :-

See the DutchMarco Topic ( http://www.adventuregamestudio.co.uk/yabb/index.php?topic=24112.msg323987#msg323987 ), he explain what you have to change

Wonko The Sane

#324
I tried that but it didn't work for some reason, could somebody post the entire updated global code for v2.71?
...that is when I figured out that the world had gone insane, so I built an asylum for it. Poor thing, I hope it gets better.
-Wonko The Sane

Scummbuddy

Right now there is not one. You can either wait for one, do it yourself, or do what I suggested before, and use an older version of AGS that the template was made with.

We try to make one with the official releases, and not update one every beta release. We're only human.  ;)
- Oh great, I'm stuck in colonial times, tentacles are taking over the world, and now the toilets backing up.
- No, I mean it's really STUCK. Like adventure-game stuck.
-Hoagie from DOTT

SSH

#326
Err, Scummy, 2.71 hasn't been beta since January  ;)

Anyway, here is my attempt at updating the MI2 template for AGS 2.71. I've also had a go at making it stay working in the 2.72 beta. Please let me know of any problems with it in this thread.

Can a mod please update the first post of the thread with it, too?
Edit by Ashen: Done
12

Lazarus

Hi SSH
Good work on the updating.
I was going to ask you if you had sorted out the unhandled event for inventory items on other inventory items as with the 2.70 version they didn't always work.

I thought when testing your version you had the same problem, but what I found with your example with the "needles" inventory was that you were missing the unhandled function it should read like:

Code: ags

Ã,  Ã,  if (UsedInvMode(USE,3)){ // (mode used,inventory number)
// Display ("Chachipiruli");Ã,  
player.LoseInventory(inventory[1]);
player.LoseInventory(inventory[3]);
player.AddInventory(inventory[2]);
}

else Unhandled(); // <---


I also found the interactions for the "voodoo doll" example you show doesn't work if other inventory items are used on it. So it's better to use the above example.


Also you might want to comment out the
Code: ags

#define FIRST_INV_SLOT_COORDS


As you have named the inventory box so when moving the gui's around you don't need to set new coordinates for it.

Code: ags

Ã,  if (MainInventory.TopItem > 0){Ã,  Ã,  Ã, //if invent. can scroll up 
Ã,  Ã,  gMaingui.Controls[9].AsButton.NormalGraphic=INV_UP_ARROW_ON_SPRITE;
Ã,  }
Ã,  else //if can not scroll up
Ã,  Ã,  gMaingui.Controls[9].AsButton.NormalGraphic=INV_UP_ARROW_OFF_SPRITE;Ã,  Ã, 
Ã,  if (MainInventory.TopItem < MainInventory.ItemCount - (MainInventory.RowCount*MainInventory.ItemsPerRow))Ã,  Ã, //if invent. can scroll down 
Ã,  Ã,  gMaingui.Controls[10].AsButton.NormalGraphic=INV_DOWN_ARROW_ON_SPRITE;Ã,  
Ã,  elseÃ,  // if can not scroll down
Ã,  Ã,  gMaingui.Controls[10].AsButton.NormalGraphic=INV_DOWN_ARROW_OFF_SPRITE;
//-----------------------------------------------------
}


Thats my findings at present I'll keep testing it.

Keep up the good work

Lazarus
*Currently using AGS Editor 2.70 (Build 2.70.601)*

SSH

Quote from: Lazarus on Mon 12/06/2006 12:30:45
I thought when testing your version you had the same problem, but what I found with your example with the "needles" inventory was that you were missing the unhandled function it should read like:
Fixed.

Quote
I also found the interactions for the "voodoo doll" example you show doesn't work if other inventory items are used on it. So it's better to use the above example.
Not sure what you mean by this. I didn't change any interactions from the 2.7 template.

Quote
Also you might want to comment out the
Code: ags

#define FIRST_INV_SLOT_COORDS

Removed entirely


Quote
Code: ags

  if (MainInventory.TopItem > 0){     //if invent. can scroll up 
    gMaingui.Controls[9].AsButton.NormalGraphic=INV_UP_ARROW_ON_SPRITE;
  }
  else //if can not scroll up
    gMaingui.Controls[9].AsButton.NormalGraphic=INV_UP_ARROW_OFF_SPRITE;   
  if (MainInventory.TopItem < MainInventory.ItemCount - (MainInventory.RowCount*MainInventory.ItemsPerRow))   //if invent. can scroll down 
    gMaingui.Controls[10].AsButton.NormalGraphic=INV_DOWN_ARROW_ON_SPRITE;  
  else  // if can not scroll down
    gMaingui.Controls[10].AsButton.NormalGraphic=INV_DOWN_ARROW_OFF_SPRITE;
//-----------------------------------------------------
}


Errr... what was this code for? That's the same as what I have.


Anyway, thanks for the testing!
12

Lazarus

#329
With regards to the voodoo doll interactions yes your quite right it is in the 2.70 version. (Slaps face repeatedly)
And maybe that should have been taken out.

*Edit* The example shown with the voodoo doll uses the drop down menu conditional and it's this that doesn't kick in the unhandled event for other inventory items used on it.*

With reagrds to the
Code: ags

if (MainInventory.TopItem > 0){Ã,  Ã,  Ã, //if invent. can scroll up 
Ã,  Ã,  gMaingui.Controls[9].AsButton.NormalGraphic=INV_UP_ARROW_ON_SPRITE;
Ã,  }
Ã,  else //if can not scroll up
Ã,  Ã,  gMaingui.Controls[9].AsButton.NormalGraphic=INV_UP_ARROW_OFF_SPRITE;Ã,  Ã, 
Ã,  if (MainInventory.TopItem < MainInventory.ItemCount - (MainInventory.RowCount*MainInventory.ItemsPerRow))Ã,  Ã, //if invent. can scroll down 
Ã,  Ã,  gMaingui.Controls[10].AsButton.NormalGraphic=INV_DOWN_ARROW_ON_SPRITE;Ã,  
Ã,  elseÃ,  // if can not scroll down
Ã,  Ã,  gMaingui.Controls[10].AsButton.NormalGraphic=INV_DOWN_ARROW_OFF_SPRITE;
//-----------------------------------------------------
}



that was to show anyone else looking where you had named the inventory box.

*Currently using AGS Editor 2.70 (Build 2.70.601)*

Khris


SSH

I've updated the template on my site. Thanks for finding and debuigging this, khrisMUC
12

Boco

#332
two questions I think are related to the template...

One is that I want to be able to talk to hotspots and objects yet when I put the cursor over those areas, the talk to thingy doesnt select them.

Also I changed the res for my game from the original tiny res and would like to know how to change the seperation incrament between inventory items so I can space them out properly.

Thanks.

edit: also where are the open and close / push and pull in the interaction thingy...

Khris

Well, add characters if you wanna run dialogs with inanimate objects. Just assign the Object's sprite to all four loops.

You can set the width and height of an inventoy item by changing x.ItemWidth and x.ItemHeight. Look it up in the manual. (Scripting -> GuiInvWindow)

Open/Close/Push/Pull are handled seperately, please refer to the included readme for details.

Boco

Awesome got everything working. Again, you guys are awesome. I'm getting the hang of things now.

vurt

Hi all,

I've recently downloaded AGS and I'm very impressed with it. Since I'm a LucasFilm/Arts junkie from way back, I was over the moon to see that there was a template that allowed you to use the classic Lucas UI.

However, I've had a problem using the MI2 template with AGS 2.72. When I click on a hotspot, the game crashes. This happens with the demo game. You can reproduce it with the test game by walk left and walking to the door to the woodcarver's hut.

The full error message is:

(ACI version 2.72.920)

in Global script (line 425)
from Global script (line 444)
from Global script (line 543)
from Global script (line 550)
from Global script (line 789)

Error: GetGameParameter: invalid frame specified.

This problem doesn't occur with 2.71, so I can still get on and work on my game (which, at this stage, mostly consists of learning to draw) but it would be nice to use the latest version.

Thanks in advance.

Apologies if this has been answered upthread; I did look through but couldn't find any solutions.

SSH

I'll have a go at making it work with 2.71 and 2.72 soon
12

Lazarus

I had a quick look using 2.72, I also had the same error only it was with line 428.
Code: ags

ViewFrame *vf2=Game.GetViewFrame(CURSOR, 0, counter/DELAY);


So I then chaged it too :
Code: ags

ViewFrame *vf2=Game.GetViewFrame(CURSOR,0,1);

This may not be right, but for now it seems to work.
*Currently using AGS Editor 2.70 (Build 2.70.601)*

SSH

The bug is in line 387 of the template's global script, where:

Code: ags

int numframes=Game.GetFrameCountForLoop(CURSOR, 0);


should be

Code: ags

int numframes=Game.GetFrameCountForLoop(CURSOR, 0)-1;


which means the counter resetting happens 1 cycle too late. Thanks again to Lazarus for his debugging hints!

The zip download on my site has been updated with this fix.
12

vurt

Wow - thanks for the speedy turnaround. I should really have had a go at debugging it myself, but I'll wait until I've finished the manual before I dive too deep into the code :)

SMF spam blocked by CleanTalk