Posted: 7th Oct 2011 19:54
New member can't reply to post yet so sorry about second post.
This is a snowy trail maker from the mouse moves with jingle sounds by pressing button. Like the other post for testing particle images at 1920 x 1080. Not the best code but for testing effects it might be of use to someone.

+ Code Snippet
SetDisplayAspect( 1.66 )
ap=1





rem images

LoadImage( 1, "/image01.png", ap )
LoadImage( 2, "/image02.png", ap )
LoadImage( 3, "/image03.png", ap )
LoadImage( 4, "/image04.png", ap )
LoadImage( 5, "/image05.png", ap )


LoadSound( 1, "/bell01.wav" )
LoadSound( 2, "/bell02.wav" )
LoadSound( 3, "/bell03.wav" )
LoadSound( 4, "/bell04.wav" )
LoadSound( 5, "/bell05.wav" )

for i = 1 to 5


PlaySound( i, 50, 0 )
SetSoundSystemVolume( 50  )
next i



rem sprites
rem for i = 1 to 5
rem    CreateSprite( i, i )
rem SetSpriteScale( i, .25, .25 )
rem SetSpritePosition( i, i*10, 20 )
rem    next i
rem for i = 1 to 5
rem SetSpritePosition( i, i*20, 20 )
rem next i



rem party
for i = 1 to 5
CreateParticles( i, 50, 50 )
SetParticlesImage( i, i )
SetParticlesVisible( i, 1 )
next i





for i = 1 to 5
SetParticlesPosition( i, 50, 50 )
SetParticlesAngle( i, 360 )
rem SetParticlesAngleRad( i, 2*PI )
SetParticlesColorInterpolation( i,1 )
AddParticlesColorKeyFrame( i, 4, 255, 255, 255, 255-i*25 )
AddParticlesColorKeyFrame( i, 2, 255, 255, 255, 255-i*25 )
AddParticlesColorKeyFrame( i, 1, 255, 255, 255, 255-i*25 )
SetParticlesDepth( i, 1000 )
SetParticlesDirection( i, 0, 6*i )
SetParticlesFrequency( i, 100 )
SetParticlesLife( i, 150 )
SetParticlesMax( i, -1 )
SetParticlesSize( i, .2 )
SetParticlesStartZone( i, 1, 1,-1, -1 )
SetParticlesVelocityRange( i, .1, .15 )

next i

do
Sync()
for i =1 to 5
xx = GetPointerX()
yy = GetPointery()
SetParticlesPosition( i, xx, yy )

   next i
mp= GetPointerPressed()
if mp > 0
  print (xx)

  pl= xx/25+1 : PlaySound( pl, 100, 0 )
  mu = GetPointerReleased()
  mh = GetPointerState()
   endif
loop
Posted: 8th Oct 2011 8:44
Hi chromatic3d and welcome to the forum!

Both your effects were nice, and made me long for x-mas, haha I live in Norway, and know all about snow...

To post your code, you should press the "code" button before and after the code. You find the button above the rows of smilies in the edit box when posting messages, press it to insert HTML like formatting of the text into code text.

Indention should be done also, like this, for better readability:

+ Code Snippet
// Initialize Display
SetDisplayAspect( 1.66 )
ap=1

// Load Images
LoadImage( 1, "/image01.png", ap )
LoadImage( 2, "/image02.png", ap )
LoadImage( 3, "/image03.png", ap )
LoadImage( 4, "/image04.png", ap )
LoadImage( 5, "/image05.png", ap )

// Load Sounds
LoadSound( 1, "/bell01.wav" )
LoadSound( 2, "/bell02.wav" )
LoadSound( 3, "/bell03.wav" )
LoadSound( 4, "/bell04.wav" )
LoadSound( 5, "/bell05.wav" )

// Play Sound
for i = 1 to 5
    PlaySound( i, 50, 0 )
    SetSoundSystemVolume( 50 )
next i


// Set Particles
for i = 1 to 5
    CreateParticles( i, 50, 50 )
    SetParticlesImage( i, i )
    SetParticlesVisible( i, 1 )
next i

for i = 1 to 5
    SetParticlesPosition( i, 50, 50 )
    SetParticlesAngle( i, 360 )
    SetParticlesColorInterpolation( i,1 )
    AddParticlesColorKeyFrame( i, 4, 255, 255, 255, 255-i*25 )
    AddParticlesColorKeyFrame( i, 2, 255, 255, 255, 255-i*25 )
    AddParticlesColorKeyFrame( i, 1, 255, 255, 255, 255-i*25 )
    SetParticlesDepth( i, 1000 )
    SetParticlesDirection( i, 0, 6*i )
    SetParticlesFrequency( i, 100 )
    SetParticlesLife( i, 150 )
    SetParticlesMax( i, -1 )
    SetParticlesSize( i, .2 )
    SetParticlesStartZone( i, 1, 1,-1, -1 )
    SetParticlesVelocityRange( i, .1, .15 )
next i

// Main Loop
do
    Sync()
        for i =1 to 5
        xx = GetPointerX()
        yy = GetPointery()
        SetParticlesPosition( i, xx, yy )
    next i
    mp= GetPointerPressed()
    if mp > 0
        print (xx)
        pl= xx/25+1 : PlaySound( pl, 100, 0 )
        mu = GetPointerReleased()
        mh = GetPointerState()
    endif
loop