None of the items events is fired by some clicks

Started by Monsieur OUXX, Sun 29/12/2019 21:22:35

Previous topic - Next topic

Monsieur OUXX

Has anyone an explanation for this :

- I created a game in 3.4.1 using the Tumbleweed template (with heavily modified source code!) -- I'm just mentioning it in case someone suspects something.
- I created an inventoty item : iItem
- In the Editor I bound a function to each of the events, simply by clicking on each event and letting the editor create it
- I put a dummy instruction (int i=0;) and a breakpoint in each of those functions.
- I run the game and I try each of the 9 verbs of the template : Look at, open, close, push, pull, talk, use, give, pick up. there's also an implicit 10th action when you use another inventory item onto that item.

What I observe :
- Pick up => triggers "Other click" event function as expected
- Give : switches to "Give to" mode but doesn't trigger anything. That I can live with
- Look at => triggers  "Talk to" event function as expected
- Talk to => triggers  "Talk to" event function as expected
- Use => triggers  "Interact" event function as expected

But I also observe these:
- Open/Close => Triggers no event function
- Pull/Push => Triggers no event function


I saw that they do get triggered in the native Tumbleweed module.

But before I can understand how my modifications (most likely culprit) messed this up, I need to understand how it's possible to "block" an item event function? How can some events trigger nothing when there's explicitly an "other events" function for the item?
 

Khris

Exactly like in your previous question, if custom inventory click handling is enabled, clicking an inventory item does not automatically trigger the "other click on inventory item" event.
There has to be handling of  eMouseLeftinv  that eventually calls the item's  RunInteraction  method, or clicking the item does absolutely nothing.

SMF spam blocked by CleanTalk