Click() troubles. in Developer Help
|
|
Heya, Im sure all if you here remember me and my stupid questions >:P
K, right now Im experementing with the click() proc, and Ive run into something I cant solve.
Im trying to make it so I can equip/unequip a wep simply by clicking on it in my inventory , unfortunatly, I cant set it so it only works if you click in the inventory window.
I have it set up right now so the click proc is tied to the obj , Im assuming its something you put into the parentheses that does it...
The way its happening now, is even if your clicking on one thats -not- in your inven, but on the ground, even on the other side if your view, it still equips it..
Please help ^^;
Elorien, hypern00b
|
Click() has an argument that will tell you the location or statpanel where you click the object. Read it's entry in the reference for more details.
obj/Click(Loc)
if(Loc == "Inventory") // assuming your intentory panel is named "Inventory"
// do your thing here
With an else statement, you could make click perform different actions depending on where the item is when you click it.