640 !

For questions about using Classic.

Post » Sat May 24, 2008 11:01 pm

I have 640 objects that need to be "hinged" to each other, linear.

like,
hinge object 1 to object 2
hinge object 2 to object 3
hinge object 3 to object 4
.......
hinge object 639 to object 640

the " to object" in the hinge action has no "expression" to use.
i cant figure out a way to do it in a loop

do i have to hinge em all one by one ?

or does someone has an idea about how to do this ?
B
3
S
2
G
4
Posts: 322
Reputation: 2,119

Post » Sat May 24, 2008 11:07 pm

Are these objects of the same type, or are you hinging every instance of type A with it's paired instance in type B?
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,478

Post » Sun May 25, 2008 10:29 am

Here is a quick example.

http://www.mediafire.com/?xuolx1gszxw

I suppose you know what i am up to, since 640 is the screen size. : )
I been diving a few days in wave equations.
But they just dont fit (in my brain).

While the solution is kinda simple.
As you see .. Hinges have the right damping to simulate area tension.

I just hope there is a way to automate this, and to take the stiff thing into an expression.

Besides if i can automate the creation of this,
i sure "suddenly" know how to pick&combine in more situations then i do know now.

Ashley i love those physics, aren't they beautiful ? when you see them act like this ?

You might have not looked at the Koch fractal i made, my comp could bring it to 8 iterations,
man ! do u know how many objects that are ! ? !! .. lol

j0h
B
3
S
2
G
4
Posts: 322
Reputation: 2,119

Post » Sun May 25, 2008 9:48 pm

You might be able to make all the objects the same, then start a loop for like 1000 times. Each time the loop runs it adds 1 to a value, and creates a hinge from the sprite with unique id equal to the value, to the sprite besides it.

The problem is that you have to select two objects to preform actions on, and i don't know any way to do it. I'll think about the problem and return if i find something more usefull.
B
8
S
2
G
5
Posts: 744
Reputation: 3,288

Post » Sun May 25, 2008 10:46 pm

Attan, ty

&
it looks simple eh?

What you suggested is one of the options ive been.
In this zip you find 2 caps.
http://www.mediafire.com/?yjztmj1rdnd
One with the objects as Unique ID's, one with the objects as instances.

In the instances .cap, well this feels like it should work.

Only if you run it in debug mode, click the array to expand and look at numbers,
you will see that those are not the UID's as one would expect.

Thats the reason why it dont work.

You can link this action to every loop u can think of.

Even this ..

System: 0 For "runit" from 1 to 640
wave: 5 X Equal to loopindex("runit")

will put the same numbers in the array, but they are not the UID's (well not those i see in the layout)

the .cap with the unique objects i provide for in case someone is able to make a loop that runs trought the names of the objects. Wich would be nice too.

the other option is that i link 20 objects a day one by one by hand,
only takes me a month i guess : ) .. good thing its not februari
B
3
S
2
G
4
Posts: 322
Reputation: 2,119

Post » Tue May 27, 2008 9:09 pm

B
3
S
2
G
4
Posts: 322
Reputation: 2,119


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 0 guests