I have the inventory at the bottom of the game screen. Can i add a dissolve (to/from black) video effect to my inventory?
What do you mean, exactly? You want the GUI to fade in/out, or the items (e.g. on mouseover), or what?
You could fade the GUI by having a second, black GUI under it, and chaning the Inventory GUI's transparancy (GUI.Transparency property).
The individual items ... Maybe strazer's InvItemAnimation (http://www.adventuregamestudio.co.uk/yabb/index.php?topic=22888.0) module would help?
Or was it something else again?
exactly. when i move the mouse cursor at the bottom of the game screen (an inventory like Black Mirror game.. see the ryoga post for the gamescreen link) i want the gui fade in from the black (black is the background color of my inventory). When i move out the mouse cursor from the inventory i want the GUI fade out.
Try something like:
// in repeatedly_execute
if (mouse.y > 210) {
while (trans > 0) {
trans -= 5;
Wait(1);
gIconbar.Transparency = (trans);
}
}
else {
while (trans < 100) {
trans += 5;
Wait(1);
gIconbar.Transparency = (trans);
}
}
Change the mouse.y according to what you need, and the += 5 to vary the speed of the fade. Just make sure, whatever amount you use, trans never goes higher than 100 or lower than 0. (Add a simple check - if (trans > 100) trans = 100;, for example - before setting the Transparency, to be sure.)
As I said you'll need a solid GUI, the same size and position as the Inventory GUI to provide the black. (Just make sure it has a lower z-order, or it'll appear over the Inv GUI.)
If you don't want a black bar always at the bottom of the screen, you can add a bit to the code to turn it off/on as needed.
It didn't work... I use the 2.7 version.
So do I, so that shouldn't be a probelm ... let's see ...
What colour depth are you using? Transparency won't work in 256 colour games, so if you're using that you'll have to increase to 16- or 32-bit.
If not ... how is it not working? (What exactly is/isn't it doing?)
don't work... like if the code that you have suggested to me does not exist.
I use the best colour deep possible.
can i send you my global script?
tnx
Sure. PM me it, or my e-mail address in in my profile.
Chances are it's something simple - sometimes it just takes a new pair of eyes to see it.
This is the link to the entire directory of the game.
http://www.mulaturda.altervista.org/_altervista_ht/Interf_ok.zip
tnx a lot
That link doesn't work for me. It comes up as 'unknown format or damaged'.
copy in the navigation bar ;)
OK, couple of things:
Move the line int trans = 100; to the top of the Global script, outside of all functions.
Replace gIconbar with gInventory (i.e. gInventory.Transparency = trans;). I used the Iconbar GUI as it was the right size, and forgot to mention it. In your case, changing the transparency of gIconbar won't make any difference.
Thirdly, and most importantly - you've put the code in show_inventory_window, not in rep_ex as it says to. Move it to rep_ex, and it should work as intended. If you also want the Inventory to appear when you press tab but the mouse isn't at the bottom of the screen, that's going to take a little more work, but is still do-able.
Nice looking art in rooms 2 & 3, by the way.
Ok, now work right!
tnx a lot..
we must create a great game :)