How to change density of spawned objects with onKey?
5 posts • Page 1 of 1
How to change density of spawned objects with onKey?
I built this spawn engine and I want to figure out some sort of throttle mechanism for it. I know changing the density of the spawned geoms will affect engine speed, but I'm not sure how to do that without using lasers, and having to haul around a bunch of lasers is kind of impractical. I also need someone to help me figure out how to change the spawned particles back to their original density when I let off the throttle.

(/)(°,,,°)(/)
-

pnvv - Posts: 670
- Joined: Tue Aug 26, 2014 11:46 pm
- Location: Disunited States of America
Re: How to change density of spawned objects with onKey?
Easiest method which I can describe is essentially a flipper switch, 3 rectangles laid vertically, edge ones fixated, the centre one should have a hinge at the base. Set the hinge to motor, and set the reverse key as your acceleration key, and add the thyme you wish to use on the relevant outer boxes.
When asking for help, READ THE STICKIES!
- electronicboy
- Posts: 1694
- Joined: Mon Aug 31, 2009 6:18 pm
Re: How to change density of spawned objects with onKey?
electronicboy wrote:Easiest method which I can describe is essentially a flipper switch, 3 rectangles laid vertically, edge ones fixated, the centre one should have a hinge at the base. Set the hinge to motor, and set the reverse key as your acceleration key, and add the thyme you wish to use on the relevant outer boxes.
What I mean is directly changing the properties of the spawned particles without any oncollide involved.
I also found that the thing stays at full throttle even after stop pressing the button. How do I fix this? Basically what I mean is how to change the density back after the button is released...

(/)(°,,,°)(/)
-

pnvv - Posts: 670
- Joined: Tue Aug 26, 2014 11:46 pm
- Location: Disunited States of America
Re: How to change density of spawned objects with onKey?
Please read this http://www.algodoo.com/forum/viewtopic.php?f=13&t=10580&start=0
You could write script to change some variable on key press and back to default value on release.
You could write script to change some variable on key press and back to default value on release.
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: How to change density of spawned objects with onKey?
Kilinich wrote:Please read this http://www.algodoo.com/forum/viewtopic.php?f=13&t=10580&start=0
You could write script to change some variable on key press and back to default value on release.
Thank you, that helped very much.

(/)(°,,,°)(/)
-

pnvv - Posts: 670
- Joined: Tue Aug 26, 2014 11:46 pm
- Location: Disunited States of America
5 posts • Page 1 of 1
Who is online
Users browsing this forum: No registered users and 7 guests



