How to use ELSE condition

Get help using Construct 2

Post » Mon Jan 28, 2013 7:17 am

Hi Constructors,

Can anyone help me how to use ELSE condition in Construct 2?

Thanks,
Rex
B
23
S
6
G
3
Posts: 39
Reputation: 4,739

Post » Mon Jan 28, 2013 8:24 am

The Manual entry is here:
https://www.scirra.com/manual/124/system-conditions
Scroll down the the page about two thirds, to "Special Conditions"

Else is an Event that follows directly after the event that triggers it, not as a sub-event.
If the triggering event does not run, the else will run instead.

To create one, you have to clcik on the far left of the event you want to add it after. Not in the middle on the event text, but left of the event icon, and in that menu choose "Add" it will be at the bottom of that sub-menu.

It should turn red if it's used in the wrong place. (IE you delete the triggering event.)
Paradox2013-01-28 08:25:33
B
200
S
51
G
30
Posts: 896
Reputation: 36,494

Post » Mon Jan 28, 2013 9:09 am

Thanks Paradox. I been into that link but I don't know how to get the ELSE active. What I want to do is to check the variable's value like

if (x>5){
// do something
}else{
// do something
}


Yes, I did it. I never thought clicking on the far left would create an event. Thanks once again Paradox.morex2013-01-28 09:19:16
B
23
S
6
G
3
Posts: 39
Reputation: 4,739

Post » Tue Jan 29, 2013 9:33 am

It's usually something simple like that, so I try to include several possibilities. Glad to help.
B
200
S
51
G
30
Posts: 896
Reputation: 36,494


Return to How do I....?

Who is online

Users browsing this forum: currypuff, makotto, randomly and 26 guests