Return mouse mode after active inventory = null to Hand interact

Started by Slasher, Mon 30/12/2013 08:53:33

Previous topic - Next topic

Slasher

Hi,

I am using a lot of return old mouse mode from arrow pointer for my gui's, except Inventory.

The one area that I think could do with a brush up is returning old mouse mode once an inventory is used and becomes null. At the moment the mode always returns to WalkTo. I would much prefer mode to return to Hand interact after it becomes null.

Could you assist please?

Thank you




Khris

The way to do that is always the same: keep track of the thing that changes.

Code: ags
// above rep_exe
InventoryItem *old_ai;

// inside
  // player lost active inv item during last frame
  if (player.ActiveInventory == null && old_ai != null) mouse.Mode = eModeInteract;
  old_ai = player.ActiveInventory;

Slasher


SMF spam blocked by CleanTalk