Gamestudio Links
Zorro Links
Newest Posts
Removing outliers from files
by jcl. 11/04/26 10:30
[MED] Import from FBX (2010) missing!!!
by rayp. 11/03/26 14:33
What are you working on?
by rayp. 11/02/26 13:57
No connection to MT4
by JeyKey II. 10/29/26 09:34
Zorro plugin for Hyperliquid.xyz
by opm. 10/28/26 13:50
Icon "OP"
by JeyKey II. 10/27/26 07:03
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
3 registered members (TipmyPip, AndrewAMD, JeyKey II), 14,277 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
MaliceTheMaker, Haitao_Ren, JimSimons, julienp, julienper
19248 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 | 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