Quick question here:
I'm trying to make this:
Code: ags
..into this:
Code: ags
First code is working but instead of making function for every item I'm trying to make one long function of which items can be moved into memory inventory. cMem is the character whose inventory is the memory inventory and cInv is the character who has the basic inventory. 5th line of second code is the one I'm having problems with.
I'm trying to make this:
function iMemCrct1_OtherClick()
{
if (mouse.Mode == eModeMemorycur)
{
Display("Memory circuit is plugged");
cInv.LoseInventory(iMemCrct1);
cMem.AddInventory(iMemCrct1);
mouse.Mode = eModeInteract;
mouse.UseModeGraphic(eModeInteract);
}
}
..into this:
function InventoryItem_OtherClick()
{
if (mouse.Mode == eModeMemorycur)
{
if (InventoryItem == iMemCrct1)
{
Display("Memory circuit is plugged");
cInv.LoseInventory(iMemCrct1);
cMem.AddInventory(iMemCrct1);
mouse.Mode = eModeInteract;
mouse.UseModeGraphic(eModeInteract);
}
}
}
First code is working but instead of making function for every item I'm trying to make one long function of which items can be moved into memory inventory. cMem is the character whose inventory is the memory inventory and cInv is the character who has the basic inventory. 5th line of second code is the one I'm having problems with.