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

Petar

  • Guest
Re:The LucasArts GUI Help Thread
« Reply #40 on: 07 Dec 2003, 14:52 »
I tried with hotspot properties (that was my first idea to define THE hotspots with exits), and it all works fine and dandy, but as I said, its not a problem in changing the cursor, the problem is with reverting it back.

My logic tells me it should work like this (this is not an actual script=)

if mouse_over HOTSPOT X
 than
Change cursor graphic (y)
else
SetDefaultCursor,

but unfortunately it doesn't work. I am obviously missing something here as it should be a pretty straightforward thing. Well, I'll try some different approach, or I'll ask Igor Sinkovec as he did what I need in that small demo of his P.D. *the scene with a housekeeper*.

BTW, Proskrito, thanks for the DOTT template, I managed to learn alot about switching characters with different GUI's etc. That works, I only have to figure out the inventory issues.

Petar

  • Guest
Re:The LucasArts GUI Help Thread
« Reply #41 on: 11 Dec 2003, 20:14 »
Ok, this has now really turned into a mistery to me.

I browsed around and found Gac's tutorial on changing the cursor graphics over an object, and it still doesn't work.
I tried

GetLocationType
GetLocationName
Properties
SetMOuseCursor
ChangeCursorGraphic
SetCursorMode
excerpts from DOTT gui
uhm....

StrComp
and none of them works. Each one of them changes the graphic but it WON'T CHANGE BACK, damnit.

Please, this is not an imperative, but I would REALLY like to know how this thing works.

Thanks.

LeChuckie I am from Zagreb. How did you hook up with AGS. I just found it about a month ago, and I am really enjoying it *except* this small problem.

SSH

  • Flying round the world at the speed of haggis
    • I can help with scripting
    •  
    • SSH worked on a game that was nominated for an AGS Award!
      SSH worked on a game that won an AGS Award!
Re:The LucasArts GUI Help Thread
« Reply #42 on: 11 Dec 2003, 20:19 »
Petar: maybe if you post the code you have in your global repeatedly_execute, then we can help...

Petar

  • Guest
Re:The LucasArts GUI Help Thread
« Reply #43 on: 11 Dec 2003, 20:59 »
Ok, here goes....

Hotspot 4 is used on the border of the screen to change the cursor graphic into an arrow (like in MI3)

In Hotspot 4 interactions under (Mouse MOves over hotspot) I runned a script:

SetMouseCursor (4);  --- that doesnt work because it doesn't change the cursor back to the default.

if we go the complicated way this would be the script:

GetLocationName(mouse.x,mouse.y,hotspot 4); //I don't understand the variable name here
if (StrComp(hotspot,"hotspot 4")==0) SetDefaultCursor();
else  
SetMouseCursor(4);  

It always works, it changes the cursor but the when I move the mouse away from the hotspot 4 it stays the same, i.e. it doesn't change back to default cursor.

Do I have to initialize the default cursor at the beggining? hmmm....lemme try it now....nope, doesn't work.

there you have it. if you know how to solve the problem your help would be much appreciated.





SSH

  • Flying round the world at the speed of haggis
    • I can help with scripting
    •  
    • SSH worked on a game that was nominated for an AGS Award!
      SSH worked on a game that won an AGS Award!
Re:The LucasArts GUI Help Thread
« Reply #44 on: 11 Dec 2003, 21:12 »
You said that you read the GAC Tutorial on this. I think you missed the line that said:

Quote
Just put the following code in the GLOBAL SCRIPT'S REPEATEDLY EXECUTE function:

der Warst

  • Guest
Re:The LucasArts GUI Help Thread
« Reply #45 on: 12 Dec 2003, 01:06 »
Well, err...

I posted this in the beginners forum since I'm an absolute beginner though I think my question is rather advanced....

I'm studying Art and want to do an AGS game as a project, I want to use a Lucasarts GUI based on the FOA template and wanted to use about two or three Player characters, but since they should be absolutely different i would like to use individual GUIs for each character. Not actually completely different, but some of the Buttons should have different meanings.

e.g. I have one character that should have a "believe in" Button, or another one should have a "lie to" instead of "talk to" and so on .

So, is it possible to customize some parts of the GUI depending on which character is currently played?

Please answer for idiots, I'm just learning to use the script language.

Thanks,

Simon

Scummbuddy

  • Mittens Knight
  • Give Stylish Confetti to BoZo - Wheee!
    • I can help with AGS tutoring
    •  
    • I can help with animation
    •  
    • I can help with backgrounds
    •  
    • I can help with characters
    •  
    • I can help with proof reading
    •  
    • I can help with scripting
    •  
    • I can help with story design
    •  
    • I can help with voice acting
    •  
