making sand

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

making sand

Postby pivottribal » Wed Sep 15, 2010 3:12 am

Hey Pivottribal here wanting to know if there is a way to simulate sand being picked up from the rear tire so it looks like my buggy is driving on loose sand.
Rating: rated 5
Filesize: 26.6 kB
Comments: 0
Ratings: 1
download
Any suggestions? :?: i tried a script but it failed
ImageTheres a new asshole in Algobox his username is KAZZAN(i think) BAN HIM
User avatar
pivottribal
 
Posts: 271
Joined: Sat Sep 04, 2010 12:30 am
Location: Florida,Pensacola

Re: making sand

Postby kilebantick » Wed Sep 15, 2010 6:14 am

Actually, there is.
You'd have to spawn multiple with a velocity in the direction that you'd like.

Either way, it's very possible, and is used to make smoke.
However, i don't know the coding for it.
Image
User avatar
kilebantick
 
Posts: 1267
Joined: Tue Sep 01, 2009 9:50 am

Re: making sand

Postby Mystery » Wed Sep 15, 2010 8:57 am

Just use some tracers get clever add them to rotating rods and such.
There are scripts but they lag quite a bit. If you're to uncreative to get the tracers working i can give you the base code for dust effects.
User avatar
Mystery
 
Posts: 2802
Joined: Thu Sep 03, 2009 1:16 pm
Location: Southern Australia

Re: making sand

Postby pivottribal » Wed Sep 15, 2010 11:51 pm

okay ill try.But still i might try the script could you give it to me?
ImageTheres a new asshole in Algobox his username is KAZZAN(i think) BAN HIM
User avatar
pivottribal
 
Posts: 271
Joined: Sat Sep 04, 2010 12:30 am
Location: Florida,Pensacola

Re: making sand

Postby Mystery » Fri Sep 17, 2010 9:02 am

Code: Select all
    Scene.addCircle({
        color := [0.66, 0.33, 0.0, 0.33];
        onHitByLaser := (e)=>{
            e.geom.density = e.geom.density - 0.01;
            e.geom.color = e.geom.color - [0.0, 0.0, 0.0, -0.005];
            {e.geom.density < 0} ? {e.geom.density = 0} : {}
        };
        refractiveIndex := +inf;
        density := 0.1;
        collideset := 32;
        pos := e.pos;
        vel := [0.0, 0.0];
        radius := 1.0;
        heterocollde := true;
        opaqueBorders := false
    });
    Scene.addLaserPen({
        pos := e.pos;
        maxRays := 1;
        collideset := 32;
        size := 0.00951411;
        color := [1.0, 1.0, 1.0, 0.1]
    })

This is my basic code for self deleting objects, very basically tweaked for your need.
Spawns a circle with a laser attached the laser will slowly delete the circle.
The circles shouldn't last a second for best effect try making a some different sized circles.
User avatar
Mystery
 
Posts: 2802
Joined: Thu Sep 03, 2009 1:16 pm
Location: Southern Australia


Return to Thyme scripting

Who is online

Users browsing this forum: No registered users and 5 guests