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
B
68
S
21
G
15
Posts: 701
Reputation: 15,604

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
140
S
58
G
36
Posts: 2,547
Reputation: 31,170

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. :)
B
68
S
21
G
15
Posts: 701
Reputation: 15,604

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
140
S
58
G
36
Posts: 2,547
Reputation: 31,170

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
247
S
85
G
40
Posts: 6,999
Reputation: 57,793

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,235

Previous

Return to How do I....?

Who is online

Users browsing this forum: flemmig, Jarnopa, semaso, Skebab and 11 guests