'Or' can't be used in this example

New releases and general discussions.

Post » Sat Sep 13, 2008 3:47 am

The condition "animation is finished" can't be used with the 'or' function in this example because it always gets put at the top of the list of conditions, so instead of having "is animation 1 finished or is animation 2 finished" I have to use separate events. Generally not an issue but it makes for neater code. Could 'or' be made to be able to be put anywhere in the list?

And apologies for asking, but why are some conditions always at the top again? And if 'animation is playing' isn't a top event, then why is 'animation finished'?
Moderator
B
88
S
32
G
33
Posts: 3,005
Reputation: 27,432

Post » Sat Sep 13, 2008 9:06 am

Triggered conditions - such as On animation finished - are automatically put at the top of events to ensure a correct order of events and useage. Events cannot contain multiple triggers, which explains why you can't have an OR between two. I noticed it doesn't pop up a prompt though, which it should.

A workaround would be to use an inverted 'Animation is playing', if possible.
B
3
S
2
G
5
Posts: 1,777
Reputation: 5,529

Post » Sat Sep 13, 2008 6:19 pm

Actually if you make another event 'on animation 'walk' finished' and then drag that condition into the event that has 'on animation 'whatever' finished' you will get 2 triggers in the event. In the situation that more than 1 trigger appears in an event, each trigger is handled as though an or is between them.

eg:

on button 1 clicked
on button 2 clicked
message "woohoo"

Will result in the message "woohoo" appearing if you click button 1 or button 2.

However its kind of confusing because it reads like it should happen if they are clicked at the same time.
B
4
S
2
G
5
Posts: 641
Reputation: 3,011

Post » Sat Sep 13, 2008 6:34 pm

That's not intended though.. either the system should be changed to allow it or it should be 'fixed'.

The best resolution would be to disallow multiple triggers except when OR is added, I think.
B
3
S
2
G
5
Posts: 1,777
Reputation: 5,529


Return to Construct Classic Discussion

Who is online

Users browsing this forum: No registered users and 2 guests