Need Help Scripting Motor Torque

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

Need Help Scripting Motor Torque

Postby halacar » Wed Apr 25, 2012 10:56 am

I want to script a motor to have the torque modeling the function 1/x. X being the rotational velocity of the wheels/motor.

I can't figure out how to collect the value of the angular velocity into a usable variable, or where to put the calculations for the variables.

I'm pretty new to scripting, so I apologize if this is a simple problem.
halacar
 
Posts: 4
Joined: Wed Apr 25, 2012 10:51 am

Re: Need Help Scripting Motor Torque

Postby hiltropper » Thu Apr 26, 2012 2:11 pm

it's simple but its not in the tutorial yet... there are new readable functions:
put this into the onHitByLaser of your wheel
Code: Select all
scene.my.angvel=(readable(owner)).angvel

aim at it with a laser and youll have a variable (scene.my.)
Last edited by electronicboy on Thu Apr 26, 2012 8:42 pm, edited 1 time in total.
Reason: Fixed spelling mistake in code!
yup yup
yuuuuuuup
yupyupyupyupyupyupyupyupyyyuuuup
hm... signatures...
hiltropper
 
Posts: 85
Joined: Mon Dec 20, 2010 12:02 pm
Location: Germany

Re: Need Help Scripting Motor Torque

Postby monstertje3 » Thu Apr 26, 2012 3:16 pm

readable
Basically, there are only 10 types of people in the world. Those who know binary, and those who don't.
Light travels faster than sound. That's why some people appear bright until they open their mouths.
User avatar
monstertje3
 
Posts: 343
Joined: Sat Sep 05, 2009 4:29 pm
Location: N-H, NL

Re: Need Help Scripting Motor Torque

Postby hiltropper » Fri Apr 27, 2012 12:09 am

right
yup yup
yuuuuuuup
yupyupyupyupyupyupyupyupyyyuuuup
hm... signatures...
hiltropper
 
Posts: 85
Joined: Mon Dec 20, 2010 12:02 pm
Location: Germany


Return to Thyme scripting

Who is online

Users browsing this forum: No registered users and 5 guests