Switch Animations Randomly

Get help using Construct 2

Post » Thu Oct 04, 2012 6:27 pm


Im trying to switch between 2 animations randomly. I want the switch to take place when an Ememy is "on collision" or "overlapping" the Player character. I want it to choose randomly upon the "on collision" or "overlapping" condititions and continue to choose randomly so long as the conditions remaian true. The 2 aniamtions are not set to loop. They are a "kicking" animation and a "punching" animation. I hope this is clear.

Thanks in advance.
Image
B
71
S
22
G
2
Posts: 671
Reputation: 8,522

Post » Thu Oct 04, 2012 7:11 pm

[code]
+enemy: Is overlapping player
+enemy: NOT Is animation "punch" playing
+enemy: NOT Is animation "kick" playing
   -> enemy: Set animation to choose("punch", "kick")

+enemy: On animation "punch" finished
-or-
+enemy: On animation "kick" finished
   -> enemy: Set animation to "idle"
[/code]
B
54
S
28
G
18
Posts: 1,520
Reputation: 25,000

Post » Fri Oct 05, 2012 12:01 am

sorry, but I really dont understand this example.
Image
B
71
S
22
G
2
Posts: 671
Reputation: 8,522

Post » Fri Oct 05, 2012 1:22 am

B
54
S
28
G
18
Posts: 1,520
Reputation: 25,000

Post » Fri Oct 05, 2012 11:32 am

Didn't understand the choose. Very Cool. Thanks so much.
Image
B
71
S
22
G
2
Posts: 671
Reputation: 8,522

Post » Fri Oct 05, 2012 5:42 pm

Just curious, I wasn't aware you could use "choose". Is that a regular expression or is something unique to Construct 2? And can I find a reference other such statements?
Image
B
71
S
22
G
2
Posts: 671
Reputation: 8,522

Post » Fri Oct 05, 2012 5:44 pm

ImageImageImageImage
B
140
S
58
G
36
Posts: 2,547
Reputation: 31,170

Post » Fri Oct 05, 2012 7:35 pm

@ Shinkan...REALLY!!???
"Everything is in the manual"
These types of responses are uncalled for and rude. New users to construct may not be familiar with different function terms that construct uses. Reading the manual will not help in every situation. Not only that, we share these forums with users from different language backgrounds, and terminology can become askew. If you can't simply answer a question... than don't. There have been many times when I have searched everywhere throughout this site for a for answers and only ended up lost and even more confused. If you insist that someone references the manual, then how about linking to the section in the manual or a specific place where the answer may lie. Sometimes I'm baffled by the arrogance of some of the forum users.
Auntie Val2012-10-05 19:50:12
B
20
S
2
Posts: 257
Reputation: 2,431

Post » Fri Oct 05, 2012 7:53 pm

Thank you, for calling me rude. Appreciate that, I really do.

Besides that saying (and giving link the same time - I know it's rude too) "Everything is in the manual" i was answering that question
[quote]And can I find a reference other such statements?[/quote]
and i meant that all available C2 expressions are explained in the manual.



[QUOTE=Auntie Val]...If you insist that someone references the manual, then how about linking to the section in the manual or a specific place where the answer may lie.[/QUOTE]

I just did that in the link I post. :D

ImageImageImageImage
B
140
S
58
G
36
Posts: 2,547
Reputation: 31,170

Post » Fri Oct 05, 2012 8:26 pm

Well Shinkan,
Perhaps you did not mean to be rude, but it did sound that way.
"Everything is in the manual" sounds arrogant (whether or not you meant it), perhaps I would not have reacted so quickly if you had said something like... "you can find it here in the manual" or something similar. I'm not calling YOU rude, I just think the answer sounded rude.
B
20
S
2
Posts: 257
Reputation: 2,431

Next

Return to How do I....?

Who is online

Users browsing this forum: bluemonkey, Khamsou and 23 guests