Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Fuchs on Thu 16/02/2012 20:48:57

Title: loos inventory ITem after usage
Post by: Fuchs on Thu 16/02/2012 20:48:57
Hello guys.
I know this is a weird beginners question but no matter how hard I look for the answer I just wont find it myself.

How do I make inventory Items disappear once I used them in the game???
When my character uses an item I want him to loose it, in the most cases. But what do I do? A simple IKey.Visible = false just won´t work!
I am biting my butt, since I just can´t find an answer for such a simple question!
Thank you in advance guys!
???
Title: Re: loos inventory ITem after usage
Post by: Mouth for war on Thu 16/02/2012 20:57:33
cEgo.LoseInventory(iKey); (Or whatever your scriptname for your player is) That's the easiest thing to look up in the manual you know
Title: Re: loos inventory ITem after usage
Post by: Fuchs on Thu 16/02/2012 21:29:47
Quote from: Mouth for war on Thu 16/02/2012 20:57:33
cEgo.LoseInventory(iKey); (Or whatever your scriptname for your player is) That's the easiest thing to look up in the manual you know

Thank you very much for your fast reply!
Title: Re: loos inventory ITem after usage
Post by: Ryan Timothy B on Fri 17/02/2012 04:54:56
Quote from: Mouth for war on Thu 16/02/2012 20:57:33
That's the easiest thing to look up in the manual you know
I wouldn't say it's the easiest. I always typed in RemoveInventory or RemoveItem when I first joined AGS. Lose isn't exactly the term I would use to describe that function since Lose isn't the opposite of Add. Remove is.

But he did use word Lose in his question, so it shouldn't have been a problem for him to find it. ;)
Title: Re: loos inventory ITem after usage
Post by: Mouth for war on Fri 17/02/2012 12:51:14
Haha no I meant that inventory handling is pretty easy to find but I agree that some things can be hard to find if you're not sure what word to look for :D