Else

For questions about using Classic.

Post » Mon Jul 06, 2009 3:16 pm

I couldn't find any documentation on this, does anyone know how to use it or what it does?
B
134
S
65
G
16
Posts: 1,765
Reputation: 19,188

Post » Mon Jul 06, 2009 3:51 pm

Else runs if the conditions of the event before it is false. Example:

Event 1:
If sprite.x is lower than 100
- rotate sprite clockwise
Event 2:
Else
- rotate sprite counterclockwise

If sprite is not lower than 100, it'll rotate counterclockwise.
Moderator
B
87
S
32
G
33
Posts: 3,005
Reputation: 27,397

Post » Mon Jul 06, 2009 4:15 pm

also, make sure it's the next event. it's not meant to be used as a subevent to the original or an extra condition.
Spriter Dev
B
87
S
21
G
12
Posts: 3,240
Reputation: 16,461

Post » Mon Jul 06, 2009 5:22 pm

It should be able to be used in subevents, but I think there may be a bug with this.
B
3
S
2
G
5
Posts: 1,777
Reputation: 5,529

Post » Mon Jul 06, 2009 9:09 pm

It works in subevents, but not as the first subevent, because it has to follow another event of the same nesting level.

'Else' also cannot follow a trigger - there's a bug where if it does follow a trigger, it actually is acting as an else to the first non-trigger event before it in the event sheet :?
Scirra Founder
B
359
S
214
G
72
Posts: 22,949
Reputation: 178,544

Post » Tue Jul 07, 2009 12:18 am

for clarification:

good: notice how it connects the events


good for subevents, too


this is what I meant you can't do


or this
Spriter Dev
B
87
S
21
G
12
Posts: 3,240
Reputation: 16,461

Post » Tue Jul 07, 2009 6:17 am

Lucid's images should be wikified.
I never got it properly until now.
B
3
S
2
G
4
Posts: 1,445
Reputation: 4,665

Post » Mon Aug 24, 2009 2:21 pm

How come I'm not getting a nice split with my else?




like how the else splits in this:

B
134
S
65
G
16
Posts: 1,765
Reputation: 19,188

Post » Mon Aug 24, 2009 2:34 pm

it has to be a separate event, not a condition in the same event
Spriter Dev
B
87
S
21
G
12
Posts: 3,240
Reputation: 16,461

Post » Mon Aug 24, 2009 2:41 pm

Should I add Trigger once to else events for stuff like making some object visible?
B
24
S
7
G
3
Posts: 138
Reputation: 2,795

Next

Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 7 guests