explosion/bomb
4 posts • Page 1 of 1
explosion/bomb
how can I make a bomb so that when it collides, it explodes and not only destroys the bomb but the explosion slowly fades out? I'm trying to use the script for the bomb: onCollide = (e)=>{scene.addcircle{radius = .1; color = [0,0,0,1]; pos=e.pos} * 8}
for the explosion fade-out, i have no idea what to do. can somebody help me please?
for the explosion fade-out, i have no idea what to do. can somebody help me please?
Phundementalism?
Ain't nobody got thyme fo dat.
Ain't nobody got thyme fo dat.
-

mold999 - Posts: 225
- Joined: Sun Jan 02, 2011 1:35 am
- Location: [176436, 3763234]
Re: explosion/bomb
All I can think is spawn a laser with 1 maxRays in a partially transparent circle. The laser would be scripted so the circle's density and opacity both decrease slowly over time:
This way, the circle will become invisible at about the same time its density becomes 0 and auto-deletes.
Then again, I don't know how to spawn a laser.
Or:
Ask Kilinich.
- Code: Select all
e.geom.density = e.geom.density - .02;
e.geom.color = [0, 0, 0, e.geom.color(3) - .01]
This way, the circle will become invisible at about the same time its density becomes 0 and auto-deletes.
Then again, I don't know how to spawn a laser.
Or:
Ask Kilinich.
Matthias Wandel is epic, in my humble opinion.
I love my brain...
ARE YA HAPPY NOW?????
Thymechanic/Phundamentalist
Recently, I discovered something a lot of you probably already knew: Minecraft is awesome.
Due to this, I may not be as active as usual for a while.
I love my brain...
TC42 wrote:Also, your sig is too big, please change it.
ARE YA HAPPY NOW?????
Thymechanic/Phundamentalist
Recently, I discovered something a lot of you probably already knew: Minecraft is awesome.
Due to this, I may not be as active as usual for a while.
-

Someone Else - Posts: 1147
- Joined: Sun Nov 21, 2010 10:53 pm
- Location: The Milky Way Galaxy
Re: explosion/bomb
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: explosion/bomb
Thanks, Kilinich.
And Someone Else.
And Someone Else.
Phundementalism?
Ain't nobody got thyme fo dat.
Ain't nobody got thyme fo dat.
-

mold999 - Posts: 225
- Joined: Sun Jan 02, 2011 1:35 am
- Location: [176436, 3763234]
4 posts • Page 1 of 1
Who is online
Users browsing this forum: No registered users and 2 guests



