Sorry it actually kinda works, i didn't find the controls the first time i ran it
Now it's still not working. You didn't declare the scene.my.power variable in the console, so it spawns 1m balls and therefore the car blows up at the first stroke lol
If you don't know how to use scene.my.variables, I'll explain, otherwise just ignore this:
Press the tilde key or F10 to bring the console down. write
scene.my.power = 0.0625
and press Enter. You can put any value there cause it'll be changed as soon as the scene starts
I reccomend throttling with the balls' density instead of radius as you can make it smoother. It's the standard. also those controls are really weird, i'd use the standard ones like I - ignition, X - starter, W - accelerator, and a variable clutch - but that's your decision
Also to improve your scripts you can use If clauses to ask something to Algodoo, such as on your indicator variable:
Instead of using a variable for the indicator, you can ask scene.my.ignition if it is higher than 0. so you would put this in the color part of an indicator object:
{Scene.my.ignition > 0? [1,0,0,1]:[0,0,0,1]}
This would return red if ignition > 0, or black if ignition = 0. FOr the otehr operators you have to use < for is minor than and == for is equal than
The only way to declare variables is by console, and you should use as little vars as possible cause they lag some. that's why i told you about if clauses
The scene may work for you, but if you download it once you uploaded it in Algobox everything goes to shit and beyond, trust me it happened to me
But your scenes are awesome! With some more practice on thyme you'll make awesome things, hopefully on less Hz
I never liked recoil guns here because of all the fine tuning you have to make, but this one works OK. If you want more rate of fire make the bolt and the block which it collides with have restitution 1, so the bolt actually bounces and loads faster. also make the mag have spring constant 600 so it'll load
The extractor and ejector (and bolt lower lip) are really bad. When the round is chambered, it has too much place to move, and therefore the extractor doesn't catch the shell. Also the ejector is too high, it should be a lot lower than that, and it shouldn't be the same as the mag's lip. And the bolt should have a straight piece where the shell can rest onto when it is being extracted, else after you fire the shell starts falling
The extractor is the claw thingy that catches the shell and the ejector is the thing the shell collides with to fly off
not really 100% accurate. what you should be measuring is the force those balls apply to an object, also taking in consideration that balls are spawned farther left than where you spawn them
Good idea tho
You should probably use more frequency for your scenes. Physics are very crudely calculated in Algodoo when you use 60 Hz, adding for example stretchable axles and objects that penetrate into each other (let's not even talk about water), but low frequencies allow for more objects without lag - if you use very few geometries on your scenes, like, less than 100, then you should consider cranking the frequency bar up to 1200 Hz as it won't affect performance(Gear at the upper left corner -> Simulation -> Simulation frequency). Also use very high density on objects thet need accurate collisions, if you want you can make the test: stack two objects, add a thruster that pushes the upmost object down and see how much force the system can withstand without doing weird things; then increase the density up to 50 or 100 and try again
To avoid having to do that, you can check if the simulation is running before executing the code in update, like:
update = (e)=>{
sim.running? {your code here}:{}
}
Thanks, I might have overlooked some details of the skin, since it literally stopped ejecting properly when I was finishing the skin - just forgot to finish it
As for the sights, I just noticed the front sight isn't the Argy variation and the backdrop for the internals is a good idea, I'm just worried it would lack details and look too plain, but I'll try.
I think the stock needs a plastic buttplate and i might add a grainy plastic texture to the fake leather/plastic parts.
I was going to make the ejection port side, but I didn't know how to sneak a charging handle in there
And what happened with the collab thing? Ask me anytime, I'll be mostly free this month
I'm pretty sure it has worse accuracy in this setup, but maybe adding a stock and a grip behind the mag (and moving the trigger there) would do the trick. i wanted this to be a bullpup at first but then i thought just that
You can correct some errors still:
When the engine is running at max throttle, the spawner thingies that spin get too unbalanced. to fix this you have to copy them, rotate them 180ยบ and make them collision layer none.
Also you should use circles, this script works like a charm:
keys.IsDown("Up") ? {
scene.addCircle({
radius := 0.09;
density := 500;
collideSet := 24;
pos := pos;
friction = 0;
restitution = 0;
zDepth := 200;
vel = entity.vel;
color = [1, 0, 0, 0.3]
})
} : {
scene.addCircle({
radius := 0.04;
density := 2;
collideSet := 24;
zDepth := 200;
pos := pos;
friction = 0;
restitution = 0;
vel = entity.vel;
color = [0, 1, 1, 0.3]
})
}
You're using sretched axles with brake to make the timing spawner. The problem with this is that brakes are not perfect. After some time they will get unsynced and your engine will fail to run or run really slow and with no torque. To fix this you can try bend:
Triple click one of the stretched axles that connect flywheel with flywheel. This will select all of them, so now right click them
Go to Script menu
Find bend, bendConstant and bendTarget
Put:
bend = true
bendConstant = +inf
bendTarget = 0.7
Now deactivate the brake on the axles. You will see that the pistons arrange and look like a wave now
Now triple click one of the axles that connect a flywheel with a timing spawner
Find bend, bendConstant and bendTarget on the script menu
Put:
bend = true
bendConstant = +inf
bendTarget = 0
Now deactivate the brake on these axles. you shouldn't note much of a change in these
After doing all that I can get 95 rad/s off the engine