why have not sub-events else/elseif?

Discussion and feedback on Construct 2

Post » Tue Jan 10, 2012 10:06 am

Speaking of "Else", any reason why the "While" and "On Loop" conditions aren't implemented either?
B
94
S
37
G
11
Posts: 404
Reputation: 11,275

Post » Tue Jan 10, 2012 10:20 am

New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 6,998
Reputation: 57,791

Post » Tue Jan 10, 2012 11:02 am

... I think I phrased that question badly, because I am perfectly aware of that. >>
B
94
S
37
G
11
Posts: 404
Reputation: 11,275

Post » Tue Jan 10, 2012 11:04 am

Same reasons, I believe. There are simple workarounds and implementation would be tricky & taxing.
B
62
S
21
G
12
Posts: 1,910
Reputation: 13,155

Post » Tue Jan 10, 2012 11:10 am

Yep, same reason for While. We're not planning on implementing "On loop" (if I understand what you mean correctly), why do you want it?Ashley2012-01-10 11:10:46
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,468

Post » Tue Jan 10, 2012 12:22 pm

Just asking out of curiosity, to be perfectly honest. *Shrug*
B
94
S
37
G
11
Posts: 404
Reputation: 11,275

Post » Tue Jan 10, 2012 12:25 pm

Hey
why is my comment a spam o_O
B
34
S
16
G
16
Posts: 2,222
Reputation: 16,564

Post » Tue Jan 10, 2012 6:08 pm

[QUOTE=Ashley] A built in 'else' condition has been on the todo list for a while, it's just got a low priority because it's easy to work around (copy the event and invert it) and the implementation is actually quite tricky (it must use the exact opposite picked objects from the previous event).[/QUOTE]

Hmm... I kind of liked it the way CC worked, where the else event simply ran if the event above it didn't run, and it didn't affect the picking. With that, I could do things like check if no objects met the criteria of the event above it easily, and modify the picking of the else manually with conditions rather than have it be automatic.
Moderator
B
87
S
32
G
33
Posts: 3,005
Reputation: 27,397

Post » Tue Jan 10, 2012 8:06 pm

@Arima - on the other hand, it confused a lot of people because if you did:

+ Sprite X < 400
-> Do something with Sprite
+ Else
-> Do something else with Sprite

...they naturally expected the 'else' to only affect objects on the right, and I agree, that's how I think it should work too. However it turned out to be too complicated to get it working like that in Classic. It should be doable in C2 though.
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,468

Post » Tue Jan 10, 2012 8:37 pm

@Ashley

That makes sense, but there's one situation in particular that gets kind of clunky without it, checking if no objects have a variable equaling something. I could do a for each and add 1 to a variable if true, and then check the variable... it just seems clunky in comparison, though.

Maybe it could have 'invert picking' or 'don't invert picking' as a parameter like the function object has in CC?
Moderator
B
87
S
32
G
33
Posts: 3,005
Reputation: 27,397

PreviousNext

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 5 guests