Create a variable character!

Get help using Construct 2

Post » Thu Jul 04, 2013 3:36 pm

Hi!
I want to know how I create a animation that choose randomly a determined animation?

In my project, I create 2 sprites with different function..

The frist is:

(System every 4 seconds)
      for system -> for spawn from people to 5> sprite spawn Speople01

The second is:
   (System every 6 seconds)
      for system -> for spawn from people to 5> sprite spawn Speople02

But I want a kind of choose randomly the people(Speople1,Speople2...SpeopleN)


Thanks...
B
10
S
2
G
2
Posts: 81
Reputation: 1,757

Post » Thu Jul 04, 2013 4:02 pm

The easiest way is simply to put both Speople in a family, and then just spawn the family object, as it will automatically choose a random one. However if you need them to spawn with different time intervals it wont work.
B
44
S
11
G
2
Posts: 1,181
Reputation: 6,826

Post » Thu Jul 04, 2013 4:37 pm

Thanks!
I will do it!
B
10
S
2
G
2
Posts: 81
Reputation: 1,757

Post » Thu Jul 04, 2013 10:10 pm

or use Spawn: choose("speople1", "speople2")
B
18
S
5
G
4
Posts: 568
Reputation: 5,079

Post » Fri Jul 05, 2013 3:06 am

[QUOTE=California] or use Spawn: choose("speople1", "speople2")[/QUOTE]

Wow, how did I not know about this expression? Thank you California!
B
8
S
2
Posts: 40
Reputation: 2,136

Post » Fri Jul 05, 2013 1:31 pm

I used families, couse I have a lot of animations(Speople1,Speople2...SpeopleN), it is more easy!

Thanks, when my project will finished, I'll post the link.
B
10
S
2
G
2
Posts: 81
Reputation: 1,757

Post » Mon Jul 08, 2013 2:20 pm

@aznmonkeyboy (y)
B
18
S
5
G
4
Posts: 568
Reputation: 5,079


Return to How do I....?

Who is online

Users browsing this forum: AkbarAsgharMG, lwgames, Yahoo [Bot] and 3 guests