Need assistance with thymed thrusters

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

Need assistance with thymed thrusters

Postby Ravenplucker » Thu Sep 22, 2011 2:57 pm

I don't need "assistance" so much as I need somebody to write a script for me. ;)

Is there a way to activate a thruster attached to a geom by a geom or laser colliding with the geom that has the thruster?

Sorry if that is poorly worded, I'm very tired and somewhat intoxicated.
TheWonkits wrote:You can't do cartwheels when you're bored. Biological impossibility; they're fueled by joy.


Phundamentalist
Ravenplucker
 
Posts: 644
Joined: Thu Jan 06, 2011 6:22 pm
Location: Sydney, Australia

Re: Need assistance with thymed thrusters

Postby Nxdt » Thu Sep 22, 2011 6:55 pm

Assign varible;

Code: Select all
scene.my.thrusterpower = 0


Code on geom laser hits;

Code: Select all
Onlaser hit; scene.my.thrusterpower = (power of thruster value)


Thruster code;

Code: Select all
Power = {scene.my.thrusterpower}


Reset code, if this is left permanetly on (laser pointed at box) it will reset the thruster when the laser isn't shining on the trigger geom.

Code: Select all
scene.my.thrusterpower = 0


Hope that helps, i'm sure there might be a better way to do it without using scene.my.varibles but this is the way i know. ;)
User avatar
Nxdt
 
Posts: 1019
Joined: Mon Aug 31, 2009 6:32 pm
Location: Scotland!

Re: Need assistance with thymed thrusters

Postby Ravenplucker » Tue Sep 27, 2011 1:53 pm

Awesome, thanks!
TheWonkits wrote:You can't do cartwheels when you're bored. Biological impossibility; they're fueled by joy.


Phundamentalist
Ravenplucker
 
Posts: 644
Joined: Thu Jan 06, 2011 6:22 pm
Location: Sydney, Australia


Return to Thyme scripting

Who is online

Users browsing this forum: No registered users and 4 guests