Re:The LucasArts GUI Help Thread
« Reply #46 on: 12 Dec 2003, 01:36 »
Get the DOTT style gui at the same download site
- 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

der Warst

  • Guest
Re:The LucasArts GUI Help Thread
« Reply #47 on: 12 Dec 2003, 02:22 »
Get the DOTT style gui at the same download site

aha...?

and how's that supposed to help me? ???
I allready tried the DOTT style Gui and it looks pretty much the same as the FOA one except for the different look. But what I need is some advice on using different GUIs for different characters (if this is possible).

Thanks anyway,

Simon

Scummbuddy

  • Mittens Knight
  • Give Stylish Confetti to BoZo - Wheee!
    • I can help with AGS tutoring
    •  
    • I can help with animation
    •  
    • I can help with backgrounds
    •  
    • I can help with characters
    •  
    • I can help with proof reading
    •  
    • I can help with scripting
    •  
    • I can help with story design
    •  
    • I can help with voice acting
    •  
Re:The LucasArts GUI Help Thread
« Reply #48 on: 12 Dec 2003, 03:33 »
yes, this one is set up for 3 different guis and inventories for three different main characters.

read the helpfile that comes with it, i think that will answer your questions.
- 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

Re:The LucasArts GUI Help Thread
« Reply #49 on: 12 Dec 2003, 09:43 »
Where abouts are all these guis? I've tried all the links around the posts, but it seems the sites have gone down!

Re:The LucasArts GUI Help Thread
« Reply #50 on: 12 Dec 2003, 10:36 »
Warst: you could do a custom SwitchPlayerCharacter function that, apart from changing the player character, also changed some gui buttons pics to the ones you want, and, in the interface_click function, in those buttons, check who is the player character to see what action is done, ie:
if (button==4){
if (GetPlayerCharacter()==PLAYER1) SetMode("talk to");
else if (GetPlayerCharacter()==PLAYER2)SetMode("lie to");
}
Or you could just do different guis for each character.

Elvis: check this thread: http://www.agsforums.com/yabb/index.php?board=2;action=display;threadid=6642
EDIT: oh, the server seems to give a forbidden access error...
« Last Edit: 12 Dec 2003, 10:48 by Proskrito »

Re:The LucasArts GUI Help Thread
« Reply #51 on: 12 Dec 2003, 21:45 »
My logic tells me it should work like this (this is not an actual script=)

if mouse_over HOTSPOT X
 than
Change cursor graphic (y)
else
SetDefaultCursor,

Try this idea:

Load the room in question. Then, select room interactions button (looks like a dark red lowecase i). Double click 'Repeatedly execute' from the new list. Select 'Run Script' from the drop down options. Then, click on 'Edit Script':

Type the following:
// if mouse over hotspot 2 (your exit), then set cursor graphic to 4 (your arrow).
if (GetHotspotAt(mouse.x,mouse.y)==2) SetMouseCursor(4);
else SetDefaultCursor();

I don't know if you knew about the room repeatedly execute 'loops'. I hope this works.

Petar

  • Guest
Re:The LucasArts GUI Help Thread
« Reply #52 on: 13 Dec 2003, 17:45 »
Finer, thanks alot . I didn't really think about the room repeatedly execute loop, I thought the script could hold on the Hotspot interactions *since there is an actual mouse over property*. I will try that tommorow since I don't have the project here on this computer.

Again, thanks alot I'll check it out tommorow and report back.

Petar

  • Guest
Re:The LucasArts GUI Help Thread
« Reply #53 on: 14 Dec 2003, 22:32 »
Finer, it worked like a charm. Thanks alot.

All I have to figure out now is how to interact that hotspot with a double click to call NewRoom function.

Thanks once again.

iamamightypirate

  • Guest
Re:The LucasArts GUI Help Thread
« Reply #54 on: 03 Jan 2004, 04:27 »
 hi

i downloaded the FOA template from the web and am playing about with it.

i am having a strange problem where i am using some of the hotspots (like the fountain for instance -- if you have the same template you will know what i mean)

and I setup the look and use functions to display different messages

I tested the game but i cannot seem to use "look at" or "use" unless i click on my character when they are standing in front of the object -- if i click somewhere else thats in the hotspot but not on my character it does not work

any clues? thanks in advance

-Steve
   Report to moderator  

Kinoko

  • Cartoonist/Illustrator/Great Lover
    • Kinoko worked on a game that was nominated for an AGS Award!
