The script doesn't work before a certain time

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

The script doesn't work before a certain time

Postby Rideg » Tue Feb 16, 2010 7:55 pm

Hello, I'm having problems with spawning stuff though they doesn't spawn before sim.time is around 12 sec. I'm posting the script so you can see for yourself
Code: Select all
(e)=>{
    (sim.time - e.geom.controllerAcc) >= scene.my.simtime ? {         Scene.addPolygon({             surfaces := scene.my.surfaces;             angle := math.atan(e.normal(1) / (e.normal(0) + 1)) * 2;             opaqueBorders := false;             collideWater := true;             vel := -3 * scene.my.vector1;             angvel := 10.0;             heteroCollide := false;             color := [0.487, 0.5, 0.0, 1.0];             drawBorder := false;             collideSet := 8;             buttonDestroy := "x";             entityID := 9661;             zDepth := 1873;             geomID := 45;             pos := scene.my.ejectpos1;             polyTrans := [0.9896672, 0.0, 0.0, 0.9896672]         });         scene.addPen({             geom := 45;             relPoint := [0.20296955, 0.0];             color := [0.3, 0.3, 0.3, 0.5];             fadeTime := 0.5;             size := 0.04;             entityID := 9888;             zDepth := 1872         });         e.geom.controllerAcc = sim.time     } : {} }
Image
make sure to check out my work.
User avatar
Rideg
 
Posts: 948
Joined: Tue Dec 15, 2009 5:17 pm
Location: Östersund, Sweden

Re: The script doesn't work before a certain time

Postby standardtoaster » Tue Feb 16, 2010 8:35 pm

Did you make sure that the controllerAcc was set to zero when you started?
User avatar
standardtoaster
 
Posts: 606
Joined: Mon Aug 31, 2009 7:57 pm

Re: The script doesn't work before a certain time

Postby Rideg » Tue Feb 16, 2010 10:06 pm

whoops my bad Thank you :P
Image
make sure to check out my work.
User avatar
Rideg
 
Posts: 948
Joined: Tue Dec 15, 2009 5:17 pm
Location: Östersund, Sweden


Return to Thyme scripting

Who is online

Users browsing this forum: No registered users and 1 guest