Keyboard Input for Pinball Machine
7 posts • Page 1 of 1
Keyboard Input for Pinball Machine
My son would like to make a pinball machine, but we can't figure
out how to make things move when we press e.g. the spacebar.
Can one have a keyboard-controlled motor in algodoo?
out how to make things move when we press e.g. the spacebar.
Can one have a keyboard-controlled motor in algodoo?
- DanKegel
- Posts: 3
- Joined: Sat Aug 07, 2010 5:58 pm
Re: Keyboard Input for Pinball Machine
Yes, you can make the motor, right click on it, and a menu should pop up. Go to hinges and hover over it. Then at the botom you will see a thing for inputing keys. Click on that and type the key you want. There are some examples on Algobox.
-

ducky21 - Posts: 301
- Joined: Tue Aug 03, 2010 8:58 pm
Re: Keyboard Input for Pinball Machine
please note that you cant use pause as it is set to pause and start the simulation
When asking for help, READ THE STICKIES!
- electronicboy
- Posts: 1694
- Joined: Mon Aug 31, 2009 6:18 pm
Re: Keyboard Input for Pinball Machine
electronicboy wrote:please note that you cant use pause as it is set to pause and start the simulation
What he was supposed to say is that you can't use the space key in your simulations as it is already reserved for Algodoo (Stop/ Start)

You will also need to mess around with the material settings of the bumper and the pinball.
Good luck!
-

Mystery - Posts: 2802
- Joined: Thu Sep 03, 2009 1:16 pm
- Location: Southern Australia
Re: Keyboard Input for Pinball Machine
WHOOPS!
Exactly what i was mant to say.
Must remember to reread what i have wrote especcialy while on my phone.
And in the picture, he means the spring will stop it going too high, and will bring it back to position.
I also think you might have to go into the options screen, and under interface (i think, cant check right now) and select the medium setting for the ability to use the keyboard.
Exactly what i was mant to say.
Must remember to reread what i have wrote especcialy while on my phone.
And in the picture, he means the spring will stop it going too high, and will bring it back to position.
I also think you might have to go into the options screen, and under interface (i think, cant check right now) and select the medium setting for the ability to use the keyboard.
When asking for help, READ THE STICKIES!
- electronicboy
- Posts: 1694
- Joined: Mon Aug 31, 2009 6:18 pm
Re: Keyboard Input for Pinball Machine
Note-the previous post was a spambot by the name of arrgorilla.
The post before that was by electronicboy.
All spambots are to be reported, right? Just want to make sure... I don't want to get banned for reporting a spambot when it's illegal.
But, as this topic has been bumped- by a spambot- I feel obliged to add a few more hints for the pinball machine.
Instead of a spring as shown in Mystery's picture, you could enter a key control for the Back key then re-check the motor checkbox. You may then need to check the Reversed box. This will make the motor turn one way when the key is pressed and the other when the key is released. You will also need to add some boxes so the flipper will not spin all the way around.
You will probably want the restitution of the ball to be exactly 1 so the flippers and walls and such will absorb a little of the ball's energy if their restitution is less than 1. For things that the ball should bounce off harder than it originally hit, their restitution should be greater than 1.
I think the only way to keep score would be to script all "scoring" objects so in their onCollide:
This will add 1 to scene.my.score whenever the object with the code is touched.
But first you will need to declare scene.my.score in the console. Press F11 or ~ and type:
If you do not do this first, something weird will happen and it will not work.
That is all I am going to tell you, see the Thyme scripting section for more info.
The post before that was by electronicboy.
All spambots are to be reported, right? Just want to make sure... I don't want to get banned for reporting a spambot when it's illegal.
But, as this topic has been bumped- by a spambot- I feel obliged to add a few more hints for the pinball machine.
Instead of a spring as shown in Mystery's picture, you could enter a key control for the Back key then re-check the motor checkbox. You may then need to check the Reversed box. This will make the motor turn one way when the key is pressed and the other when the key is released. You will also need to add some boxes so the flipper will not spin all the way around.
You will probably want the restitution of the ball to be exactly 1 so the flippers and walls and such will absorb a little of the ball's energy if their restitution is less than 1. For things that the ball should bounce off harder than it originally hit, their restitution should be greater than 1.
I think the only way to keep score would be to script all "scoring" objects so in their onCollide:
- Code: Select all
scene.my.score = scene.my.score + 1
This will add 1 to scene.my.score whenever the object with the code is touched.
But first you will need to declare scene.my.score in the console. Press F11 or ~ and type:
- Code: Select all
scene.my.score = 0
If you do not do this first, something weird will happen and it will not work.
That is all I am going to tell you, see the Thyme scripting section for more info.
Matthias Wandel is epic, in my humble opinion.
I love my brain...
ARE YA HAPPY NOW?????
Thymechanic/Phundamentalist
Recently, I discovered something a lot of you probably already knew: Minecraft is awesome.
Due to this, I may not be as active as usual for a while.
I love my brain...
TC42 wrote:Also, your sig is too big, please change it.
ARE YA HAPPY NOW?????
Thymechanic/Phundamentalist
Recently, I discovered something a lot of you probably already knew: Minecraft is awesome.
Due to this, I may not be as active as usual for a while.
-

Someone Else - Posts: 1147
- Joined: Sun Nov 21, 2010 10:53 pm
- Location: The Milky Way Galaxy
Re: Keyboard Input for Pinball Machine
i think it may be a little to late for a few hints....
just considering the fact that his list visit was on the day that he started this topic...
just considering the fact that his list visit was on the day that he started this topic...
When asking for help, READ THE STICKIES!
- electronicboy
- Posts: 1694
- Joined: Mon Aug 31, 2009 6:18 pm
7 posts • Page 1 of 1
Who is online
Users browsing this forum: No registered users and 7 guests



