Rem Project: Smoke Tutorial
Rem Created: 15/08/2005 05:17:23
Rem Created by BiggAdd
Rem ***** Main Source File *****
Rem Set up Screen refresh
sync on
sync rate 60
Rem Load smoke image
load image "Smoke.bmp",1,1
Rem turn off Autocam
autocam off
Rem Position and point the camera
position camera 0,100,-500
point camera 0,100,0
Rem Data value for wait
wait#=6
Rem Data value for speed
VEL2#=3
Rem Data for Particle count
particles#=20
Rem Particle number Data
b=1000
Rem particle position Data
Xp#=0
Yp#=-100
Rem set up backdrop
backdrop on
color backdrop 0
Rem begin loop
do
Rem Randomize the outcomes
Randomize timer()
Rem *********** Particle creation ***********************
Rem If the Delay Reaces Below 0 then create particle
if wa#<0
Rem make the particle
make object plain b,150,150
Rem position at the the points Xp# and Yp# which will later allow us to move the particle with the arrow keys
position object b,Xp#,Yp#,0
Rem create a random rotation for the particle to u dont get a stream of particles that look the same
z#=RND(360)
Rem Rotate the particle with the new data
Zrotate object b,z#
Rem Texture the particle with the desired smoke image
Texture object b,1
Rem ghost the particle to make it see through
ghost object on b
Rem set the wait value back up
wa#=wait#
Rem Increase the particle number
inc b
Rem end IF loop
endif
Rem decrease the wait
dec wa#
Rem ******************** Particle movement **************************
Rem begin the for next loop.Notice The Particle# Variable in there
for x=1 to particles#
Rem Checks if objects exist befor commands are made
if object exist(b-x)
Rem moves the particles upwards
position object b-x,object position X(b-x),object position Y(b-x)+VEL2#,object position Z(b-x)
Rem fades the particles out as they reach the end
fade object b-x,100-(x*(100/particles#))
Rem Rotates particles to give a swirling effect
Zrotate object b-x,object Angle Z(b-x)+3
Rem end If loop
endif
Rem deletes particles thats reach the very end of the trail
If x=particles# then if object exist(b-x) then delete object b-x
next x
Rem Particle Movement controls
if downkey()=1 then dec Yp#,3
if upkey()=1 then inc Yp#,3
if leftkey()=1 then dec Xp#,3
if rightkey()=1 then inc Xp#,3
Rem refresh screen
sync
Rem end loop
loop
Rem Project: Smoke Tutorial
Rem Created: 15/08/2005 05:17:23
Rem Created by BiggAdd
Rem ***** Main Source File *****
Rem Set up Screen refresh
sync on
sync rate 60
Rem Load smoke image
load image "Smoke.bmp",1,1
Rem turn off Autocam
autocam off
Rem Position and point the camera
position camera 0,100,-500
point camera 0,100,0
Rem Data value for wait
wait#=6
Rem Data value for speed
VEL2#=3
Rem Data for Particle count
particles#=20
Rem Particle number Data
b=1000
Rem particle position Data
Xp#=0
Yp#=-100
Rem set up backdrop
backdrop on
color backdrop 0
Rem begin loop
do
Rem Randomize the outcomes
Randomize timer()
Rem *********** Particle creation ***********************
Rem If the Delay Reaces Below 0 then create particle
if wa#<0
Rem make the particle
make object plain b,150,150
Rem position at the the points Xp# and Yp# which will later allow us to move the particle with the arrow keys
position object b,Xp#,Yp#,0
Rem create a random rotation for the particle to u dont get a stream of particles that look the same
z#=RND(360)
Rem Rotate the particle with the new data
Zrotate object b,z#
Rem Texture the particle with the desired smoke image
Texture object b,1
Rem ghost the particle to make it see through
ghost object on b
Rem set the wait value back up
wa#=wait#
Rem Increase the particle number
inc b
Rem end IF loop
endif
Rem decrease the wait
dec wa#
Rem ******************** Particle movement **************************
Rem begin the for next loop.Notice The Particle# Variable in there
for x=1 to particles#
Rem Checks if objects exist befor commands are made
if object exist(b-x)
Rem moves the particles upwards
position object b-x,object position X(b-x),object position Y(b-x)+VEL2#,object position Z(b-x)
Rem fades the particles out as they reach the end
fade object b-x,100-(x*(100/particles#))
Rem Rotates particles to give a swirling effect
Zrotate object b-x,object Angle Z(b-x)+3
Rem end If loop
endif
Rem deletes particles thats reach the very end of the trail
If x=particles# then if object exist(b-x) then delete object b-x
next x
Rem Particle Movement controls
if downkey()=1 then dec Yp#,3
if upkey()=1 then inc Yp#,3
if leftkey()=1 then dec Xp#,3
if rightkey()=1 then inc Xp#,3
Rem refresh screen
sync
Rem end loop
loop
There you go.
SSDD
Same Sh** Different Day