CCW and KeyBind
6 posts • Page 1 of 1
CCW and KeyBind
Is it possible to bind a key so that when i press it, it makes the hinge or hinges reverse direction. I'd like to do this in a scene i'm currently making, but without having to go to the axle box and pressing the box for Reverse.

I am still learning, not an expert yet. I'm just here to have some phun.
- InfinityPlayer
- Posts: 40
- Joined: Thu Dec 09, 2010 7:57 pm
Re: CCW and KeyBind
Key activated laser (or collision switch with key activated motor).
onLaserHit (or onCollide) script
{scene.my.ccw = !scene.my.ccw}
On hinge script menu set ccw = {scene.my.ccw}
the ony problem is it will trigger every frame so I recommend do use something like this
http://www.algodoo.com/algobox/details/50835
or just a mechanical collision switch with spring like that scene under sign
http://www.algodoo.com/algobox/details/32658
onLaserHit (or onCollide) script
{scene.my.ccw = !scene.my.ccw}
On hinge script menu set ccw = {scene.my.ccw}
the ony problem is it will trigger every frame so I recommend do use something like this
http://www.algodoo.com/algobox/details/50835
or just a mechanical collision switch with spring like that scene under sign
http://www.algodoo.com/algobox/details/32658
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: CCW and KeyBind
So, how can i put that in a script box to make the hinge change direction every time i press AND release a key?
I am still learning, not an expert yet. I'm just here to have some phun.
- InfinityPlayer
- Posts: 40
- Joined: Thu Dec 09, 2010 7:57 pm
Re: CCW and KeyBind
okay... 
- Attachments
-
ccw.phn- Here you are an example
- (17.29 KiB) Downloaded 38 times
-

Kilinich - [Best bug reporter 2010]
- Posts: 2098
- Joined: Mon Aug 31, 2009 8:27 pm
- Location: South Russia
Re: CCW and KeyBind
When I click on the above link, Krill, all I get is code no scene
I am still learning, not an expert yet. I'm just here to have some phun.
- InfinityPlayer
- Posts: 40
- Joined: Thu Dec 09, 2010 7:57 pm
Re: CCW and KeyBind
InfinityPlayer wrote:When I click on the above link, Krill, all I get is code no scene
Just open it in algodoo
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
6 posts • Page 1 of 1
Who is online
Users browsing this forum: No registered users and 5 guests



