Gamestudio Links
Zorro Links
Newest Posts
Newbie Questions
by fairtrader. 12/05/23 14:22
Zorro Trader GPT
by TipmyPip. 12/04/23 11:34
Square root rule
by Smallz. 12/02/23 09:15
RTest not found error
by TipmyPip. 12/01/23 21:43
neural function for Python to [Train]
by TipmyPip. 12/01/23 14:47
Xor Memory Problem.
by TipmyPip. 11/28/23 14:23
Training with command line parameters
by TipmyPip. 11/26/23 08:42
Combine USD & BTC Pairs In Asset Loop
by TipmyPip. 11/26/23 08:30
AUM Magazine
Latest Screens
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Who's Online Now
4 registered members (AndrewAMD, Quad, soulman3, Ayumi), 675 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
fairtrader, hus, Vurtis, Harry5, KelvinC
19019 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
animating water #347763
11/18/10 18:02
11/18/10 18:02
Joined: Oct 2010
Posts: 8
Malaysia
N
Nish Offline OP
Newbie
Nish  Offline OP
Newbie
N

Joined: Oct 2010
Posts: 8
Malaysia
Hi,
I want to know how to animate water in water fountain?
I already model the water fountain with static water but now i want to animate the water. if anyone know please help me.
Thank in advance.

Re: animating water [Re: Nish] #347764
11/18/10 18:09
11/18/10 18:09
Joined: May 2009
Posts: 5,367
Caucasus
3run Online
Senior Expert
3run  Online
Senior Expert

Joined: May 2009
Posts: 5,367
Caucasus
Do you mean fountain particles? Or the water?
And what version of GS you are using? You can do that with Mistymood.


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: animating water [Re: 3run] #347766
11/18/10 18:19
11/18/10 18:19
Joined: Oct 2010
Posts: 8
Malaysia
N
Nish Offline OP
Newbie
Nish  Offline OP
Newbie
N

Joined: Oct 2010
Posts: 8
Malaysia
hi,
thank you.
ya i mean fountain particles.
I'm using lite-c free version A7.

Re: animating water [Re: Nish] #347767
11/18/10 18:30
11/18/10 18:30
Joined: May 2009
Posts: 5,367
Caucasus
3run Online
Senior Expert
3run  Online
Senior Expert

Joined: May 2009
Posts: 5,367
Caucasus
I can offer this solution from AUM (45):

Here is the code:
Code:
function fade_mist()
{
    my.alpha -= 3 * time;
    my.size += 0.5 * time;
    if(my.alpha < 0) 
    {
       my.lifespan = 0;
    }
}
function fountain_mist()
{
    temp.x = random(2) - 1;
    temp.y = random(2) - 1;
    temp.z = random(1) + 1; // play with this value
    vec_set(my.vel_x,temp);
    my.bmap = smoke123_tga;
    my.size = 5;
    my.lifespan = 50;
    my.flare = on;
    my.bright = on;
    my.move = on;
    my.gravity = 0;
    my.alpha = 70;
    my.function = fade_mist;
}
function fade_particles()
{
    my.alpha -= 2 * time;
    if(content(my.x) == content_solid) // the particle is inside a solid?
    {
       effect(fountain_mist, 1, my.x, nullvector); // generate mist
       my.lifespan = 0; // don't allow the particles to continue their movement if they have hit something solid
    }
    if(my.alpha < 0)
    {
       my.lifespan = 0;
    }
}
function particle_fountain()
{
    temp.x = random(6) - 3;
    temp.y = random(6) - 3;
    temp.z = random(10) + 10; // play with this value
    vec_set(my.vel_x,temp);
    my.bmap = drop_tga;
    my.size = 1.5;
    my.flare = on;
    my.bright = on;
    my.move = on;
    my.streak = on; // if your engine version supports it
    my.gravity = 2;
    my.alpha = 80;
    my.lifespan = 50;
    my.function = fade_particles;
}
action fountain
{
    my.invisible = on;
    my.passable = on;
    while(1)
    {
       effect(particle_fountain, 15 * time, my.x, nullvector);
       wait(1);
    }
}

It's a C-SCRIPT, but you can convert it into LITE-C easily.
I've used this website to search AUMs:
GSTOOLS
If you'll need help with converting into LITE-C, let me know. I'll help. Good luck.


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: animating water [Re: 3run] #347879
11/20/10 16:07
11/20/10 16:07
Joined: Oct 2010
Posts: 8
Malaysia
N
Nish Offline OP
Newbie
Nish  Offline OP
Newbie
N

Joined: Oct 2010
Posts: 8
Malaysia
hi,
i need your help to convert C-SCRIPT in to LITE-C.
I also need another help which im having a problem with selecting the object but i already have a code to select the object.the code work like this..

1.if i select the object, the object is remain selected even if i selected another object.
2.when i perform move funtion to the object selected, the funtion work only to the last object selected even the first object selected.
3. how to unselect the object.

Re: animating water [Re: Nish] #347881
11/20/10 17:11
11/20/10 17:11
Joined: May 2009
Posts: 5,367
Caucasus
3run Online
Senior Expert
3run  Online
Senior Expert

Joined: May 2009
Posts: 5,367
Caucasus
Here is the converted script (TESTED):
Code:
BMAP* smoke123_tga = "smoke123.tga"; // change to your BMAP name
BMAP* drop_tga = "drop.tga"; // change to your BMAP name

function fade_mist(PARTICLE* p)
{
	p.alpha -= 3 * time_step;
	p.size += 0.5 * time_step;
	if(p.alpha < 0) 
	{
		p.lifespan = 0;
	}
}

function fountain_mist(PARTICLE* p)
{
	VECTOR temp;
	temp.x = random(2) - 1;
	temp.y = random(2) - 1;
	temp.z = random(1) + 1; // play with this value
	vec_set(p.vel_x,temp);
	p.bmap = smoke123_tga;
	p.size = 5;
	p.lifespan = 50;
	set(p,MOVE|BRIGHT);
	p.gravity = 0;
	p.alpha = 70;
	p.event = fade_mist;
}

function fade_particles(PARTICLE* p)
{
	p.alpha -= 2 * time_step;
	if(c_content(p.x,0) == 3) // the particle is inside a solid?
	{
		effect(fountain_mist,1,p.x,nullvector); // generate mist
		p.lifespan = 0; // don't allow the particles to continue their movement if they have hit something solid
	}
	if(p.alpha < 0)
	{
		p.lifespan = 0;
	}
}

function particle_fountain(PARTICLE* p)
{
	VECTOR temp;
	temp.x = random(6) - 3;
	temp.y = random(6) - 3;
	temp.z = random(10) + 10; // play with this value
	vec_set(p.vel_x,temp);
	p.bmap = drop_tga;
	p.size = 1.5;
	set(p,BRIGHT|MOVE|STREAK); 
	// "STREAK" if your engine version supports it
	p.gravity = 2;
	p.alpha = 80;
	p.lifespan = 50;
	p.event = fade_particles;
}

action fountain()
{
	set(my,INVISIBLE|PASSABLE);
	while(1)
	{
		effect(particle_fountain, 15 * time_step, my.x, nullvector);
		wait(1);
	}
}

About all your other requests, I guess you need to create an other threat for that, and ask there. Good luck.


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: animating water [Re: 3run] #347883
11/20/10 17:18
11/20/10 17:18
Joined: Oct 2010
Posts: 8
Malaysia
N
Nish Offline OP
Newbie
Nish  Offline OP
Newbie
N

Joined: Oct 2010
Posts: 8
Malaysia
thanks alot.


Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1