How do I toggle visibility by touch

Just started using Construct 2? Post your questions here

Post » Wed Dec 03, 2014 8:57 am

I have a sprite that I want to toggle visibility by touch.
If it is invisible and you touch it, is should become visible.
If it is visible and you touch it, it should become invisible.

I have:

On tap gesture on sprite AND sprite is NOT visible, set sprite visibility to visible

This works.

But if I add another event:

On tap gesture on sprite AND sprite is visible, set sprite visibility to invisible

Then nothing works at all..

?
B
29
S
14
G
9
Posts: 80
Reputation: 5,993

Post » Wed Dec 03, 2014 9:08 am

Try: System: Else - set sprite visibility to invisible. Under your firs event. good luck!
My game Petrolhead Tactics is now on Steam Greenlight. I could not have done this without C2 ? Please rate, if you like!

Steam client already open: petrolheadtactics.com/steam
Web: petrolheadtactics.com/greenlight
B
20
S
4
G
4
Posts: 132
Reputation: 4,130

Post » Wed Dec 03, 2014 11:40 am

you mean like this
You do not have the required permissions to view the files attached to this post.
B
249
S
39
G
15
Posts: 1,952
Reputation: 40,579

Post » Wed Dec 03, 2014 5:05 pm

Monumental:

When I add the System:Else statement, it goes red and says "Not Valid Here"

LordShiva:

Your example is close, but I need the sprite to click-on, click-off.... Not temporarily click off then reappear..
You do not have the required permissions to view the files attached to this post.
B
29
S
14
G
9
Posts: 80
Reputation: 5,993

Post » Thu Dec 04, 2014 4:14 am

Figured it out..!
You do not have the required permissions to view the files attached to this post.
B
29
S
14
G
9
Posts: 80
Reputation: 5,993



Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 1 guest