Mouse-over & Compare Variable Condition Issue

Get help using Construct 2

Post » Wed May 06, 2015 4:16 pm

I am having an issue with mouse-over + System:compare local static variable combined in an OR statement:
Image
When I use only the mouse over conditions, it works. Likewise, when I use only the compare, it works fine. However, when combined only the mouse overs work.

Ideas on why this is behaving spastically?
https://www.ravenheart.ca/home
I don't check the forums much anymore, but I will receive an email for PMs.

"Someone once told me I bite off more than I can chew...

I told them I would rather choke on greatness than nibble on mediocrity."
B
23
S
6
G
1
Posts: 1,419
Reputation: 4,857

Post » Wed May 06, 2015 4:22 pm

Please try and explain what you are trying to achieve..

While I'm not sure why you use so many different hover-sprites that look exactly the same, I guess you want the event to be true only when logomouseoverflag=1 AND the mouse is over one of the hoverbuttons?
Right now the event is true when logomouseoverflag=1 OR the mouse is over one of the hoverbuttons..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Wed May 06, 2015 4:42 pm

It changes the cursor to a hand and back based on whether the mouse is over a button or not.

The flag exists because I needed a composite AND condition in the OR, and you cannot do that in Construct (that I know of). So, I have the flag set to change based on that AND condition set.

What I have there is exactly how I want it to work... except that it doesn't work. If the mouse is over any button OR the logoFlag is 1, it should change to hand, and back when none of those are true.

I am looking at flagging the entire system, so that the mouse-over OR block changes the flag, and the AND block changes the flag, then the flag control the hand/no hand.
Last edited by gumshoe2029 on Wed May 06, 2015 4:46 pm, edited 1 time in total.
https://www.ravenheart.ca/home
I don't check the forums much anymore, but I will receive an email for PMs.

"Someone once told me I bite off more than I can chew...

I told them I would rather choke on greatness than nibble on mediocrity."
B
23
S
6
G
1
Posts: 1,419
Reputation: 4,857

Post » Wed May 06, 2015 4:46 pm

Using either the same sprite for all hoverbuttons or putting them in a family would be easier, but for this to work as intended you could put the mouse-over conditions in an or-block as a subevent of the system compare condition..

still not sure why the flag is needed though

mouse is over bladibla
trigger once
> set cursor to whatever
else
trigger once
> set cursor back to normal
Last edited by LittleStain on Wed May 06, 2015 4:49 pm, edited 1 time in total.
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Wed May 06, 2015 4:47 pm

I forgot about families.

Can you do "Mouse-overs" for families?
https://www.ravenheart.ca/home
I don't check the forums much anymore, but I will receive an email for PMs.

"Someone once told me I bite off more than I can chew...

I told them I would rather choke on greatness than nibble on mediocrity."
B
23
S
6
G
1
Posts: 1,419
Reputation: 4,857

Post » Wed May 06, 2015 4:50 pm

gumshoe2029 wrote:Can you do "Mouse-overs" for families?


Yes
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Wed May 06, 2015 4:53 pm

Excellent, thanks.
https://www.ravenheart.ca/home
I don't check the forums much anymore, but I will receive an email for PMs.

"Someone once told me I bite off more than I can chew...

I told them I would rather choke on greatness than nibble on mediocrity."
B
23
S
6
G
1
Posts: 1,419
Reputation: 4,857

Post » Wed May 06, 2015 4:55 pm

I'm still not sure what you are trying to do..

When is the mouse cursor supposed to be the hand?
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Wed May 06, 2015 5:56 pm

Your family solution works perfectly. It allows me to roll all of those OR conditions into a single condition, which allows me to combine them with my AND conditions.

The mouse cursor now turns to a hand whenever the cursor is over any of my website's buttons and back to an arrow when it is not.
https://www.ravenheart.ca/home
I don't check the forums much anymore, but I will receive an email for PMs.

"Someone once told me I bite off more than I can chew...

I told them I would rather choke on greatness than nibble on mediocrity."
B
23
S
6
G
1
Posts: 1,419
Reputation: 4,857


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 9 guests