Randominze animation..?

Get help using Construct 2

Post » Wed Oct 23, 2013 5:11 am

i have 8 animation how can i play them . with thouching and play the animation by random
B
12
S
1
Posts: 31
Reputation: 607

Post » Wed Oct 23, 2013 6:24 am

Well, say your animations were named

Walk, Run, Jump, Fall, Fly

In your event sheet you could do Play Animation Choose("Walk", "Run", "Jump", "Fall", "Fly") and C2 would pick a random one.
B
101
S
32
G
12
Posts: 1,549
Reputation: 21,993

Post » Wed Oct 23, 2013 7:50 am

i dont get it :( im nowbie
B
12
S
1
Posts: 31
Reputation: 607

Post » Wed Oct 23, 2013 8:26 am

play the 8 animation..? in every 3 second
B
12
S
1
Posts: 31
Reputation: 607

Post » Wed Oct 23, 2013 8:56 am



Is this what you want?

EDIT: random should be 3 ofcourse cause it's always number -1 Ize2013-10-23 08:57:21
B
33
S
6
G
7
Posts: 339
Reputation: 7,426

Post » Wed Oct 23, 2013 9:29 am

@Ize thank can you check it ..?

in evry random animation well fenish how can i set to her default animation...fro example i touch the play random and when the animation fenish it well set to her default animation...
B
12
S
1
Posts: 31
Reputation: 607

Post » Wed Oct 23, 2013 9:31 am

phepot2013-10-23 09:32:50
B
12
S
1
Posts: 31
Reputation: 607

Post » Wed Oct 23, 2013 2:23 pm

Sprite on any animation finished -> set animation to "Default"
B
33
S
6
G
7
Posts: 339
Reputation: 7,426

Post » Wed Oct 23, 2013 5:05 pm

ArcadEd's solution is shorter. Put

Choose("Walk", "Run", "Jump", "Fall", "Fly")

as your animation name, if your animations are names walk, run, jump, etc.
Another solution for your case would be:

Animation&str(floor(random(1,9))

(again put into the animation name)mindfaQ2013-10-23 17:08:30
Visual Novel 'Engine' in 100 Events
if you ever have to choose between buying Construct 2 on scirra.com or on Steam, read this: Review
B
22
S
9
G
1
Posts: 788
Reputation: 3,788

Post » Thu Oct 24, 2013 1:09 am

thank you
B
12
S
1
Posts: 31
Reputation: 607

Next

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 7 guests