Or, Else

For questions about using Classic.

Post » Wed Jul 22, 2009 12:39 am

I'm having trouble understanding exactly how the OR and ELSE features work in the event sheet editor. I've played around with them, but I'm apparently missing something and there is no wiki page I could find for it.

I currently have:

As a quick rundown what this does is test whether the CurrentX or CurrentY is in the first column, first row, last column, or last row. I want to check to see if any of those conditions are met, and if so then perform [A] ELSE [B].

Currently, however, it seems to just ignore that completely and only triggers the ELSE statement.
B
2
G
3
Posts: 68
Reputation: 986

Post » Wed Jul 22, 2009 1:40 am

Else doesn't work 100% correctly yet (at least I don't think so, haven't tested it in the latest build), so I would avoid using it. Also, I wouldn't use 3 ORs in a single condition, there could be problems with it.
Instead of using those ORs, just seperate each condition into there respective sub-event, and copy the action into each one. I know OR adds that ounce of neatness to the code, but I think there could be something wrong with using it like that, especially with the else condition at the end. Just program your own else condition with a variable as a workaround for now.
B
25
S
3
G
6
Posts: 1,197
Reputation: 5,620

Post » Wed Jul 22, 2009 2:17 am

[quote="Davioware":282rbmvv]Else doesn't work 100% correctly yet (at least I don't think so, haven't tested it in the latest build), so I would avoid using it. Also, I wouldn't use 3 ORs in a single condition, there could be problems with it.
Instead of using those ORs, just seperate each condition into there respective sub-event, and copy the action into each one. I know OR adds that ounce of neatness to the code, but I think there could be something wrong with using it like that, especially with the else condition at the end. Just program your own else condition with a variable as a workaround for now.[/quote:282rbmvv]

But... but... my neatness... :(

Edit: Hmm, I'm not sure what I did now.. but that doesn't seem to work either. I get the same result. Here is the .cap if anyone wants to look at it.

[url:282rbmvv]http://pub.gamingw.net/39880/ProcGen.zip[/url:282rbmvv]
B
2
G
3
Posts: 68
Reputation: 986

Post » Thu Sep 24, 2009 6:08 pm

interesting thread. this might need to be investigated.
B
2
S
2
G
4
Posts: 259
Reputation: 1,968


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 0 guests