|
Re: Some short not working code
[Re: rayp]
#403054
06/13/12 19:55
06/13/12 19:55
|
Joined: Feb 2009
Posts: 3,207 Germany, Magdeburg
Rei_Ayanami
Expert
|
Expert
Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
|
MOVE If this flag is set, the particle moves with its velocity vector, and accelerates with its gravity acceleration. Type: flag, particles only I think my.move was c-script wasnt it ? Exactly.
|
|
|
Re: Some short not working code
[Re: Rei_Ayanami]
#403061
06/13/12 22:06
06/13/12 22:06
|
Joined: Aug 2011
Posts: 133 Germany, Supergeheimes Hinter-...
gameplan
OP
Member
|
OP
Member
Joined: Aug 2011
Posts: 133
Germany, Supergeheimes Hinter-...
|
So there is a difference between german and english manual. I think that my code is correct now. Everything is fantastic at this point. Thank you for your help and effort. VECTOR Weatherbox; VECTOR Wind_direction; //Movement speed and direction
Wind_direction.x = 1; Wind_direction.y = 10; Wind_direction.z = -20;
BMAP* Weather_bmap = "raindrop.tga"; //The particle bmap
function Weather_part_event(PARTICLE* p) { //keep the particle within the box vec_set(p.x,vector( cycle(p.x,camera.x-Weatherbox.x,camera.x+Weatherbox.x), cycle(p.y,camera.y-Weatherbox.y,camera.y+Weatherbox.y), cycle(p.z,camera.z-Weatherbox.z,camera.z+Weatherbox.z)));
//update the movement speed and direction vec_set(p.vel_x,Wind_direction); p.lifespan = 100; // live forever }
function Weather_part(PARTICLE* p) { //place particles at random positions within the box vec_set(p.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)); set(p, MOVE); p.bmap = Weather_bmap; p.size = random(1)+2; p.event = Weather_part_event; }
function CreateWeatherParticles(cx,cy,cz,numparticles) { Weatherbox.x = cx/2; Weatherbox.y = cy/2; Weatherbox.z = cz/2; //create the particles effect(Weather_part,numparticles,nullvector,nullvector); }
Last edited by gameplan; 06/13/12 22:10.
Version: A8 free OS: Windows 10
|
|
|
|