Page 1 of 2

Spawining Water, 4 n00bz!

PostPosted: Mon Sep 28, 2009 6:14 am
by Dezzeron
Welcome to spawning water, 4 n00bz. (lol) I know something like this is already on here, probley, but here it is. IN 5-(five) EASY STEPS!!

1-draw a shape;
2-select it and go to "Script menu..." (if you can't see it, go to "Options" and check the advanced mode setting);
3-search "onCollide": there should be a box with this text inside: (e)=>{} ;
4-put this code between "{" and "}" : Scene.addWater({vecs = [e.pos]});
5-type lots of "e.pos" separated by commas and a space to get lots of particles.

Hope it helped!

Re: Spawining Water, 4 n00bz!

PostPosted: Mon Sep 28, 2009 10:23 am
by Mystery
You should expand to spawning squares, circles and polygons.
And i find the name "Spawning Water, for dummies!" much more fitting.

Re: Spawining Water, 4 n00bz!

PostPosted: Tue Sep 29, 2009 4:40 am
by Jrv
No, because if he said "dummies", that would make him a hypocrite.

Re: Spawining Water, 4 n00bz!

PostPosted: Tue Sep 29, 2009 5:38 am
by niffirg1
Wow JRV.... Oh wait no that is typical.

Re: Spawining Water, 4 n00bz!

PostPosted: Wed Oct 07, 2009 7:25 pm
by Altro
how do i spawn water with lasers?

Re: Spawining Water, 4 n00bz!

PostPosted: Wed Oct 07, 2009 8:21 pm
by Sniperkasa
Altro - I think you just add this
Code: Select all
{Scene.addWater({vecs = [e.pos, e.pos, e.pos, e.pos, e.pos, e.pos, e.pos, e.pos, e.pos, e.pos, e.pos, e.pos, e.pos, e.pos, e.pos, e.pos, e.pos, e.pos, e.pos, e.pos]})}

In the laser script menu

Re: Spawining Water, 4 n00bz!

PostPosted: Wed Oct 07, 2009 8:37 pm
by standardtoaster
It's the same script but you just put it into the onLaserHit script menu.

Re: Spawining Water, 4 n00bz!

PostPosted: Fri Oct 16, 2009 6:49 pm
by simey j dude
Sniperkasa wrote:Altro - I think you just add this
Code: Select all
{Scene.addWater({vecs = [e.pos, e.pos, e.pos, e.pos, e.pos, e.pos, e.pos, e.pos, e.pos, e.pos, e.pos, e.pos, e.pos, e.pos, e.pos, e.pos, e.pos, e.pos, e.pos, e.pos]})}

In the laser script menu

standardtoaster wrote:It's the same script but you just put it into the onLaserHit script menu.


i tried that and algodoo crashed :wtf:

Re: Spawining Water, 4 n00bz!

PostPosted: Fri Oct 16, 2009 7:03 pm
by standardtoaster
Hmm... it spawned to much water. :lol: sorry about that. to make it better just have one e.pos instead. :D

Re: Spawining Water, 4 n00bz!

PostPosted: Sat Oct 17, 2009 10:12 pm
by Sniperkasa
Yeah.. I didnt remember to warn you about that xD as the laser hits so many times a second.. boom :shock:

Re: Spawining Water, 4 n00bz!

PostPosted: Thu Oct 22, 2009 11:04 pm
by Sgt. Pepper
Thanks Dezzeron for this tutorial, but, when you release 8 mission of your exciting series?

Re: Spawining Water, 4 n00bz!

PostPosted: Sat Oct 24, 2009 11:32 pm
by Dezzeron
Sgt. Pepper wrote:Thanks Dezzeron for this tutorial, but, when you release 8 mission of your exciting series?


I dont know, as soon as I get around to it, i guess. It's good to know that i'm loved! :lol:

Re: Spawining Water, 4 n00bz!

PostPosted: Tue Dec 01, 2009 10:03 pm
by abaddon
my algodoo crashes everytime i script an object or laser ... even if i kave only one e.pos ,
a have a powerful machine so i dont think its my comp ...

EDIT : i misread a few words in tutorial , now i understood it and it works .... tnx ...
tip of the day , dont sleep 3 hours per day for whole week ...

Re: Spawining Water, 4 n00bz!

PostPosted: Wed Dec 02, 2009 8:11 pm
by Papriko
The object that spawns the water self should not collide with water.I made a water spawner and just threw once a small ball against it. It turned to an infinite fountain.

Re: Spawining Water, 4 n00bz!

PostPosted: Fri Jan 08, 2010 7:38 pm
by ToshNeox
I don't seem to be able to do it. I add the code in. That doesn't work. I try fixing the code, doesn't work! :crazy: Please help!

Re: Spawining Water, 4 n00bz!

PostPosted: Tue Mar 23, 2010 11:04 pm
by Rrobba
Mystery wrote:You should expand to spawning squares, circles and polygons.
And i find the name "Spawning Water, for dummies!" much more fitting.


This.

Re: Spawining Water, 4 n00bz!

PostPosted: Thu Apr 01, 2010 10:07 am
by Mystery
Update this to current methods.
Add Version := 1 to the waters code
I.E Scene.AddWater({ version := 1; })

This is for Algodoo to make it spawn the new advanced water (uncompress-able) with out it it will make algodoo revert its water behavior to phun's less-then-perfect water..

Re: Spawining Water, 4 n00bz!

PostPosted: Sat Oct 09, 2010 7:48 pm
by phunbox1
Dose anyone know how to spawn water with velocity?

I tried but i just keeps spawning in the direction left <----

please help me!

Re: Spawining Water, 4 n00bz!

PostPosted: Sat Oct 09, 2010 10:55 pm
by Chronos
You can't.

Re: Spawining Water, 4 n00bz!

PostPosted: Sun Oct 10, 2010 2:10 am
by Mystery
Chronos wrote:You can't.

:roll:
Water has three definable variables.
Vecs, Vels and Version.
Vecs is position
Vels is the velocity.
And version defines what algorithms to use for the water. (1 = old, 2 = new)

So your pimping new code should look something like
Code: Select all
(e)=>{
    Scene.AddWater({
        vecs := [e.pos];
        version := 2;
        vels := [scene.my.ws]
    })
}

For what ever reason algodoo won't accept anything other then a variable for vels or vecs. A simple by pass of this is to create a variable of the velocity or position that you desires in my case is did
Code: Select all
scene.my.ws = [0.0, 10]

Making the water shoot straight up.

Hope this helps.

Re: Spawining Water, 4 n00bz!

PostPosted: Sun Oct 10, 2010 2:55 am
by Chronos
Oh, wow, never mind. I could've sworn you couldn't. Sorry 'bout that.

Re: Spawining Water, 4 n00bz!

PostPosted: Sun Feb 06, 2011 12:30 am
by InfinityPlayer
Sniperkasa wrote:Altro - I think you just add this
Code: Select all
{Scene.addWater({vecs = [e.pos, e.pos, e.pos, e.pos, e.pos, e.pos, e.pos, e.pos, e.pos, e.pos, e.pos, e.pos, e.pos, e.pos, e.pos, e.pos, e.pos, e.pos, e.pos, e.pos]})}

In the laser script menu


I've copied and pasted this code into the OnCollide box on my laptop, and it freezes it, and i have to close it down.

Why does it only work with ALL those "e.pos"'s in it?

Re: Spawining Water, 4 n00bz!

PostPosted: Sun Feb 06, 2011 2:40 am
by TC42
:facepalm:
Don't bump.

Anyway, I dunno why it doesn't work... It only works with one 'e.pos' on my PC. If you want to spawn more, just add another 'scene.addWater...' with all those 'e.pos's. I never spawn water though, so I don't mess up my config with incorrect scripting :D Just curious, but why do you want to spawn water?

Re: Spawining Water, 4 n00bz!

PostPosted: Sun Feb 06, 2011 4:56 am
by Mystery
That was a very acceptable bump.
Rather a bump then a new thread.

Re: Spawining Water, 4 n00bz!

PostPosted: Sun Feb 06, 2011 1:14 pm
by Rideg
Mystery wrote:That was a very acceptable bump

I'm fine with bumps as long as it sticks to the subject.