Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
4 registered members (AndrewAMD, TipmyPip, NewbieZorro, Grant), 14,196 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
can someone pls help me converter this to lice-c.. #250922
02/10/09 19:23
02/10/09 19:23
Joined: Nov 2008
Posts: 29
Philippines
ZeroEight Offline OP
Newbie
ZeroEight  Offline OP
Newbie

Joined: Nov 2008
Posts: 29
Philippines
it's a rain particle
i got it from easy particle,problem is easy particle only generates .wdl files.
i already tried it to converter,but im having problem with the part of "function rain()".
im counting on you guys,tnx in advance..

/////////////////////////////////////////////////////////////
bmap rainBmap = <drop.tga>;
VAR rainAnzahlPartikel = 12; //number of particles used for this effect


Function rain_spec_fun()
{
my.alpha -= 0 *time;
IF(My.alpha < 0) { my.alpha = 0; my.lifespan = 0; }
my.skill_b += 0.03;
my.skill_c = 6 - my.skill_b;
if(my.skill_c < 0) { my.lifespan = 0; }
}

Function rainspezial()
{
my.blue = 128 ;
my.green = 128 ;
my.red = 128 ;
my.skill_c = 0; my.skill_b = 0;
my.bmap = rainBmap; //the effect bitmap
my.vel_x = random( 0 ) - 0 ;
my.vel_y = random( 0 ) - 0 ;
my.vel_z = -40 ;
my.size = 14 ;
my.alpha = 100 ;
my.x += random(1000)-500;
my.y += random(1000)-500;
my.z += random(100)-50;
my.gravity = 10 ;
my.streak = off;
my.flare = off;
my.bright = off;
my.beam = off;
my.move = on;
my.transparent = on;
my.function = rain_spec_fun;
}


Function rain()
{
while(1)
{
rainAnzahlPartikel = 12;
var myPos[3];
vec_set(myPOS,camera.x);
temp.x = COS(camera.pan);
temp.y = SIN(camera.pan);
temp.Z = 600*COS(camera.tilt);
MyPos.X = myPos.X + temp.Z*temp.X;
MyPos.Y = myPos.Y + temp.Z*temp.Y;
MyPos.Z = myPos.Z + 600*SIN(camera.TILT);
MyPos.Z = Camera.Z + 800;
effect(rainspezial,max(1,int(rainAnzahlPartikel*time)),MyPOS,nullvector);
wait(1);
}
}


action rain_action
{
my.invisible = on;
My.passable = on;
rain();
}

/////////////////////////////////////////////////////////////

Re: can someone pls help me converter this to lice-c.. [Re: ZeroEight] #251040
02/11/09 11:00
02/11/09 11:00
Joined: Nov 2008
Posts: 29
Philippines
ZeroEight Offline OP
Newbie
ZeroEight  Offline OP
Newbie

Joined: Nov 2008
Posts: 29
Philippines
up..

Re: can someone pls help me converter this to lice-c.. [Re: ZeroEight] #251071
02/11/09 14:07
02/11/09 14:07
Joined: Aug 2008
Posts: 2,838
take me down to the paradise c...
Cowabanga Offline
Expert
Cowabanga  Offline
Expert

Joined: Aug 2008
Posts: 2,838
take me down to the paradise c...
Don't use that "up" !

This should work:
Code:
BMAP* rainBmap = "drop.tga";
var rainAnzahlPartikel = 12; //number of particles used for this effect
#define lifespan skill70
#define bmap skill71
#define vel_x skill72
#define vel_y skill73
#define vel_z skill74
#define size skill75
#define gravity skill76
function rain_spec_fun()
{
	my.alpha -= 0 * time_step;
	if(my.alpha < 0) { my.alpha = 0; my.lifespan = 0; }
	my.skill_b += 0.03;
	my.skill_c = 6 - my.skill_b;
	if(my.skill_c < 0) { my.lifespan = 0; }
}

function rainspezial()
{
	my.blue = 128 ;
	my.green = 128 ;
	my.red = 128 ;
	my.skill_c = 0; my.skill_b = 0;
	my.bmap = rainBmap; //the effect bitmap
	my.vel_x = random( 0 ) - 0 ;
	my.vel_y = random( 0 ) - 0 ;
	my.vel_z = -40 ;
	my.size = 14 ;
	my.alpha = 100 ;
	my.x += random(1000)-500;
	my.y += random(1000)-500;
	my.z += random(100)-50;
	my.gravity = 10 ;
	reset(my, STREAK);
	reset(my, BRIGHT);
	reset(my, BEAM);
	set(my, MOVE);
	set(my, TRANSLUCENT);
	my.event = rain_spec_fun;
}


