On mouse out event when hiding an object

Anything related to Hollywood Designer goes in here
Post Reply
amyren
Posts: 352
Joined: Thu May 02, 2019 11:53 am

On mouse out event when hiding an object

Post by amyren »

Not a question, just an observation.
In case you have a On mouse over event that show a text object, then you may use the On mouse out event to hide the same text object.
Then if you use the On mouse click event to hide the object, then the On mouse out event will not be detected.
To remove the text object, another hide object event could be added to the On mouse click event list.
User avatar
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: On mouse out event when hiding an object

Post by airsoftsoftwair »

Don't understand what is the problem here, please elaborate ;)
amyren
Posts: 352
Joined: Thu May 02, 2019 11:53 am

Re: On mouse out event when hiding an object

Post by amyren »

Not really a problem once you know how it works.

Lets say you are making a point and click game. You have Key on screen and use the On mouse above to show a popup text "Key", and then use the On mouse out to hide that popup text.
Then you want to be able to pick up the Key by clicking on it, so you hide the key. Now the popup text will stay on screen when moving the mouse out, since the On mouse out will not be triggered for the hidden object.
User avatar
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: On mouse out event when hiding an object

Post by airsoftsoftwair »

Ok, now I understand. Might make more sense to trigger "OnMouseOut" in that case too but of course implementing such a thing would also require a new compatibility mode because old projects expect the old behaviour so I'm not sure if it's worth the effort.
Bugala
Posts: 1178
Joined: Sun Feb 14, 2010 7:11 pm

Re: On mouse out event when hiding an object

Post by Bugala »

If it is easy to implement, then I guess it could be useful to be able to manually trigger some events.

However, OnMouseOut can also be doing things that you don't want to get triggered anymore after item is removed.

Lets say you have a bomb that will explode after third OnMouseOut. Now you obviously don't want this to happen at point when you removed it already.
plouf
Posts: 467
Joined: Sun Feb 04, 2018 11:51 pm
Location: Athens,Greece

Re: On mouse out event when hiding an object

Post by plouf »

Isnt such a behaviour provision by game author ?
I.e. picking= hiding object . Also close menu

This sound very specific and probably breaking other "correct working" code
Christos
Bugala
Posts: 1178
Joined: Sun Feb 14, 2010 7:11 pm

Re: On mouse out event when hiding an object

Post by Bugala »

@plouf
Do notice this is talking about the Designer, not Hollywood.

I can see how it could be handy for someone using Designer to be manually able to trigger one of the other events, like OnMouseOut event of object.
Post Reply