SOLVED - Laser that changes objects collision?

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

SOLVED - Laser that changes objects collision?

Postby SodaJerk » Tue Feb 09, 2010 6:39 pm

What is the code to add to a laser so that the laser changes the collision of objects it hits to A and D?
Last edited by SodaJerk on Wed Feb 10, 2010 2:34 am, edited 1 time in total.
SodaJerk
 
Posts: 8
Joined: Mon Feb 08, 2010 4:40 am

Re: Laser that changes objects collision?

Postby Sonic » Tue Feb 09, 2010 8:14 pm

e.object.collideset=X Replace x with the desired numrical value.
I do stuff and break things. You know how it is.
Image
User avatar
Sonic
 
Posts: 1467
Joined: Tue Sep 01, 2009 6:18 pm
Location: America!!!

Re: Laser that changes objects collision?

Postby SodaJerk » Tue Feb 09, 2010 8:29 pm

That did not work. I tried adding the code to the laser and object and it did not do anything.
SodaJerk
 
Posts: 8
Joined: Mon Feb 08, 2010 4:40 am

Re: Laser that changes objects collision?

Postby standardtoaster » Tue Feb 09, 2010 8:30 pm

Sonic, it's not e.object, it's e.geom.
Code: Select all
e.geom.collideSet = 9
User avatar
standardtoaster
 
Posts: 606
Joined: Mon Aug 31, 2009 7:57 pm

Re: SOLVED - Laser that changes objects collision?

Postby SodaJerk » Wed Feb 10, 2010 2:36 am

That worked. Thank You standardtoaster. This code works by adding it to the laser or the object. Thanks.
SodaJerk
 
Posts: 8
Joined: Mon Feb 08, 2010 4:40 am

Re: Laser that changes objects collision?

Postby Sonic » Wed Feb 10, 2010 8:36 pm

standardtoaster wrote:Sonic, it's not e.object, it's e.geom.
Code: Select all
e.geom.collideSet = 9

Crap. I keep forgetting that. Sorry.
I do stuff and break things. You know how it is.
Image
User avatar
Sonic
 
Posts: 1467
Joined: Tue Sep 01, 2009 6:18 pm
Location: America!!!


Return to Thyme scripting

Who is online

Users browsing this forum: No registered users and 3 guests

cron