Tank Laser script

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

Tank Laser script

Postby mold999 » Sun Jan 02, 2011 1:43 am

im building a tank, and as its main cannon it has a laser. how can i script the laser so that when it hits another object, that object's attraction goes to -1000? :eh:

thanks in advance
Phundementalism?

Ain't nobody got
thyme fo dat.
User avatar
mold999
 
Posts: 225
Joined: Sun Jan 02, 2011 1:35 am
Location: [176436, 3763234]

Re: Tank Laser script

Postby RicH » Sun Jan 02, 2011 5:20 am

What have you tried doing?
Millions of voices suddenly cried out in terror, and were suddenly silenced. Something terrible has happened.
User avatar
RicH
[Funniest Person 2010]
 
Posts: 2043
Joined: Tue Sep 01, 2009 9:01 am

Re: Tank Laser script

Postby mold999 » Sun Jan 02, 2011 5:23 am

im trying to use e.geom.attraction = -1000, but it still wont work. also, this is another slightly less important part, can i get the laser to have a timer, so it comes in bursts instead of a long stream?


thanks
Phundementalism?

Ain't nobody got
thyme fo dat.
User avatar
mold999
 
Posts: 225
Joined: Sun Jan 02, 2011 1:35 am
Location: [176436, 3763234]

Re: Tank Laser script

Postby RicH » Sun Jan 02, 2011 5:30 am

Your script actually works. Are you sure you're putting it in the right box?
About the bursts, I can think of doing it with a mechanical cover wherein it just lets the laser through at an interval, but with scripts, I don't really know. It's possible though.
Millions of voices suddenly cried out in terror, and were suddenly silenced. Something terrible has happened.
User avatar
RicH
[Funniest Person 2010]
 
Posts: 2043
Joined: Tue Sep 01, 2009 9:01 am

Re: Tank Laser script

Postby mold999 » Sun Jan 02, 2011 6:23 am

thanks, you really helped


:clap: :clap: :clap: :clap: :clap: :clap: :clap: :clap: :clap: :clap:
Phundementalism?

Ain't nobody got
thyme fo dat.
User avatar
mold999
 
Posts: 225
Joined: Sun Jan 02, 2011 1:35 am
Location: [176436, 3763234]

Re: Tank Laser script

Postby mold999 » Sun Jan 02, 2011 6:27 am

is there a way to make the ground unaffected by the laser? I hit it, and my tank blew to pieces :(
Phundementalism?

Ain't nobody got
thyme fo dat.
User avatar
mold999
 
Posts: 225
Joined: Sun Jan 02, 2011 1:35 am
Location: [176436, 3763234]

Re: Tank Laser script

Postby RicH » Sun Jan 02, 2011 6:35 am

Don't double post and smiley spam please.

Anyway, you can turn off the collision between the plane and the laser, or you can use a variable check.
Millions of voices suddenly cried out in terror, and were suddenly silenced. Something terrible has happened.
User avatar
RicH
[Funniest Person 2010]
 
Posts: 2043
Joined: Tue Sep 01, 2009 9:01 am

Re: Tank Laser script

Postby mold999 » Sun Jan 02, 2011 6:43 am

yes, yoda. thanks anyway, though
Phundementalism?

Ain't nobody got
thyme fo dat.
User avatar
mold999
 
Posts: 225
Joined: Sun Jan 02, 2011 1:35 am
Location: [176436, 3763234]


Return to Thyme scripting

Who is online

Users browsing this forum: No registered users and 4 guests