water spawning rocket
Posted: Wed Sep 23, 2009 9:52 am
Create a tall box and set it's collision group to A only (im musn't collide with water). It's base of the rocket.
Then create second box on the top of it, set it's collision to "collides with water" only, and set it's attraction to something like -10000.
Create a small box and a circle on the bottom of the rocket, set their collision group to B.
Fixate the box to the base. Put a +inf power 600 rpm hinge on the circle in that manner so it will collide rapidly with the box.
Open the Scripting menu of the circle,
change the onCollide of the circle to: (e)=>{Scene.addWater({vecs = [e.pos]})}
The basic rocket is complete, but's very unstable. Let's fix this
Using a polygon drawing tool, create finns. Set their airfrictionmult in scripting menu to high value (100+). They are supposed only to stabilise the rocket, so they don't need any collision group. Attach them to the rocket body by hinges.
Let's make the rocket start after pressing a key.
Select the fins without selecting hinges attaching them and move them to inside of the rocket. Then create a box, make it opaque and place it on the rocket. Fixate it to the body, finns and spawning circle. Set some destroy key to it.
Now by pressing that key, yo'll start the engine and extend the fins.
The rockets like this can be stacked on each other to make multistage rockets. Just extend the "blocking" box beyond the bottom of the stage and fixate it to the previous stage.
Multistage rockets need only one water repelling box on the top. Using many boxes can cause stability issues.
Used water particles can be destroyed by killer, but in most causes it's not necessary since they destroy themselves quickly after leaving the rocket.
Then create second box on the top of it, set it's collision to "collides with water" only, and set it's attraction to something like -10000.
Create a small box and a circle on the bottom of the rocket, set their collision group to B.
Fixate the box to the base. Put a +inf power 600 rpm hinge on the circle in that manner so it will collide rapidly with the box.
Open the Scripting menu of the circle,
change the onCollide of the circle to: (e)=>{Scene.addWater({vecs = [e.pos]})}
The basic rocket is complete, but's very unstable. Let's fix this
Using a polygon drawing tool, create finns. Set their airfrictionmult in scripting menu to high value (100+). They are supposed only to stabilise the rocket, so they don't need any collision group. Attach them to the rocket body by hinges.
Let's make the rocket start after pressing a key.
Select the fins without selecting hinges attaching them and move them to inside of the rocket. Then create a box, make it opaque and place it on the rocket. Fixate it to the body, finns and spawning circle. Set some destroy key to it.
Now by pressing that key, yo'll start the engine and extend the fins.
The rockets like this can be stacked on each other to make multistage rockets. Just extend the "blocking" box beyond the bottom of the stage and fixate it to the previous stage.
Multistage rockets need only one water repelling box on the top. Using many boxes can cause stability issues.
Used water particles can be destroyed by killer, but in most causes it's not necessary since they destroy themselves quickly after leaving the rocket.