Re:The LucasArts GUI Help Thread
« Reply #55 on: 03 Feb 2004, 02:07 »
I think I'm having that same problem but it's with the MI2 template. I'm actually well into my game at this stage but I haven't changed anything in the global script, and have only changed individual rooms that came with the template.

Whenever I left click on "look" and then click on a hotspot/object/whatever, the character will walk over to the object/whatever, but won't display the text assigned for that hotspot. It works with no problems at all if I right click, when "look" is already highlighted for that object.

The left click has worked -occasionally- and it seems to be when I've already tried it once (or many times!) before and the character is already as close to the thing as possible, or is standing in front of it and I click on the object through the character.

EDIT: After playing with it some more, I've realised that when using the plain left mouse click (clicking on "look" and then on the object) the game will go to the walk-to point assigned to that hotspot/object, but won't display the "look" text.

If I use the right click (with "look" highlighted) it is reacting as if "walk to" was clicked. This means that most of the time, the character walks behind the object in question in response to the position on the object I clicked. It will THEN respond with the proper "look" displayed text. I have walk-to points assigned to all these objects/hotspots and yet they are being ignored.

If I use the left mouse click, I can get the game to recognise the walk to point but no text.
If I use the right mouse click, it ignores the walk-to point but will display the text.
« Last Edit: 03 Feb 2004, 02:22 by Kinoko »

Re:The LucasArts GUI Help Thread
« Reply #56 on: 03 Feb 2004, 09:20 »
ah yes, there is a bug in those templates that causes what you say, a-v-o told me what was wrong and fixed it.
I´ll update the templates tomorrow to fox this and other things, but if you cant wait, just replace the MovePlayerEx function in the global script with this one:
Code: Adventure Game Studio
  1. /**/function MovePlayerEx(int x, int y, int direct){
  2. /**/  //Move the player character to x,y coords, waiting until he/she gets there, but allowing to cancel the action
  3. /**/  //by pressing a mouse button.
  4.       int cursorspritenumber=33,
  5.           blankcursorspritenumber=34;
  6.       ChangeCursorGraphic(7,cursorspritenumber);
  7. /**/  GScancelable=0;
  8. /**/  if (direct==0) MoveCharacter(GetPlayerCharacter(),x,y);
  9. /**/  else MoveCharacterDirect(GetPlayerCharacter(),x,y);
  10. /**/  // wait for release of mouse button
  11. /**/  while (character[GetPlayerCharacter()].walking && ((IsButtonDown(LEFT)==1) || (IsButtonDown(RIGHT)==1))) {
  12. /**/    Wait(1);
  13. /**/    RefreshMouse();
  14. /**/    CheckDefaultAction();
  15. /**/  }
  16. /**/  // abort moving on new mouse down
  17. /**/  while (character[GetPlayerCharacter()].walking){
  18. /**/    if (IsButtonDown(LEFT)==1 && (GetGUIAt(mouse.x,mouse.y)<0 || GetInvAt(mouse.x,mouse.y)>=0)) {
  19. /**/      StopMoving(GetPlayerCharacter());
  20. /**/      GScancelable=1;
  21. /**/    }
  22. /**/    else if (IsButtonDown(RIGHT)==1 && (GetGUIAt(mouse.x,mouse.y)<0 || GetInvAt(mouse.x,mouse.y)>=0)) {
  23. /**/      StopMoving(GetPlayerCharacter());
  24. /**/      GScancelable=2;
  25. /**/    }
  26. /**/    else {
  27. /**/      Wait(1);
  28. /**/      RefreshMouse();
  29. /**/      CheckDefaultAction();
  30. /**/    }
  31. /**/  }
  32. /**/  ChangeCursorGraphic(7,blankcursorspritenumber);
  33. /**/  if (GScancelable==0) return 1;
  34. /**/  else return 0;
  35. /**/}
  36.  

Kinoko

  • Cartoonist/Illustrator/Great Lover
    • Kinoko worked on a game that was nominated for an AGS Award!
Re:The LucasArts GUI Help Thread
« Reply #57 on: 04 Feb 2004, 00:24 »
I'm afraid I tried replacing the code with what you gave me there, and it hasn't made any difference. The player character still won't do anything but walk when I use the left mouse click on the 'look' GUI and then on the object.


the_dragon

  • Guest
Re:The LucasArts GUI Help Thread
« Reply #59 on: 12 Feb 2004, 00:39 »
Hi
Proskrito. I've translated your FOA template in spanish, because I couldn't get it from the direction I got in ADAN's page. I would like to save this template, not "Export GUI",  but I dont know how to do this.
Thanks :D

**(Te lo pongo en ingles pq no encontre tu mail, y por respeto al foro)