Page 1 of 1

How To script tracers to objects

PostPosted: Sun Dec 12, 2010 5:14 am
by j-train09
im trying to make a gun that spawns cirles with traces but i cant seem to get it right so can some one hwlp me?? :angel:

Re: How To script tracers to objects

PostPosted: Sun Dec 12, 2010 10:59 am
by Dare
Look at some other scenes that do this, and teach yourself. That's what I did.

Re: How To script tracers to objects

PostPosted: Sun Dec 12, 2010 5:39 pm
by j-train09
ok

Re: How To script tracers to objects

PostPosted: Sun Dec 12, 2010 10:17 pm
by Rideg
I believe this topic should be in the "Thyme scripting" selection. There you'll find plenty of answers ;)

Re: How To script tracers to objects

PostPosted: Mon Dec 13, 2010 8:44 pm
by Paradigm 29
Code: Select all
Scene.addcircle({
            color := [0.0, 0.0, 0.0, 1.0];
            friction := 0.0;
            restitution := 1.0;
            drawBorder := false;
            airFrictionMult := 0;
            density := 1;
            collideSet := 1;
            pos := [1,1];
            vel := [0,0];
            radius := .1
        });
        Scene.addGroup({
            name := "selected";
            entityIDs := []
        });
        Scene.addPen({
            color := [1.0, 0.0, 0.0, 1.0];
            fadeTime := 0.6;
            size := 0.13409157;
            pos := [1,1]
        })

Spawns a circle with a tracer on it at [1,1]
You should be able to adapt that to your needs. You should also bookmark this page: http://www.algodoo.com/algobox/profile. ... 146&page=2

Re: How To script tracers to objects

PostPosted: Wed Dec 22, 2010 4:45 am
by j-train09
oh thank you so much :clap: :clap: