InventoryItem transparency?

Started by Lazarus, Wed 25/10/2006 10:06:21

Previous topic - Next topic

Lazarus

Hi
I've been adding to my fading module and was wondering
if it was possible to be able to fade in/out inventory items?

I've had a go, but I keep getting
"Transparency is not a public member of inventoryitem"

Here's my last attempt
Code: ags

struct FadeThing {Ã,  Ã, // Setting up a struct.
Ã,  int Transparency;Ã,  //
};

FadeThing Item;
InventoryItem *FadeII; 


function FadeInventoryItemOut (InventoryItem *II, int Value, int Speed) {

 FadeII = II;

 Item.Transparency = FadeII.Transparency;

Ã,  while (Item.Transparency < Value) {
Ã,  Ã, Item.Transparency ++;Ã,  Ã, 
Ã,  Ã, Wait (Speed);
Ã,  Ã, }
Ã,  if (Item.Transparency == 100) {Ã,  // Removes Item if Transparency = 100
Ã,  Ã,  Ã,  player.LoseInventory(FadeII);
Ã,  Ã, }
 }


Any ideas would be grateful.

*Currently using AGS Editor 2.70 (Build 2.70.601)*

Gilbert

Because there's no such thing with inventory graphics, ie. there's no handy way to change an item's transparency in an inventory GUI (you know, you can always read the manual to find out if such a thing really exists before trying :P). You can only change the transparency of the whole GUI at the moment, not any individual part of it.

You need to use other techniques like, say, displaying the inventory graphics as an object or even a character (actually using a character is more convenient than an object as you don't need to create a new object solely for this purpose in each room) that can have its transparency changed.

Lazarus

Thanks for the reply
I've just added fading gui's to the module and before releasing the update. I was wondering if it was possible.
Thanks again.
*Currently using AGS Editor 2.70 (Build 2.70.601)*

fovmester

Slightly off topic, but I have to say that I just LOVE your avatar! Made me laugh out loud! :D

SMF spam blocked by CleanTalk