function rain()
{
	while(1)
	{
		rainAnzahlPartikel = 12;
		var mypos[3];
		VECTOR temp;
		vec_set(mypos,camera.x);
		temp.x = cos(camera.pan);
		temp.y = sin(camera.pan);
		temp.z = 600*cos(camera.tilt);
		mypos.x = mypos.x + temp.z*temp.x;
		mypos.y = mypos.y + temp.z*temp.y;
		mypos.z = mypos.z + 600*sin(camera.tilt);
		mypos.Z = camera.z + 800;
		effect(rainspezial,max(1,int(rainAnzahlPartikel*time_step)),mypos,nullvector);
		wait(1);
	}
}


action rain_action()
{
	set(my, INVISIBLE);
	set(my, PASSABLE);
	rain();
}


Re: can someone pls help me converter this to lice-c.. [Re: Cowabanga] #251129
02/11/09 18:09
02/11/09 18:09
Joined: Nov 2008
Posts: 29
Philippines
ZeroEight Offline OP
Newbie
ZeroEight  Offline OP
Newbie

Joined: Nov 2008
Posts: 29
Philippines
"max(1,int(rainAnzahlPartikel*time_step))" -- having an error here sir,max is an undeclare indetifier.what should i do here??

by the thanks for reply and sorry about the up thing...

Re: can someone pls help me converter this to lice-c.. [Re: ZeroEight] #251134
02/11/09 18:18
02/11/09 18:18
Joined: Aug 2007
Posts: 1,922
Schweiz
Widi Offline
Serious User
Widi  Offline
Serious User

Joined: Aug 2007
Posts: 1,922
Schweiz
use maxv, max is the old syntax of c-script

Re: can someone pls help me converter this to lice-c.. [Re: Widi] #251136
02/11/09 18:24
02/11/09 18:24
Joined: Nov 2008
Posts: 29
Philippines
ZeroEight Offline OP
Newbie
ZeroEight  Offline OP
Newbie

Joined: Nov 2008
Posts: 29
Philippines
var mypos[3]; --- here too sir,having a problem here."x is not a member of function", should i make it VECTOR??thanks for the reply sir..

Re: can someone pls help me converter this to lice-c.. [Re: ZeroEight] #251143
02/11/09 18:37
02/11/09 18:37
Joined: Aug 2007
Posts: 1,922
Schweiz
Widi Offline
Serious User
Widi  Offline
Serious User

Joined: Aug 2007
Posts: 1,922
Schweiz
Yes --> VECTOR mypos = {x=0;y=0;z=0;}

Re: can someone pls help me converter this to lice-c.. [Re: Widi] #251577
02/13/09 20:25
02/13/09 20:25
Joined: Nov 2008
Posts: 29
Philippines
ZeroEight Offline OP
Newbie
ZeroEight  Offline OP
Newbie

Joined: Nov 2008
Posts: 29
Philippines
effect(rainspezial,max(1,int(rainAnzahlPartikel*time_step)),mypos,nullvector);

i have an error here sir,syntax error.how come??

Re: can someone pls help me converter this to lice-c.. [Re: ZeroEight] #251578
02/13/09 20:32
02/13/09 20:32
Joined: Sep 2008
Posts: 68
T
Tai Offline
Junior Member
Tai  Offline
Junior Member
T

Joined: Sep 2008
Posts: 68
Max is maxv. Probably why you are getting the error.

Re: can someone pls help me converter this to lice-c.. [Re: Tai] #251580
02/13/09 20:58
02/13/09 20:58
Joined: Nov 2008
Posts: 29
Philippines
ZeroEight Offline OP
Newbie
ZeroEight  Offline OP
Newbie

Joined: Nov 2008
Posts: 29
Philippines
oh sori,forgot to tell about that..i already change it to maxv.i think im having a problem about the int..is it integer or what??
btw thanks for the reply sir..

Page 1 of 2 1 2

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

Gamestudio download | 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