inventory: disable clickable

Started by barefoot, Sat 06/11/2010 14:33:15

Previous topic - Next topic

barefoot

Hi

is it possible to disable an inv item from any clicks when its no longer needed but still has to show?

a situation has occured whereby i need to disable an inventory item from appearing. Usually the inv item (lamp off) clicked on with another inv item (matches) produces the (lamp on) LAMP effect. I would like to disable the lamp from any further clicks ie clickable.false etc etc..

Else i need to make another inv item to replace original..

Suggestions welcome

barefoot

I May Not Be Perfect but I Have A Big Heart ..

Sslaxx

#1
I dunno, would something like:

Code: ags
if (condition(s) here)
{
 return;
}


at the top of your code work? That way, any clicks on the object just get ignored. And, to be honest, I'd rather give some feedback to the player that the item'll do nothing.
Stuart "Sslaxx" Moore.

Khris

Quote from: barefoot on Sat 06/11/2010 14:33:15
Else i need to make another inv item to replace original..
Yeah, how does that make the item not clickable?

I suspect you want to avoid that the player reads "you light the lamp using the matches" again if they use the matches on the lit lamp, right?
If that's the case, how did you make your game all this time without using a single variable?

There's also Game.DoOnceOnly().

Ryan Timothy B

Quote from: Khris on Sat 06/11/2010 17:48:05
If that's the case, how did you make your game all this time without using a single variable?
Lol that reminds me of the AGS game T-REX and MUSCLE SAM big trouble in S.P.F. The guy used blank inventory items as global variables.

Oh how little things make me laugh. :D

SMF spam blocked by CleanTalk