Erase Water Drops onCollide
17 posts • Page 1 of 1
Erase Water Drops onCollide
Hi guys, need help with water drops:
The goal is to delete every water drop when it collides with object, but killer-object's script
seems doesn't affect water and
just deletes water from all scene..
any ideas?
The goal is to delete every water drop when it collides with object, but killer-object's script
- Code: Select all
e.other.density := 0;
seems doesn't affect water and
- Code: Select all
scene.erasewater
just deletes water from all scene..
any ideas?
- osiris
- Posts: 8
- Joined: Mon Jul 04, 2011 12:52 pm
Re: Erase Water Drops onCollide
"killer" object, collided only with water 
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: Erase Water Drops onCollide
i've tried that, in that case other scripts, from the 'killer' object won't fire..
i'm making an engine model, and everything was going not bad, except i can't make it consume fuel
so one drop of fuel makes to much explosions and ruins all cylinder cycle..
i'm making an engine model, and everything was going not bad, except i can't make it consume fuel
- osiris
- Posts: 8
- Joined: Mon Jul 04, 2011 12:52 pm
Re: Erase Water Drops onCollide
the only workaround I see is to use circles instead of water 
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: Erase Water Drops onCollide
Alternatively, you could check the 'killer' box in the materiel menu, or i have missed a vital point because i read the topic too quickly.
-

bozbez - Posts: 149
- Joined: Tue Apr 12, 2011 7:01 pm
Re: Erase Water Drops onCollide
Sorry if missed something, but what about using a killer object to delete the water drops and make the rest of the things "imortal" ?
Gears are my favorite mechanism. Why do you think I have this username ? 
Make sure to spend some time to see my work http://www.algodoo.com/algobox/profile.php?id=96, just to kill sometime
PS: Gear97™ Is a trademark from me. Any unauthorized use of the term "Gear" for usernames or other naming ideas will be punished.
Make sure to spend some time to see my work http://www.algodoo.com/algobox/profile.php?id=96, just to kill sometime
PS: Gear97™ Is a trademark from me. Any unauthorized use of the term "Gear" for usernames or other naming ideas will be punished.
-

Gear97 - Posts: 146
- Joined: Sat Jan 02, 2010 5:34 pm
- Location: Brazil
Re: Erase Water Drops onCollide
bozbez wrote:Alternatively, you could check the 'killer' box in the materiel menu, or i have missed a vital point because i read the topic too quickly.
yep, i wrote about it in 3d post..
Kilinich wrote:the only workaround I see is to use circles instead of water
yeah... but that just sucks.. kills all beauty of realism, and especeally my gas pump
- osiris
- Posts: 8
- Joined: Mon Jul 04, 2011 12:52 pm
Re: Erase Water Drops onCollide
Gear97 wrote:Sorry if missed something, but what about using a killer object to delete the water drops and make the rest of the things "imortal" ?
Guys, i just wrote about it:
and it's vital..osiris wrote:i've tried that, in that case other scripts, from the 'killer' object won't fire..
- osiris
- Posts: 8
- Joined: Mon Jul 04, 2011 12:52 pm
Re: Erase Water Drops onCollide
Hey osiris what do you mean by won´t fire I am not getting it ? Do you mean that because the killer kills anything it touches you can't use oncollide ?
Because if it is about this, I said in my last post that you can make things "imortal".
Sorry again if I missed some other thing.
Because if it is about this, I said in my last post that you can make things "imortal".
Sorry again if I missed some other thing.
Gears are my favorite mechanism. Why do you think I have this username ? 
Make sure to spend some time to see my work http://www.algodoo.com/algobox/profile.php?id=96, just to kill sometime
PS: Gear97™ Is a trademark from me. Any unauthorized use of the term "Gear" for usernames or other naming ideas will be punished.
Make sure to spend some time to see my work http://www.algodoo.com/algobox/profile.php?id=96, just to kill sometime
PS: Gear97™ Is a trademark from me. Any unauthorized use of the term "Gear" for usernames or other naming ideas will be punished.
-

