I need to get the inventory action programmed into KeyGuard, so I'm using this:
- Code: Select all
If KeyID = 7 and inven=1 Then HIDEINVEN
If KeyID = 7 and inven=0 Then SHOWINVEN
Here are the HIDEINVEN and SHOWINVEN procedures.
- Code: Select all
sub HIDEINVEN()
inven = 1
InventoryCanvasObject.visible=false
InventoryBackgroundObject.visible=false
For Each x in InventoryItemObject
x.visible=false
Next
End Sub
sub SHOWINVEN()
inven = 0
InventoryBackgroundObject.visible=true
For Each x in InventoryItemObject
x.visible=true
Next
End Sub
HIDEINVEN responds to the "I" key, but when I press "I" again, SHOWINVEN does not execute. I have confirmed that the variable "inven" does change from "0" to "1" when the HIDEINVEN procedure is executed.
Why is SHOWINVEN not responding to the "I" key?