[solved] item.RunInteraction waits for the rest of on_mouse_click?

Started by Absentia, Sun 20/12/2009 14:10:15

Previous topic - Next topic

Absentia

Edit: Fixed this issue by myself.


---
This could be a stupid question, but I'm a little stuck here...

I'm making a stripped-down version of the SCUMM verb system, and everything is working except for the mouse clicking for eModeUseinv.  I have Handle Inv Clicks enabled, so ProcessClick isn't going to work.  

I'm trying to make it so that once the player decides to use an inventory item with another inventory item, it runs the Useinv interaction for that object, THEN sets ActiveInventory back to null.
So, instead of ProcessClick I'm using RunInteraction.   The problem I have is that instead of recursively running RunInteraction first and carrying on with on_mouse_click as normal, the rest of on_mouse_click gets finished off first and then RunInteraction.  This means that I end up resetting ActiveInventory back to null BEFORE I run the interaction.  So, is this just an inherent behaviour of item.RunInteraction, and are there any workarounds?

Thanks.




NsMn


Absentia

You could be right, but that's really not the most helpful of answers...
Maybe I should post this is in Technical Forum?

Ghost

The forum's right, and you can safely ignore willam.

A good workaround is to use a temporary "pointer" variable to keep the inventory, and reset it yourself. It's some additional work, but at least it works.

Ah, I just saw you solved it already. Sorry.

SMF spam blocked by CleanTalk