Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (7th_zorro), 1,390 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 2 1 2
Re: Wetterscript lite-c [Re: Widi] #300061
11/29/09 13:48
11/29/09 13:48
Joined: Aug 2009
Posts: 14
Everywhere
Webster_ Offline
Warez Kiddie
Webster_  Offline
Warez Kiddie

Joined: Aug 2009
Posts: 14
Everywhere
I did it. That error disappeared, but there are another errors: syntax error in this line: VECTOR Wind_direction= 0,0,-30 ;
I changed the line to VECTOR wind_direction; and the big error comes here:
vec_set(my.vel_x,vector(Wind_direction.x,Wind_direction.y,Wind_direction.z));
error: vel_x is not member of 'ENTITY'

Re: Wetterscript lite-c [Re: Widi] #311389
02/19/10 17:00
02/19/10 17:00
Joined: Jul 2009
Posts: 16
E
episch Offline
Newbie
episch  Offline
Newbie
E

Joined: Jul 2009
Posts: 16
so hiere is the convertet code for the rain script

Code:
VECTOR Weatherbox;
VECTOR Wind_direction;	//Movement speed and direction


function Weather_part_event(PARTICLE *p)
{
	//keep the particle within the box
	vec_set(my.x,vector(cycle(my.x,camera.x-Weatherbox.x,camera.x+Weatherbox.x),
	cycle(my.y,camera.y-Weatherbox.y,camera.y+Weatherbox.y),
	cycle(my.z,camera.z-Weatherbox.z,camera.z+Weatherbox.z)));

	//update the movement speed and direction
	vec_set(p.vel_x,vector(Wind_direction.x,Wind_direction.y,Wind_direction.z));
	
	p.lifespan = 100; // live forever
}

function Weather_part(PARTICLE *p)
{
	//place particles at random positions within the box
	vec_set(my.x,vector(camera.x+random(Weatherbox.x*2)-Weatherbox.x,
	camera.y+random(Weatherbox.y*2)-Weatherbox.y,
	camera.z+random(Weatherbox.z*2)-Weatherbox.z));
	
	p.bmap = rainParticle;
	p.size = random(1)+2;
	p.flags |= MOVE;

	p.event = Weather_part_event;
}

function CreateWeatherParticles()
{	

	Wind_direction.x = 0;
	Wind_direction.y = 0;
	Wind_direction.z = -20;
	Weatherbox.x = 1000/2;
	Weatherbox.y = 1000/2;
	Weatherbox.z = 1000/2;
	effect(Weather_part,500,nullvector,nullvector);
}



have fun with

Last edited by episch; 02/19/10 17:01.
Page 2 of 2 1 2

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