A bomb made only using script.
It spawns 200 balls with tracers in the impact point. This is why it can cause some lagg, because of the 200^2 contacts, but it will lag only for about one second so it's not that horrible
.
Hope it's usefull.
Oh and thee scripts :
In console :
Code 1 :
position = [0, 0]
Code 2 :
ball () => {scene.addcircle {radius := 0.2; color := [1.0, 1.0, 0.0, 1.0]; restitution := 0.85; density := 5; pos := scene.my.position}; scene.addpen {radius := 0.2; pos := scene.my.position; color := [1.0, 1.0, 0.0, 1.0]}}
Code 3 :
explosion () => {scene.addcircle {radius := 0.2; color := [1.0, 1.0, 0.0, 1.0]; restitution := 0.85; pos := scene.my.position + [0.1, 0]}; scene.addpen {radius := 0.2; pos := scene.my.position + [0.1, 0]; color := [1.0, 1.0, 0.0, 1.0]}ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball ;ball }
OnCollide Code :
(e)=>{scene.my.position = e.pos; oncollide = (e)=>{}; explosion}
maybe there are some mistakes in the tracer code but it works