Okay, tried the following:
Code: ags
Output is:
a.Name Knife
inv_active activeinventory is 2
pl.activeinventory is 0
activeinv 0 2
combining object index Art Notebook (1/144) with Art Notebook (1/144)
modeusinv interaction with Art Notebook is 1
modelookat interaction with Art Notebook is 1
modeinteract interaction with Art Notebook is 0
modepickup interaction with Art Notebook is 0
modewalkto interaction with Art Notebook is 0
etc.
Nothing happens and no functions are run at any point. I'm in the dark, can anybody help? All I want to is simulate: item A being ActiveInventory, player clicks mouse on item B, iB_useinv() runs, it goes on to next combination.
gInventory.Visible=true;
Debug(0, 0);
//use i on j
for (int i=1;i<=Game.InventoryItemCount;i++) {
InventoryItem *a;
a = invCustomInv.ItemAtIndex[i];
Display("a.Name %s",a.Name);
player.ActiveInventory=a;
game.inv_activated=a.ID;
Display("inv_active activeinventory is %d",game.inv_activated);
Display("pl.activeinventory is %d",player.ActiveInventory);
Display("activeinv %d %d",player.ActiveInventory, game.inv_activated);
for (int j=1;j<=Game.InventoryItemCount;j++) {
Display("combining object index %s (%d/%d) with %s (%d/%d)",inventory[i].Name, i, Game.InventoryItemCount, inventory[j].Name, j, Game.InventoryItemCount);
Display("modeusinv interaction with %s is %d",inventory[j].Name, inventory[j].IsInteractionAvailable(eModeUseinv));
inventory[j].RunInteraction(eModeUseinv);
Display("modelookat interaction with %s is %d",inventory[j].Name, inventory[j].IsInteractionAvailable(eModeLookat));
inventory[j].RunInteraction(eModeLookat);
Display("modeinteract interaction with %s is %d",inventory[j].Name, inventory[j].IsInteractionAvailable(eModeInteract));
inventory[j].RunInteraction(eModeInteract);
Display("modepickup interaction with %s is %d",inventory[j].Name, inventory[j].IsInteractionAvailable(eModePickup));
inventory[j].RunInteraction(eModePickup);
Display("modetalkto interaction with %s is %d",inventory[j].Name, inventory[j].IsInteractionAvailable(eModeTalkto));
inventory[j].RunInteraction(eModeTalkto);
Display("modewalkto interaction with %s is %d",inventory[j].Name, inventory[j].IsInteractionAvailable(eModeWalkto));
inventory[j].RunInteraction(eModeWalkto);
}
}
Output is:
a.Name Knife
inv_active activeinventory is 2
pl.activeinventory is 0
activeinv 0 2
combining object index Art Notebook (1/144) with Art Notebook (1/144)
modeusinv interaction with Art Notebook is 1
modelookat interaction with Art Notebook is 1
modeinteract interaction with Art Notebook is 0
modepickup interaction with Art Notebook is 0
modewalkto interaction with Art Notebook is 0
etc.
Nothing happens and no functions are run at any point. I'm in the dark, can anybody help? All I want to is simulate: item A being ActiveInventory, player clicks mouse on item B, iB_useinv() runs, it goes on to next combination.