How do I make AND and OR conditions mixed

Just started using Construct 2? Post your questions here

Post » Thu Oct 16, 2014 5:48 pm

I just explained this same issue over here: viewtopic.php?f=178&t=117538
See if that helps.
ImageImageImage
B
71
S
22
G
241
Posts: 3,734
Reputation: 134,494

Post » Thu Oct 16, 2014 8:23 pm

Sooo you don't need to repeat the Mouse and Touch events. Just have it once, and then as a subevent:
----------------------------------------
Instruccio...: Is animation "a" playing -> Instrucci...: Set animation to "b" (play from current frame)
Else
Instruccio...: Is animation "b" playing -> Instrucci...: Set animation to "c" (play from current frame)
Else
...
-----------------------------------------

That's ONE step better but you can still do better. (hint: try naming your animations with digits 1, 2, 3 instead of letters..)

Edit: I just saw BH's post, I'm sure whatever it is will do the job :)
B
24
S
9
G
4
Posts: 1,646
Reputation: 6,596

Post » Thu Oct 16, 2014 9:44 pm

codah wrote:Sooo you don't need to repeat the Mouse and Touch events. Just have it once, and then as a subevent:
----------------------------------------
Instruccio...: Is animation "a" playing -> Instrucci...: Set animation to "b" (play from current frame)
Else
Instruccio...: Is animation "b" playing -> Instrucci...: Set animation to "c" (play from current frame)
Else
...
-----------------------------------------

That's ONE step better but you can still do better. (hint: try naming your animations with digits 1, 2, 3 instead of letters..)

Edit: I just saw BH's post, I'm sure whatever it is will do the job :)


Hello Codah,
OK I try to change the name of the animations but if I type 1 it changes to the letter (I guess numbers aren't valid names).
Then I put elses as you recommended but still the same... I click the sprite and it goes to the last animation immediately.
I'm reading the BH's post too trying to solve and understand this problem...
thank you very much both!
B
21
S
3
G
2
Posts: 86
Reputation: 2,262

Post » Thu Oct 16, 2014 9:48 pm

These are my new conditions...
You do not have the required permissions to view the files attached to this post.
B
21
S
3
G
2
Posts: 86
Reputation: 2,262

Post » Thu Oct 16, 2014 9:49 pm

Can you just post the CAPX. It makes life much easier.
ImageImageImage
B
71
S
22
G
241
Posts: 3,734
Reputation: 134,494

Post » Thu Oct 16, 2014 10:17 pm

Great BH!... I replaced animations to frames, and it's working good!
Thank you very much.

I appreciate if you could play the game I'm developing to know what do you think ?...
you can play it in: http://bit.ly/juegoelpaso

THANK YOU VERY MUCH! :)
B
21
S
3
G
2
Posts: 86
Reputation: 2,262

Previous

Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 2 guests