Wintermute Engine Forum

Wintermute Engine => Technical forum => Topic started by: Art on April 05, 2006, 01:20:12 PM

Title: Hide entity from cursor hovering
Post by: Art on April 05, 2006, 01:20:12 PM
Hi all

I've an non-typical problem:

I've some items on my scene, which should not look like interactive, but should interact like interactive.
I'll explain in more detail. For example, there is an entity on my scene. I want to make it look just like any other non-interactive piece of scene, so cursors should not become hover, when, they are about this entity. But if i click on this entity even with some item, script should catch it.

"Non interactive" feature - does not work, because in this case entity catchs only usual mouse clicks, and it's very important for me to catch item clicks also.

Any ideas, WME gurus? :)
Title: Re: Hide entity from cursor hovering
Post by: metamorphium on April 05, 2006, 02:27:29 PM
For example in Scene edit assign Cursor to standard one. :)
Title: Re: Hide entity from cursor hovering
Post by: Art on April 05, 2006, 02:55:08 PM
It's not enough, cause, if i'll "take" some item from inventory - it will change to "hover" style when moving about my entity. And i want no one could even guess that entity is interactive, but it should be realy :)
It's not so easy to achieve this, if it's possible at all...   :-\
Title: Re: Hide entity from cursor hovering
Post by: Art on April 05, 2006, 02:57:21 PM
And the problem is that if i make entity to "ignore items" - i get visual effect i want to (items do not blink above entity), but i lose control over entity - i lose item clicks on it, which i need to :)
Title: Re: Hide entity from cursor hovering
Post by: metamorphium on April 05, 2006, 03:15:31 PM
So you have special hover sprite for the item?
Title: Re: Hide entity from cursor hovering
Post by: Art on April 05, 2006, 03:28:40 PM
No.
all items are usual. So they have usual sprite and hover sprite.
They change to hover when they are above usual entities and they change to usual when they are above non-interactive pieces of scene

BUT

i've also non-usual entities on the screen (imagine game when you have to find some little differences between two pictires, my problem is like implementing this type of game), which are interactive really (so i want to process clicks and inventory uses on them), but i don't want them to look like interactive. So cursor should not change (not usual cursor, not item cursors) when it's above this kind of "hiden from interaction" entity  :-[ :-[ :-[ :-[ :-[
Title: Re: Hide entity from cursor hovering
Post by: metamorphium on April 05, 2006, 03:36:17 PM
but still you want to capture even the item clicks over it? Well, you can use lowlevel events of entity:

on "MouseEntry" and on "MouseLeave" and simply check if item is selected and if so, just remove the hover image from it.
It would require a bit of scripting though.

Title: Re: Hide entity from cursor hovering
Post by: Art on April 05, 2006, 04:29:14 PM
Good, think this will help...