Stop and start a motor
8 posts • Page 1 of 1
Stop and start a motor
Hello!
Does anyone know a script for stopping and starting a motor? Prefarabily upon colide of two other objects so that they can act like an external switch.
I thought perhaps it may be possible to make a script which pressed the key assigned to stop the motor upon collide of objects? Like a virtual keyboard key!
Any ways to turn a motor on and off that you chaps can come up for me will be useful! thankyou
Does anyone know a script for stopping and starting a motor? Prefarabily upon colide of two other objects so that they can act like an external switch.
I thought perhaps it may be possible to make a script which pressed the key assigned to stop the motor upon collide of objects? Like a virtual keyboard key!
Any ways to turn a motor on and off that you chaps can come up for me will be useful! thankyou
- RagtimeJoe
- Posts: 3
- Joined: Sat Jan 09, 2010 4:49 am
Re: Stop and start a motor
It is not possible to simulate a key press. You can turn a motor on and off however.
Set up a switch like this:
In the left circle put:
In the right circle put:
Get the idea?
- Code: Select all
Scene.my.motor = false
Set up a switch like this:
- Code: Select all
o\ o
In the left circle put:
- Code: Select all
scene.my.motor = false
In the right circle put:
- Code: Select all
scene.my.motor = true
Get the idea?
-
standardtoaster - Posts: 606
- Joined: Mon Aug 31, 2009 7:57 pm
Re: Stop and start a motor
motors are capable to control with keys. what else you need?
Dream of Algodoo as game development engine...
-
Kilinich - [Best bug reporter 2010]
- Posts: 2098
- Joined: Mon Aug 31, 2009 8:27 pm
- Location: South Russia
Re: Stop and start a motor
He said upon colission of two other objects. He may be making a trigger or something.
Millions of voices suddenly cried out in terror, and were suddenly silenced. Something terrible has happened.
-
RicH - [Funniest Person 2010]
- Posts: 2043
- Joined: Tue Sep 01, 2009 9:01 am
Re: Stop and start a motor
RicH wrote:He said upon colission of two other objects. He may be making a trigger or something.
Exactly I don't want to press keys for this, It must be actuated by objects within the simulation!
Mr Standardtoaster, That looks perfect! I will give it a go now and see, thankyou very much
I just thought of one more thing, is it possible to specify a specific motor so that it doesn't turn all of them off?
- RagtimeJoe
- Posts: 3
- Joined: Sat Jan 09, 2010 4:49 am
Re: Stop and start a motor
Yes. For any motor that you want affected by Scene.my.motor, put {scene.my.motor} in the motor field of a motor. Sorry if that is confusing.
-
standardtoaster - Posts: 606
- Joined: Mon Aug 31, 2009 7:57 pm
Re: Stop and start a motor
That works perfectly! Thankyou!
- RagtimeJoe
- Posts: 3
- Joined: Sat Jan 09, 2010 4:49 am
8 posts • Page 1 of 1
Who is online
Users browsing this forum: No registered users and 5 guests