Mouse over problem.

Get help using Construct 2

Post » Mon Jul 02, 2012 1:18 am

https://dl.dropbox.com/u/1910765/cursorover.capx

If you look at the capx events, when you position the mouse over a block the opacity turns 50, and when the mouse isn't over, it's 100 opacity.

But when you test it, due to the blocks being next to each other, the opacity never goes back to a 100 if you mouse the mouse to the next block. Try moving the mouse up and down on the blocks to see what I mean.

I'm just wondering if this is a bug or if there is any workaround. Thanks.Xavier2012-07-02 01:18:21
B
63
S
23
G
17
Posts: 254
Reputation: 14,342

Post » Mon Jul 02, 2012 3:14 am

You can put the events as sub-events of a "For each blocks" loop. That should do the trick.
B
27
S
8
G
8
Posts: 903
Reputation: 8,452

Post » Mon Jul 02, 2012 6:11 am

by the way you can combine all the object into one object so it will be easier to fix ^^
B
48
S
15
G
6
Posts: 795
Reputation: 12,035

Post » Mon Jul 02, 2012 12:45 pm

Reorder your events like this:

+ Always
-> Set opacity to 100

+ Mouse is over
-> Set opacity to 50

This way all instances are reset every tick, apart from the ones under the mouse. When you use 'Else', the event doesn't run until the previous event is false, so it won't run until the mouse isn't over any objects at all.
Scirra Founder
B
359
S
214
G
72
Posts: 22,951
Reputation: 178,578

Post » Tue Jul 03, 2012 2:18 am

Ok thanks for the replies it does work correctly now.
B
63
S
23
G
17
Posts: 254
Reputation: 14,342


Return to How do I....?

Who is online

Users browsing this forum: 99Instances2Go, anty21ro, Magistross, mallorcaredes, PavleNikolic, Yahoo [Bot] and 26 guests