Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - stryker

#1
Hi all.
Here's the new "Opensource Discworld-like Interface System" version. Now it's almost identical to the original Disworld system.

Here's some features that costed me hours of hard work! (new version's ones come first):

- The Mighty Resizable Inventory Screen System
- Objects names label optimized (now it appears upon objects)
- Inventory items disappear from inventory when "picked up" by the pointer, and reappear when dropped back (really nice feature that gives you the impression you are really picking the item from your pokets)
- Dragging inventory
- Events are now non-blocking: player can stop the interacion to perform another one even if  the character is already walking to the hotspot, just like in DW and Lucas adventures (it was hard to script, but it worth the work: it gives the player the impression he has much more control on the character

Read the txt file inside the .rar to learn how to add items interaction and objects labels.

Hope this helps.

(i'm going on vacantion for a week in Amsterdam, so I'll reply from next saturday on)


http://riccardofarina.altervista.org/altro/ODIS1.2.rar

(right-click and save as)
#2
Ooops, my fault. It was just a problem with the GUIs.
#3
That's it!!! Thankyou SSH! Now it works fine!

Now the problem is getting work the scrolling arrows. Here's the code I wrote for the resizing inventory (this code is within the "resizing function", that is called whenever the inventory GUI is resized; guix and guiy are the coordinates of the upper left corner of the inventory GUI):

Ã,  Ã,  game.items_per_line = ((mouse.x-guix)/32);
Ã,  Ã,  game.num_inv_displayed = ((mouse.y-guiy)/32)*game.items_per_line;



And here's the arrows code, that I didn't wrote but stealed somewhere from the forums:

Ã,  if (interface==INVENTORYA) {
Ã,  Ã,  if (button == 3) {
Ã,  Ã,  Ã,  if (game.top_inv_item > 0) game.top_inv_item = game.top_inv_item-game.items_per_line;
Ã,  Ã,  Ã,  }

Ã,  Ã,  if (button == 4) {
Ã,  Ã,  Ã,  if (game.top_inv_item < game.num_inv_items-game.num_inv_displayed)
Ã,  Ã,  Ã,  game.top_inv_item = game.top_inv_item+game.items_per_line;
Ã,  Ã,  Ã,  }

I should get the arrows code working for the resizing inventory (first of all, I should understand why the arrow code don't work for the resizing inventory).

Oh, and one last question: in the AGS help I read that the bold game. functions where "read only", but game.items_per_line and game.num_inv_displayed, even being bold, are NOT read only, because I can succesfully modify them in the script! Why?

Thankyou again!
#4
Anyone who can tell me if it's an AGS bug or a fault of mine? Or give me some trick to get accross it? CJ?
#5
The resize feature would be useless if the objects inside the inventory will grow bigger or smaller, instead of changing their disposition.
The thing I'm expecting from the resizing of the inventory is that all the objects inside it will dispose to fit the new size. So, if I reduce the width of the inventory, the objects should dispose on more rows. If I reduce the height they should dispose on more columns. Just like the icons in a window once you select "automatic position" in Windows.

Let me show it under a different point of view: if you resize the inventory window from the AGS client, the inv objects will re-position automatically at the game start, dpending on the size you give to the inventory. But if you resize the inventory with the command in question (SetGUIObjectSize), the objects in it will just stay as they are, and that's the problem!
If the command really doesn't work for inventory windows, it's pretty useless, because 90% of the resizable GUIs I can think of have inventory windows.
#6
No way. When you pop it up again it is still buggy.

AND the scrolling arrows for the inventory, perfectly working before resizing, they don't work anymore once the inventory has been resized using the SetGUIObjectSize handle.
#7
Hi!
I used to write on these forum long time ago, when I was developing Opensource Discworld Interaction System (ODIS, maybe someone remembers it). Now i'm back and i'm working on a new version, even more similar to the original Discworld system.
I'm very glad SetGUIObjectSize has been added to ags, because it is indispensable to crate a resizable inventory like the one in Discworld.
The problem is: it doesn't work for the inventory windows.
I mean, i wrote all the code to do a resizable inventory GUI (that includes may gui objects, like the inventory itself, the status bar etc), and it works fine. The other objects in the GUI resizes as well, so you can se, just like in the normal windows in Windows (heh), the GUI itself changing size as you drag the bottom-right corner, and the various object in it following the resize. TheÃ,  only object that wont resize is the inventory.
To be more specific: the inventory resizes, but the inv objects in it stays in the same position, they don't reposition to fit the new inventory size, so the resize is totally futile. Even if you resize the inventory to be very small, you can still see all the inv objects, just you can't click the ones out of the inventory.

So, is there a way to resize the inventory AND make the inv objects in it "recognize" the new size?

I'll past the code I used (even I'm pretty sure it is not a code error).


Ã,  if (resize == 1) {
Ã,  Ã,  SetGUISize(INVENTORYA,mouse.x-guix,mouse.y-guiy);
Ã,  Ã,  SetGUISize(INVENTORYB,mouse.x-guix,mouse.y-guiy);
Ã,  Ã,  SetGUIObjectPosition(INVENTORYA,2,mouse.x-guix+10,mouse.y-guiy+10);
Ã,  Ã,  SetGUIObjectSize(INVENTORYA,0,mouse.x-guix+2,17);
Ã,  Ã,  SetGUIObjectSize(INVENTORYA,1,mouse.x-guix+15,mouse.x-guix+15);
Ã,  Ã,  }


resize == 1 is when the handle in the bottom-right corner is pressed
guix and guiy are the coordinates for the top left corner of the GUI
obj 0 is the status bar
obj 1 is the inventory
obj 2 is the bottom-right handle


Thankyou and sorry for the crappy english


ps: RefreshInventory doesn't slove it.
#8
It works perfectly, thanks again! Now the labelx and y proprietes work as universal coordinates for hotspots, and as "local" coordinates for characters and objects

But I think I didn't understand your last question...
#9
Thanks Dragonrose, I will try it out! That's a smart solution (BTW the multi-inv support should make it very much simple!)

SSH, the system works very well, thankyou very much (the overlay method is much more valid, because the GUI label system was giving me problems of refresh).
But there is still a problem. If there is a moving character (like the player one, who is "clickable" so it has its own label), the textoverlay must move around with him. So the script on "locationtype=2" must be depending on the character actual location. And here's the problem: how can I get x and y of the character position? There is no GetCharacterLocation or something like this, so I can't script the overlay position to be made depending on these variables.
Any clues?
#10
Script all that stuff in repeatedly execute I think could slow down all the game. Imagine there are about 50 charatcters/objects, there will be in the repeatedly execute 50 of those strings:

if (GetLocationName(mouse.x,mouse.y)==objectname1) [
labelx = x;
labely = y;
]

if (GetLocationName(mouse.x,mouse.y)==objectname2) [
labelx = x;
labely = y;
]

etc... x 50 times

isn't it too much to handle it in the repeatedly execute?


I read about those proprietes thing, and if it can help me with the thing I'm realle interested, but I really can't get how the stuff works. Is there some thread or sepcific page in the help file where I can get info about it? (the help page explaining the command is not very clear...)
#11
I just find a solution for the "big problem" above. With "on mouse over" event I set two variables (let's say labelx and labely), I export them to global script and use them to set the label position for every hotspot.
It'a a bit annoying adding a script with "labelx = x and labely = y" for every hotspot/object/character in every room, but I think it's the only way.

The problem is: there is no "on mouse over" event for characters and objects, without it it's impossible to use this method. Can it be added for chacters and objects too?

thanks


edit: in the first post I forgot a thing that should be useful for many of us: display dialog options as sprites (to do dialog system like in DW and S&M).
#12
Moresco, if you're going to keep ODIS on your repository would be cool, so all those problem with my host will be override! just tell so I can change the link in the first post.

ps: i think the link in your sign is incorrect, I had to add a "/" to the end of the address in the browser to make it work
#13
I'm working on the next version of Opensource Discworld Interface System (version 1.1 aviable on announcements forum). There are some things that can't be done because of the lack of some AGS commands. Of course a lot of the following features could be useless for the others, so just check which ones can be useful for everybody and let me know if you're going to add them on the next ags version.

- SetGUIObjectSize (with the recent SetGUISize I added the resizabile inventory window like the one in DW, but without the ObjectSize command is useless, because inventory itself remains the same size)
- GetInvItemPic (there is a Set, but not a Get. This one is to make the active inventory pic transparent and get the original sprite to be used as cursor, like in DW. It gives the feel you really take the object from the inv and carry it on the cursor)

The following ones are not commands, so I don't think their implementation will worth the work, but i'm posting them anyway (who knows?):
- multiple inventory support (a single player can have many inventories with different obects for each one. This would be cool i.e. if a player has a trunk or something where he can keep all the things he doesn't want to carry around)
- foreground GUI click event (treat the border lines (and maybe 2 or 3 pixels around them to make the click of a single-pixel line not so annoying) like a GUI object, so it's triggered by the GetGUIObjectAt command)

that's all, I think.

The biggest problem (but I don't thik this will never be sloved) it's to make the object names label appearing upon every obect, and not mouse following or blocked in a specified location of the screen. But I can't think a way to emulate this on AGS engine (if anyone has suggestion, just post!)

thanks
#14
Advanced Technical Forum / Re:Font editor?
Thu 11/09/2003 21:01:19
that works perfectly! thankyou very much!
#15
Advanced Technical Forum / Font editor?
Wed 10/09/2003 20:53:27
I downloaded SCI studio but it's nearly impossible to use. It crashes very very often when I use the font editing feature.

Is there any other program to make my own sci fonts?
#16
Try by right-clicking and "save as". Otherwise give me your e-mail address and I will send it to you.
#17
Chicken, it seems your e-mail address doesn't work (or the 700kb file is too big), because the e-mail came back with an errore message. My uin is 13203225, contact me so I can send you the file via icq.

Thanks Crabe! steal what you want, it's opensource! (maybe you can credit me somewhere in the game!)
#18
The site is not about the ODIS, it's just the only webspace I own, so I used it to host the file. There is no site about the ODIS, all the info you can get is in the readme file in the zip.
BTW the site is about an italian RPG project (an ultima online shard).

is there any problem with the link? I can download it without problems. If it doesn't work for you just let me know
#19
I don't know if this belongs here, but i just finished a new version of my interaction system. This looks much closer to the discworld one. Some new stuff added in this version:

- Left/right/double click world interaction optimized (now identical to DW)
- Left/right/double click inventory interaction optimized (now identical to DW)
- Dragging inventory optimized (that was hard!)
- on_event ADD_INVENTORY script added: new items are automatically set active like in DW
- Dialog system added (to be optimized: it's Lucas-style)
- Mouse cursor disappears while talking/animating just like in DW
- Events are now non-blocking: player can stop the interacion to perform another one even if  the character is already walking to the hotspot, just like in DW and Lucas adventures
- Characters interactions are handled non-standard style: player charatcer doesn't
 automatically walk to characters before start interaction
- Random messages on look player character, just like in DW

Hope this is helpful, I think this (the discworld one) is one of the most user-friendly and easy-to-learn interfaces ever made.
I'm pretty proud of the "non blocking" action stuff because gives the feel of more control on the character. And I'm proud of the advanced dragging too, because of my lacks in mathematic/scripting skills; this is a great achievement for me (just look at the code to see why :).

http://helcaraxe.altervista.org/ODIS1.1.zip
right-click and save as

if the above doesn't work:
http://www.eleycis.zapto.org/repository/guis/ODIS1.1.zip
thanks moresco for hosting!
#20
Hints & Tips / Pleurghburg: dark ages
Thu 28/08/2003 22:45:33
I'm stuk! It's the 3rd night, and I'm in the park, in front of the house on the isle (now with the lights turned on). The FBI guy is in the hospital, the panther is gone, I made a spyglass with lenses and the card pipe, but now I'm really stuck because I can't find a way to fix the spyglass (on the rock I think). I checked in the general store and in evry room of the game but I really can't find anything!

thanx!
SMF spam blocked by CleanTalk