create object

For questions about using Classic.

Post » Wed Jan 11, 2012 2:43 am

hi everyone.

I know that someone could find this easy but I have tried everything without success.

I want to create two balls, one on the left and on the right. So far so ok, the original ball have the ball behavior. and the problem is when the original ball change his angle, and the other balls are created in the oppositive direction. so the question is how I can get angle from the original ball and set it in the others balls?

so I hope you can halp me with this.

B
3
G
1
Posts: 9
Reputation: 518

Post » Wed Jan 11, 2012 9:05 am

Just mark the first one(I used the "parent" variable for this), and make a global variable wich stores the original ball's angle.


+ System: Start of layout
-> System: Create object Ball on layer 1 at (50, 400)

+ System: For each Ball
+ Ball: Value 'parent' Equal to 1
-> System: Set global variable 'angle' to Ball.Angle

+ System: For each Ball
+ Ball: Value 'parent' Not equal to 1
-> Ball: Set angle of motion to global('angle')
B
10
S
6
G
3
Posts: 127
Reputation: 2,481

Post » Wed Jan 11, 2012 7:43 pm

I tried what you say, but it doesn't works like I want.

this is what I traying to do http://www.box.com/s/0u7d3hjoy5mg5ybhlh2t

I hope you can help me
B
3
G
1
Posts: 9
Reputation: 518


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 0 guests