Particles by UnderLord11th Sep 2005 18:37
|
---|
Summary This will make any particles use your up down left and right keys to mvoe camera and enter key to create new particles. Simple code easy to understand. Mouse was a big help with th Description Next version will have the particles colors used displayed on the screen so people can make the colored particles in this little snipplet in there game. Code ` This code was downloaded from The Game Creators ` It is reproduced here with full permission ` http://www.thegamecreators.com sync on : sync rate 300 set display mode 1024,768,32 x#=0 y#=15 z#=15 gosub _return do if returnkey()=1 for p=1 to 4 delete particles p next p gosub _return endif if upkey()=1 then pitch camera up 5 if downkey()=1 then pitch camera down 5 if leftkey()=1 then turn camera left 5 if rightkey()=1 then turn camera right 5 sync loop _return: for p=1 to 4 make particles p,x#,y#,z# color particles p,rnd(255),rnd(255),rnd(255) rotate particles p,rnd(10000),rnd(10000),rnd(10000) set particle emissions p,rnd(255) set particle floor p,rnd(200) set particle gravity p,15 position particle emissions p,x#*cos(curveangle(1,5,6)),y#*sin(20),z#*tan(5) position Particles p,x#*cos(10),y#*sin(20),z#*HTAN(x#) next p return |