TEMPLATE: SCUMM VERBCOIN GUI v2.0.0 (for AGS 3.x)

Started by Electroshokker, Sun 21/10/2007 16:31:02

Previous topic - Next topic

Electroshokker

Quote from: KhrisMUC on Thu 08/11/2007 03:47:40
That's a really cool Template, solid work!

Thanks.

Quote from: KhrisMUC on Thu 08/11/2007 03:47:40You should be able to fix the resolution issue by removing the check for room 1.
It shouldn't matter if the code is called in every room.

Was planning on it.

Quote from: KhrisMUC on Thu 08/11/2007 03:47:40A small suggestion: you're using many, many GetAtScreenXYs, especially in rep_ex.
Instead, you can put
Code: ags
Object*o=Object.GetAtScreenXY(mouse.x, mouse.y);
Hotspot*h=Hotspot.Get...
Character*c=...
InventoryItem*i=...
at the start of the function and use o, h, c, i afterwards. Will save a lot of typing and even a short deal of CPU time.

Hmm... I'll look into it.

Quote from: KhrisMUC on Thu 08/11/2007 03:47:40I've noticed a bug: open the VerbCoin over anything, then move the mouse ENE, above the talk button. The coin will disappear although the cursor hasn't left it.

No, that's no bug. It's the custombutton1 which is sitting above the talk button. A little left-over from my personal game gui which has 4 buttons.

Just set all custombutton1 layout values to 1 to fix this, like I said above. Since there's no action defined for custombutton1, you leave the gui when moving over it.

Quote from: KhrisMUC on Thu 08/11/2007 03:47:40Another thing I've noticed:
You're using checks for Hotspot.GetAtScreenXY(mouse.x, mouse.y) != null.
Those checks will never fail because it doesn't return null but hotspot[0].
It's a mean trap, and I fell for it a couple of times myself :)

Hmm... not sure of this one. I added all the checks because otherwise the game would crash constantly with null pointer errors. I'll check it out.


I'll update the template when I get around to it (maybe this weekend), right now my game project is the main priority again.

Khris

About the last issue:
It's no big deal if it's just used as a check to avoid null pointer errors.
However if it's important for the game mechanics whether there's an actual hotspot there or not, you have to change the check.
The hotspots are drawn and thus stored as image, the number is simply the color. No hotspot drawn = color 0 = hotspot 0.
So Hotspot.GetAtScreenXY will return hotspot[0] instead of null. It's in the manual, too.

Electroshokker

Template updated to v1.2

All outstanding issues have been adressed. Enjoy!

Electroshokker

Since I was busy with it anyways... here's version 1.3 (download link in first post of this thread)

It adds double-click functionality to all hotspots/objects which have the 'act' property set to true.

Just thought you guys might find that useful... ;) The double-click speed is completely configurable, of course.

Code example given (try a single and a double click on the Advanced 3D Room hotspot)

khnum

I found a bug in your template: when the inventory is on screen, clicking on a point where there's no object, with a character, an object or an hotspot behind the inventory in that place, results in looking at it... i tried to make the inventory gui clickable (the background), but it didn't worked...

edit: another bug (at least i think it's a bug), the player character doesn't walk (yes, i made the walkable area)

Electroshokker

#25
Quote from: khnum on Sun 02/12/2007 11:08:52
I found a bug in your template: when the inventory is on screen, clicking on a point where there's no object, with a character, an object or an hotspot behind the inventory in that place, results in looking at it... i tried to make the inventory gui clickable (the background), but it didn't worked...

So if I understand correctly, you're clicking on an empty patch of the inventory and the "look at" action is executed if there's something behind it.

This occurs if you didn't have the general option "Handle inventory clicks in script" set to true.

Please check on the general settings tab under inventory if "Handle inventory clicks in script" is set to "True". If it isn't, please change it. (If it is already, let me know, and I'll double-check my code.)

EDIT: ah, after checking I agree it IS a bug. I must have made a mistake with the latest code updates, as this shouldn't occur. Expect a fix later this week.

