[SOLVED] Copy the visibility of other sprite object.

Get help using Construct 2

Post » Fri Nov 13, 2015 6:58 am

Hello, please, as I point to an object sprite visibility should be another sprite visibility?.

I mean:
sprite1.visibility = sprite2.visibility;

If I choose set visible, I have only two options: "visible" and "invisible", I can not create an expression to indicate the "visible" value of another sprite.

So how do I do?.
Last edited by The Mnk on Fri Nov 13, 2015 8:56 am, edited 1 time in total.
B
29
S
12
G
21
Posts: 801
Reputation: 14,453

Post » Fri Nov 13, 2015 8:24 am

I guess you want the opacity?
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 » Fri Nov 13, 2015 8:29 am

If I understand you correctly, you are wanting to set a sprites visibility state to that of a different sprites visibility state?

Why not just use a variable as an intermediate step?

If sprite Is Visible Set Visibilty = 1

Then the other sprite can just check the variable when it needs to.

Is this the kind of thing you mean, or have I totally missed the point (possible :) )
If your vision so exceeds your ability, then look to something closer.
Moderator
B
134
S
30
G
86
Posts: 5,422
Reputation: 59,530

Post » Fri Nov 13, 2015 8:36 am

zenox98 wrote:If I understand you correctly, you are wanting to set a sprites visibility state to that of a different sprites visibility state?

Why not just use a variable as an intermediate step?

If sprite Is Visible Set Visibilty = 1

Then the other sprite can just check the variable when it needs to.

Is this the kind of thing you mean, or have I totally missed the point (possible :) )


Yes, that meant.
But I thought it could be done using an expression as I said before.
Ok, then I will use a variable.

Thanks guys.
B
29
S
12
G
21
Posts: 801
Reputation: 14,453

Post » Fri Nov 13, 2015 8:37 am

Or :-)

As a condition you can use

is sprite a visible? (inverted)
Then as an action
set sprite B's visibility to invisible
August 2015 - I misplaced a lot of links - I will try to find backups and repost. If You find a post that interests please reply to post with @rampackwobble and I will get a nudge!

If you find my posts useful please consider donating something to a local charity or to the http://www.mndassociation.org/
B
64
S
34
G
47
Posts: 1,194
Reputation: 30,882


Return to How do I....?

Who is online

Users browsing this forum: dand, Google [Bot] and 22 guests