If Statements

Get help using Construct 2

Post » Sun Oct 13, 2013 10:09 pm

basically i think i have figured out the if statements, They seem different due to not exactly being labeled if statements, but you just add an extra condition.

Anyway, For example: I now have 2 checkboxes, When they are ticked they trickle in to a global variable, increasing the value.

How do i make it so You can only have 1 box ticked at a time,

(What i have)
System>EveryTick>addtowood
gatherwod>isticked

But i cannot figure out how to make only one tickable at a time, Someone point me in the right direction.



B
5
Posts: 13
Reputation: 227

Post » Sun Oct 13, 2013 10:16 pm

Add a condition so that the event only runs if wood "IsNotTicked"
B
47
S
18
G
84
Posts: 2,273
Reputation: 49,800

Post » Sun Oct 13, 2013 10:30 pm

@plinkie

That works now, I made it disable the other checkbutton when it is selected.

but when i unselect the checkbox i cant get it to re-enable the boxes :(

Next question, I am wanting to share this with other but its bigger than 10mb for here and someone suggested hosting on dropbox but that dont work for me.

Do you have any suggestion for sharing this with people.sheppard12013-10-13 22:59:48
B
5
Posts: 13
Reputation: 227

Post » Sun Oct 13, 2013 11:22 pm

@anyone

Here is what i have in the events for the Checkboxes, Now when i click 1 the other vanishes....But i cannot get it so when i unclick the box the other reappears.

https://www.dropbox.com/s/gplx96ujpxtoodk/Screenshot%202013-10-13%2023.21.19.png
B
5
Posts: 13
Reputation: 227

Post » Mon Oct 14, 2013 12:01 am

You are never setting anything to Enabled
B
47
S
18
G
84
Posts: 2,273
Reputation: 49,800

Post » Mon Oct 14, 2013 12:14 am

@plinkie

not in that screenshot, i removed the code as it was not working, and i was making a mess :(

I will redo code and repost another screenie

EDIT:
https://www.dropbox.com/s/npi0z7czcqg7pn9/Screenshot%202013-10-14%2000.20.40.png

Fixed, Sorry for wasting your time, i put the re-enable into its own event tree. And its working now.sheppard12013-10-14 00:28:45
B
5
Posts: 13
Reputation: 227


Return to How do I....?

Who is online

Users browsing this forum: zenox98 and 35 guests