Sprite Opacity change on mouse hover

Get help using Construct 2

Post » Mon Aug 20, 2012 1:52 am

@shinkan, won't that cause a fluttering effect as it also sets the highlighted sprite back to 50 as its also highlighting the button? Thank you all for the help btw. :)

lanceal2012-08-20 01:53:21
www.h1k3.tech

We are here for you!
B
76
S
22
G
15
Posts: 709
Reputation: 15,960

Post » Mon Aug 20, 2012 1:54 am

see my file four posts above, working as it should

Edit: well now on the previous page ;)shinkan2012-08-20 01:55:23
ImageImageImageImage
B
155
S
61
G
41
Posts: 2,578
Reputation: 34,326

Post » Mon Aug 20, 2012 1:57 am

@shinkan

tried that and worked like a charm. :) Although I'm still confused why its not fluttering, thanks for the help. :)
www.h1k3.tech

We are here for you!
B
76
S
22
G
15
Posts: 709
Reputation: 15,960

Post » Mon Aug 20, 2012 2:00 am

It's how the event's work

Everything is here: ecents in the manual

It's a lot of text and people are too lazy to read but everything is explained there. ;)
ImageImageImageImage
B
155
S
61
G
41
Posts: 2,578
Reputation: 34,326

Post » Mon Aug 20, 2012 2:48 am

[QUOTE=lanceal] @shinkan, won't that cause a fluttering effect as it also sets the highlighted sprite back to 50 as its also highlighting the button? Thank you all for the help btw. :)
[/QUOTE]

To obtain a flickering effect, you would have to have some switch between the opacity over several ticks.
But the actual code is processed each tick. Each tick, the sprite's opacity is either 50 or 100, it's not switching from 50 to 100 "in the same tick". And even if it was, it's too quick for the brain to even notice.

As Shinkan said, this is how events work. The screen is rendered only once all events have been tested/executed, and so a single image per tick is rendered out of it.

Considering that C2 does the job of not re-rendering something that hasn't been moved/accessed to, it has even less reasons to flicker.
New to Construct ? Where to start

Image Image

Image Image

Please attach a capx to any help request or bug report !
Moderator
B
269
S
97
G
67
Posts: 7,219
Reputation: 73,864

Post » Sun Aug 18, 2013 3:59 pm

THank you for this post. Went to look for the invert. WOW. Thanks, what a difference that will make.
B
12
S
4
Posts: 67
Reputation: 1,240

Previous

Return to How do I....?

Who is online

Users browsing this forum: AllanR, rayray, RetroSpock, Turaco and 12 guests