Page 1 of 1

Help me with spawn engines please??

PostPosted: Fri Jul 10, 2015 4:55 am
by Epic_SkyPilot
Ok I have a few questions regarding spawn engines.

1 - How do I prevent the creation of multiple balls spawning?
Sometimes my pistons stick to the scripted "spark plug" for just an extra millisecond, causing extra objects to be spawned, sometimes up to 3 at a time. I've tried fine tuning the spring (splitting hairs) so that it just BARELY touches, I've tried making the plugs very bouncy, so that the piston bounces off immediately when touching, but I can't seem to figure it out.

2 - How do I make it smooth?
My engines always fluctuate in their revs, it's never consistent. I've heard something about the inertiaMultiplier, but I have no idea what that is. It's not just RPMs though, my pistons always glitch into the cylinder walls under heavy acceleration, no matter how heavy I make the pistons and the cylinder walls, it just glitches through and slows down the stroke, even on 300 Hz. So if someone could explain how to make it smooth, that'd be great.

3 - How to control RPM limits?
I know that in some of the scenes I've downloaded, their engines had rev limiters, how would I go about making one of those? The only idea I have is making a hinge on the flywheel, and have it scripted to brake for just a split second when the motor reaches a certain RPM. But, I'm sure that's not the proper way to do it, and I have no idea how I'd script that anyway.

4 - Lastly, how do I make a tachometer?
Ok this one is just too much to type. I've looked at countless examples and tutorials for how to go about this, but I just have no idea how to do it. Even the simple ones where it types out the RPMs on a text box, I can't do it. I look at the sample scene and even copy the exact scripts, but for some reason when I type it into the box's script menu and hit enter, it just disappears and stays blank. I've double checked how I type the code so many times, I had it correct. It's like some scripts just don't work for me but just fine for others.

I know this was a lot to read, and maybe a little too much questions. I'm sorry, but I just can't figure this stuff out, and I really want to make my first dependable engine. I know that once I make one it'll be much easier to replicate them in the future. Please guys help me out, and if you know of any tutorials step-by-step on how to make an engine, I'd be very glad to refer to that.

Re: Help me with spawn engines please??

PostPosted: Sat Jul 11, 2015 2:32 pm
by vaidas369
Hi Eric, i have three main spawn engine tutorials that might help you.


Answering questions
1. To avoid multiple objects spawning you must use OnCollide function with other objects, like circles. Look at my engine in a tutorial, they never spawn to late or to soon because of right timing. And never more that one circle per revolution.
Lasers spawns objects over, and over again. That may be your problem. Use simple objects.

2. This you'll find in tutorial #2

3. I have a tachometer/RPM's meter tutorial as well.


3. Look at tutorial #3