Want Only One Inventory Item To Work On Object

Started by Game Creator, Mon 19/12/2011 05:55:20

Previous topic - Next topic

Game Creator

Hi

I've Searched Through The Manual In The Section's I Thought Would Have It.
Now My Character Has Many Inventory Item's That Need To Be Used On Many Different Objects.
While Testing The Game I Realised That I Could Use Any Inventory Item On Them.
So What I'm Asking Is How Can I Make It So That Only One Specific Inventory Item Will Work On The Specific Object.
I Have been Through Many Pages On The Forum And Also Searched, I Couldn't Find Anything So I'm Asking If Anyone Could Help Please.

Thanks

Also I'm Aware That This Is My Second Topic in Two Day's. Sorry :)

Gudforby

You need to check which inventory item is the active one.

Code: ags

if (player.ActiveInventory==iItem)
{
  //do stuff
}
else
{
  //do some other stuff
}

Game Creator


Thank You I Will Give It a Try, Hopefully It Works.

Khris

Are there going to be lots of these questions?
Because as you might imagine, all of those have been asked and answered a few hundred times already.
Please exhaust the available resources first, most importantly Densming's video tutorials: http://www.youtube.com/densming#p/c/0/1Ml_DR76Cl4

(Which you should have found if you had bothered to read the READ FIRST *BEFORE* POSTING thread.
Also, you're again capitalizing every single fucking word. If this is a severe case of OCD or something, ok, but if it isn't, please stop; it's really annoying. And I don't buy the GTA excuse. Really?)

Calin Leafshade


Game Creator

#5
Hi

i'll post when i get around to fixing the problem, i'll let you know if there are problems. aslo.

well i'm sorry about not thinking of using the video tutorial, also i do not have ocd. every game i play my pinky in always over the shift key and it a habit not OCD. by the way i'm not angry i'm just saying.

SMF spam blocked by CleanTalk