Gear97 - Posts: 146
- Joined: Sat Jan 02, 2010 5:34 pm
- Location: Brazil
Re: Erase Water Drops onCollide
Gear97
Yep, you got it right! but making things immortal won't help.. because oncollide must work with the object, wich must disapear
it's easy when i can use density := 0 , but i need to do this with water, wich seems to be immune to density=0 trick.. let me explain..
the trouble is: i'm making an engine, so the on ignition a drop of fuel must disappear (erasing water) and a flame must appear... i'm doing it like this: when water touches spark-plug onCollide script must create a flame and erase water.. making a spark-plug a "killer" object prevents script from creating a flame, and not deleting water (witch i pretend to be a fuel
) just ruins the whole idea.. 
Gear97 wrote: Do you mean that because the killer kills anything it touches you can't use oncollide ?
Yep, you got it right! but making things immortal won't help.. because oncollide must work with the object, wich must disapear
Last edited by osiris on Mon Jul 04, 2011 9:54 pm, edited 1 time in total.
- osiris
- Posts: 8
- Joined: Mon Jul 04, 2011 12:52 pm
Re: Erase Water Drops onCollide
I see ... Thank you for the extra information, right I have no idea but I will see if I think of something. 
EDIT: Oh nice ! More information!!!
EDIT: Oh nice ! More information!!!
Last edited by Gear97 on Tue Jul 05, 2011 1:07 am, edited 2 times in total.
Gears are my favorite mechanism. Why do you think I have this username ? 
Make sure to spend some time to see my work http://www.algodoo.com/algobox/profile.php?id=96, just to kill sometime
PS: Gear97™ Is a trademark from me. Any unauthorized use of the term "Gear" for usernames or other naming ideas will be punished.
Make sure to spend some time to see my work http://www.algodoo.com/algobox/profile.php?id=96, just to kill sometime
PS: Gear97™ Is a trademark from me. Any unauthorized use of the term "Gear" for usernames or other naming ideas will be punished.
-

Gear97 - Posts: 146
- Joined: Sat Jan 02, 2010 5:34 pm
- Location: Brazil
Re: Erase Water Drops onCollide
Gear97
anyway, thanks for trying to help
also, i was editing my previous post just when you answered it.. so there is some more info about my scene..
anyway, thanks for trying to help
also, i was editing my previous post just when you answered it.. so there is some more info about my scene..
- osiris
- Posts: 8
- Joined: Mon Jul 04, 2011 12:52 pm
Re: Erase Water Drops onCollide
You could place two identical spark plugs exactly on top of each other, one killer that collides only with water, the other non-killer with the script that spawns the flame. (credit Kilinich, I think)
Alternatively, you could spawn a killer circle that collides only with water, and deletes itself onCollide.
(credit skateboardinben)
Alternatively, you could spawn a killer circle that collides only with water, and deletes itself onCollide.
(credit skateboardinben)
- Code: Select all
scene.addCircle({
collideSet := 0;
killer := true;
onCollide := (e)=>{
collideWater = false;
airFrictionMult = -inf}
})
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: Erase Water Drops onCollide
Someone Else,
Man, thanks! That's perfect: i'll just add second smoke-circle (i'm already making one for exhaust system), wich will kill water and disappear!
but i still can't believe that there is no script way for killing water..
anyway, more smoke makes engine look more powerfull
Man, thanks! That's perfect: i'll just add second smoke-circle (i'm already making one for exhaust system), wich will kill water and disappear!
but i still can't believe that there is no script way for killing water..
anyway, more smoke makes engine look more powerfull
- osiris
- Posts: 8
- Joined: Mon Jul 04, 2011 12:52 pm
Re: Erase Water Drops onCollide
DAMN!
same thing: a killer-circle doesn't destruct itself: self-erasing script won't fire with killer-object - a water drop erased on touch and oncollide-script won't start..
Placing a killer object under the same non-killer object with script also won't help: they won't work both, or drop is erased by killer, or script work, but water wont get to the killer because it contacts with a script-containing object...
so, here i am, just where i started...
same thing: a killer-circle doesn't destruct itself: self-erasing script won't fire with killer-object - a water drop erased on touch and oncollide-script won't start..
Placing a killer object under the same non-killer object with script also won't help: they won't work both, or drop is erased by killer, or script work, but water wont get to the killer because it contacts with a script-containing object...
so, here i am, just where i started...
- osiris
- Posts: 8
- Joined: Mon Jul 04, 2011 12:52 pm
Re: Erase Water Drops onCollide
Can you use immortal geoms? I think, otherwise, that Kilinich is right, you will have to use circles, as there is no script menu for water, nor any known way to delete individual water particles. And oncollide functions aren't called with killer objects (bug?). Maybe if you posted the engine you're working on, it would help...
-

TC42 - Posts: 984
- Joined: Sun Jan 09, 2011 1:53 pm
- Location: $ sudo apt get-install sandwich_
Re: Erase Water Drops onCollide
You could make the spawned killer circle collide on, say, E and spawn two of them.
I have used this technique, too. Credit on this goes to davidz40.
Man, how in the world did I think that self-deleting a killer would work...
- Code: Select all
for(2, (i)=>{
scene.addCircle({
collideSet := 32;
killer := true;
pos := e.pos
})
})
I have used this technique, too. Credit on this goes to davidz40.
Man, how in the world did I think that self-deleting a killer would work...
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
17 posts • Page 1 of 1
Who is online
Users browsing this forum: No registered users and 4 guests





