gamevar GLOBALSNOWANG 0 1
define SNOWPARTICLE 3603
define SNOWMAKER 3600
define SNOW 3601
define SNOW2 3602
define SNOWDIR 3604

move SNOWZOOM 800 0
useractor notenemy SNOWMAKER 0 0
{
cstat 32768
move SNOWZOOM geth getv
ifrnd 27 { move 0 spin randomangle  }
ifspritepal 2 ifrnd 48 { ifpdistl 20 { } else { break } spawn SNOW2 }
else ifspritepal 0 ifrnd 5 { spawn SNOW }

}
enda

action SNOWNONE1 0 1 1 1 1
action SNOWNONE2 0 4 1 1 1
action SNOWNONE3 0 4 1 1 1
action SNOWNONE4 0 4 1 1 1
action SNOWNONE5 0 4 1 1 1
action SNOWNONE6 0 4 1 1 1
action SNOWNONE7 0 4 1 1 1
action SNOWNONE8 0 4 1 1 1

move SNOWDOWN1 50 70
move SNOWDOWN2 25 70
move SNOWDOWN3 12 70
move SNOWDOWN4 6 70
useractor notenemy SNOW 0 0
ifaction 0
{
cstat 32768
sizeat 16 16
move 0 spin randomangle
ifrnd 27 { move 0 action SNOWNONE1 }
}
ifaction SNOWNONE1
{
cstat 0
ifrnd 64 { move SNOWDOWN1 geth getv ifrnd 96 { move SNOWDOWN1 geth getv randomangle } }
else ifrnd 64 { move SNOWDOWN2 geth getv ifrnd 96 { move SNOWDOWN2 geth getv randomangle } }
else ifrnd 64 { move SNOWDOWN3 geth getv ifrnd 96 { move SNOWDOWN3 geth getv randomangle } }
else ifrnd 64 { move SNOWDOWN4 geth getv ifrnd 96 { move SNOWDOWN4 geth getv randomangle } }
iffloordistl 4 { killit }
}
enda


move SNOWP1 100 -200
move SNOWP2 80 -150
move SNOWP3 60 -100
move SNOWP4 40 -50
move SNOWP5 30  -5
move SNOWP6 20  5
move SNOWP7 10 0
move SNOWP8 5 0

useractor notenemy SNOWPARTICLE 0 0
ifaction 0
{
cstat 32768
sizeat 32 32
move 0 spin randomangle
ifrnd 27 { move 0 action SNOWNONE1 }
}
ifaction SNOWNONE1 { ifactioncount 5 {
 cstat 2
ifvare TEMP 0 { getactor[THISACTOR].z TEMP addvar TEMP 3096 setactor[THISACTOR].z TEMP }
 } move SNOWP1 geth getv ifactioncount 10 { action SNOWNONE2 } }
else ifaction SNOWNONE2 { move SNOWP2 geth getv ifactioncount 8 { action SNOWNONE3 } }
else ifaction SNOWNONE3 { move SNOWP3 geth getv ifactioncount 6 { action SNOWNONE4 } }
else ifaction SNOWNONE4 { move SNOWP4 geth getv ifactioncount 8 { action SNOWNONE5 } }
else ifaction SNOWNONE5 { move SNOWP5 geth getv ifactioncount 4 { action SNOWNONE6 } }
else ifaction SNOWNONE6 { move SNOWP6 geth getv fall ifactioncount 2 { action SNOWNONE7 } }
else ifaction SNOWNONE7 { move SNOWP7 geth fall ifactioncount 2 { action SNOWNONE8 } }
else ifaction SNOWNONE8 { move SNOWP8 geth fall iffloordistl 4 { killit } }

enda

move SNOWG1 300  200
move SNOWG2 350 200

useractor notenemy SNOW2 0 0
ifaction 0
{
cstat 32768
sizeat 16 16
ifrnd 27 { move 0 action SNOWNONE1 }
}
setactor[THISACTOR].ang GLOBALSNOWANG
ifaction SNOWNONE1
{
cstat 0
move SNOWG1 geth getv fall
ifrnd 32 { move SNOWG2 geth getv fall }
iffloordistl 4 { killit }
}
enda

useractor notenemy SNOWDIR 0 0
ifaction 0 { cstat 32768 action SNOWNONE1 }
getactor[THISACTOR].ang GLOBALSNOWANG

enda


