How do I toggle on or toggle off anything at all?

Get help using Construct 2

Post » Tue Jun 14, 2016 5:14 am

This is really simple task but I've faced some dead end.
Image
It's just not working. I've tried to do the same with variables,
if cat1 = 0, make visible and set cat1 value to 1,
if cat1 = 1, make invisible and set cat 1 value to 0.

But it would always show 0, as if it reads from top to down, and from some reason read separate event right away.
B
11
S
3
Posts: 44
Reputation: 713

Post » Tue Jun 14, 2016 5:41 am

The problem is the code runs top to bottom. You set cart to 1, then it proceeds to the next line and it reads cart =1. You need to use "Else".

System > Cart = 1 > Set Cart to 1
Else > ____________> Set Cart to 0
Image
B
75
S
23
G
3
Posts: 673
Reputation: 9,283

Post » Tue Jun 14, 2016 6:13 am

TheDom wrote:The problem is the code runs top to bottom. You set cart to 1, then it proceeds to the next line and it reads cart =1. You need to use "Else".

System > Cart = 1 > Set Cart to 1
Else > ____________> Set Cart to 0


Thank you, else statement worked for me
B
11
S
3
Posts: 44
Reputation: 713


Return to How do I....?

Who is online

Users browsing this forum: beohs, boybacteria and 30 guests