Wheel attraction from 0 to 100000

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

Wheel attraction from 0 to 100000

Postby Shymon » Sat Dec 04, 2010 12:12 am

Hi!

I'm making a car that is moved by power of attraction, but i need help.

The problem is:

How to make wheel change it's attraction from 0 to 100 000 only by laser?
I need to make attraction 100 000 and be able to make it 0 when i need it.
Attraction is very high, there can't be other shapes with the same group of colission, only laser will do the work.


If you don't understand what's the problem, I'll try to explain it better :)


p.s. sorry for my english :oops:
Shymon
 
Posts: 6
Joined: Sat Dec 04, 2010 12:01 am

Re: Wheel attraction from 0 to 100000

Postby pivottribal » Sat Dec 04, 2010 2:23 am

Just make a simple engine(look at my tutorial for magnetic engines)


EDIT
look at this
Attachments
mag.phz
(17.48 KiB) Downloaded 36 times
Last edited by pivottribal on Sat Dec 04, 2010 2:37 am, edited 1 time in total.
ImageTheres a new asshole in Algobox his username is KAZZAN(i think) BAN HIM
User avatar
pivottribal
 
Posts: 271
Joined: Sat Sep 04, 2010 12:30 am
Location: Florida,Pensacola

Re: Wheel attraction from 0 to 100000

Postby ducky21 » Sat Dec 04, 2010 2:36 am

Pivot, he stated that that wasn't what he wanted. stop advertizing
User avatar
ducky21
 
Posts: 301
Joined: Tue Aug 03, 2010 8:58 pm

Re: Wheel attraction from 0 to 100000

Postby electronicboy » Sat Dec 04, 2010 4:08 am

welcome to the forums :)
using a laser you can use

Code: Select all
   e.geom.attraction = <value here>



Here is a little tip for the future

e. = event

The next step is to state an object

With a laser:

Laser. = variables on the laser
Geom. = variables on a geometry

With 2 geoms:

This. = variables of object with code on
Other. = variables of the object that does not have the code

Then you need to state a variable which can be viewed in the script menu e.g. Density

so for e.geom.attraction

Event
Geometry
Attraction


If you need more help, im sure other members will be willing to help :)

P.s. The code needs to go inbetween the brackets on the onlaserhit of a geometry or a laser
When asking for help, READ THE STICKIES!
electronicboy
 
Posts: 1694
Joined: Mon Aug 31, 2009 6:18 pm

Re: Wheel attraction from 0 to 100000

Postby Shymon » Sat Dec 04, 2010 7:49 pm

Thanks a lot! :clap:

You helped me very much, it's nice that you've explained wtf with all those weird words :lol:
Shymon
 
Posts: 6
Joined: Sat Dec 04, 2010 12:01 am


Return to Thyme scripting

Who is online

Users browsing this forum: No registered users and 6 guests