TGC Codebase Backup



Particle Principles by Swapfox98

8th Sep 2004 18:05
Summary

Set the Particles with input and variables!



Description

This uses the basic particle commands, free for you to use. Set the particle's color,gravity,chaos,etc...



Code
                                    ` This code was downloaded from The Game Creators
                                    ` It is reproduced here with full permission
                                    ` http://www.thegamecreators.com
                                    
                                    Rem Project: Particle Principles
Rem Created: 9/8/04 4:36:37 PM

Rem ***** Main Source File *****
parimeters:

` allow user to set particles.

do
input "Particle Gravity.",gravity$
input "Particle Chaos.",chaos$
input "Prticle Floor.",floor$
input "Particle Frequency.",freq$
input "Particle Red Color.",r$
input "Particle Green Color.",g$
input "Particle Blue Color.",b$
input "Particle Velocity.",velocity$
input "Particle Speed.",speed$
input "Particle Size.",size$
` get out of loop to the next one.
goto show
loop

show:

` sync and stuff.

sync on:sync rate 60
set display mode 1024,768,32
hide mouse

` create the particles and its settings.

make particles 1,0,val(freq$),val(size$)
set particle gravity 1,val(gravity$)
set particle chaos 1,val(chaos$)
set particle floor 1,val(floor$)
color particles 1,val(r$),val(g$),val(b$)
set particle velocity 1,val(velocity$)
set particle speed 1,val(speed$)

` next loop.

do
position camera 0,0,-10
point camera particles position x(1),particles position y(1),particles position z(1)
` wait for keypress to change settings.
if returnkey()=1
   goto parimeters
endif
sync
loop

` !!!ENJOY!!!