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
89
S
24
G
16
Posts: 716
Reputation: 16,997

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
158
S
67
G
43
Posts: 2,603
Reputation: 36,003

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
89
S
24
G
16
Posts: 716
Reputation: 16,997

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
158
S
67
G
43
Posts: 2,603
Reputation: 36,003

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
296
S
119
G
96
Posts: 7,328
Reputation: 71,298

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
13
S
4
Posts: 67
Reputation: 1,270

Previous

Return to How do I....?

Who is online

Users browsing this forum: babymumu and 6 guests