Data Chain

About advanced scenes, and the Thyme scripting language used in Algodoo.

Data Chain

Postby minyman60 » Sat Oct 17, 2009 11:03 pm

Hi, Im trying to create a chain that will take properties from the peace behind it, and then change collide set. This isnt realy working and i have no idea why. I have a bar, with balls on it. each just overlaping a tiny bit. for them to collide, Each ball has a collideset alternaing on this bar, so collide set c, then the next ball has d, one after has c... for about 10 balls. will be getting longer...

But its ignoring my code, not doing anything... I dont know why... its accepting the code, and staying there. so im pretty sure its nothing imidiatly wrong.... anyways heres what i have so far.

Code: Select all
(e)=>{
    e.this.collideset = 4 ? {         e.this.collideset = 8;         e.this.color = [1, 0.4, 0, 1]     } : {         e.this.collideset = 4;         e.this.color = [0, 0, 1, 1]     };     e.this.controlleracc = e.other.controlleracc;     e.other.controlleracc = 0;     e.this.friction = e.other.friction;     e.other.friction = 0 }
minyman60
 
Posts: 19
Joined: Wed Oct 14, 2009 11:39 pm

Re: Data Chain

Postby minyman60 » Sat Oct 17, 2009 11:53 pm

I just realised that i dont need this to work, I dont need to activly send power, just give the appearance of sending power. But it would still be nice to compleate and post up. If anyone could help id appreciate it.
minyman60
 
Posts: 19
Joined: Wed Oct 14, 2009 11:39 pm

Re: Data Chain

Postby KarateBrot » Sun Oct 18, 2009 4:24 pm

look at this scene

Filesize: 22.38 kB
Comments: 6
download
Image
User avatar
KarateBrot
 
Posts: 825
Joined: Mon Aug 31, 2009 7:32 pm
Location: Germany


Return to Thyme scripting

Who is online

Users browsing this forum: No registered users and 5 guests