Quote from: khnum on Sun 02/12/2007 11:08:52edit: another bug (at least i think it's a bug), the player character doesn't walk (yes, i made the walkable area)

Characters walking or not has nothing to do with my template code. It has everything to do with views and the latest engine updates. (Try adding a bunch of frames to the first 4 views.)

This is a game engine issue, and is mentioned (I believe) in the AGS 3.0 RC1 thread.


khnum

Quote from: Electroshokker on Mon 03/12/2007 20:49:44
Expect a fix later this week.

Thanks  ;D
Anyway, could you also specify what the error was, since i already heavily modified your script to fit into my game, so i'd prefer resolving it myself (actually i know which line of script causes the error, but i didn't understand what's its function, so i didn't remove it)

Electroshokker

Quote from: khnum on Tue 04/12/2007 18:31:40

Thanks  ;D
Anyway, could you also specify what the error was, since i already heavily modified your script to fit into my game, so i'd prefer resolving it myself (actually i know which line of script causes the error, but i didn't understand what's its function, so i didn't remove it)

Yes, the error was a few old lines of code that weren't supposed to be there. You've already found them (was easy enough), and they can be removed without any problems.

was removed:

Code: ags
else{
    ProcessClick(mouse.x, mouse.y, eModeLookat);
    clicked=0; 
    timer=0;
}


in the
Code: ags
if (Mouse.IsButtonDown(eMouseLeft) == 0){
section

khnum

Man, sorry if i'm always complaining, but i found another bug in the inventory  ???
If you click on an empty area, and then move the cursor over an object, the cursor mode switches to useinv (and the graphic changes, of course)

Pumaman

Good work with all the updates! :)

The latest version of this template has AudioManager plugin data embedded, which causes a warning message for people who don't have the plugin installed. I've removed it in the version that I'm including with AGS; it might be worth considering this for future versions of the template.

Electroshokker

Quote from: khnum on Mon 17/12/2007 15:32:10
Man, sorry if i'm always complaining, but i found another bug in the inventory  ???

I don't mind at all. Just happy someone is actually testing it thoroughly.  ;)

Quote from: khnum on Mon 17/12/2007 15:32:10If you click on an empty area, and then move the cursor over an object, the cursor mode switches to useinv (and the graphic changes, of course)

Ok, I'll look into it. (I better hurry up, AGS 3.0 final is almost here  :o)

Electroshokker

Version 1.5 is up.

Created without any plugins (just standard AGS 3.0 RC3), fixed the latest bug.

Dualnames

Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

sentient

Hello, sorry to be so green, but this looks just what I am after. Trouble is I have no idea how to use it! I have downloaded both files and copied them into the main adventure studio directory. I try import GUi, but it is not the right type of file for that. What do I do?

Pumaman

It's not a GUI, it's a new game template. That means that after putting the files into the AGS directory, you load the editor, choose "Start new game" and select it from the templates there.


Dualnames

In case you want a not so cool but as cool as CMI search for Scumm Remixed at the forums... you'll end up with my "module". Though I suggest this one..my scripts were based on Electroshockers work.. and he motivated to work on this..
Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

riseryn

#37
Hi
i'm trying to use your template but can't understand the way it works.

I have created a hotspot hRock and a function hRock_Look() in the room script file.
But i have no output when using the look button.

Code: ags

// room script file
function hRock_Look()
{
Display("Just a rock.");
}


which is the correct way to set an interaction?
I find (or maybe understand) nothing about it in the template or in the documentation.

I'm using ags 3.01 final

thanks

EDIT:
ok finally i managed to understand that I have to put the name of the function in the corresponding hotspot event :)

subspark

Congrats on the new release Electroshokker!!

Cheers,
Paul.

S

Apologies in advance if my ignorance is caused by being too lazy to read stuff I should've read, like readmes etc., but I have a problem with the Verb Coin, and I suspect it might be an issue of resolution (my game is 800 x 600). The GUI won't display its three buttons when I click certain hotspots and objects, mainly those that are close to the right and the bottom of the screen - basically making it impossible to interact with those objects and hotspots.

SMF spam blocked by CleanTalk