
Code: Select all
class SnowArea_MAP12_MainArea : ACTOR {
TextureID texID;
Array<VisualThinker> vtArray;
Default {
Radius 64;
Height 16;
Scale 0.25;
+NOINTERACTION;
+NOBLOCKMAP;
+NOGRAVITY;
+BRIGHT;
}
override void PostBeginPlay(){
Super.PostBeginPlay();
texID = TexMan.CheckForTexture("SNOFLAKE");
}
override void OnDestroy(){
foreach (vt : vtArray){
if (vt){
vt.Destroy();
}
}
}
void Create(){
VisualThinker vt = Level.SpawnVisualThinker("SnowFlake1");
if (vt){
vt.Texture = texID;
vt.pos = (random(-4736, 1024), random(-3456, 3712), 3200);
vt.vel = (random(-12.0, 12.0), random(-12.0, 12.0), -16.0);
vt.scale = (0.5, 0.5);
vtArray.Push(vt);
}
}
States {
Spawn:
EMPT A 1;
PostSpawnLoop:
EMPT A 1 {
Create();
Create();
}
Loop;
}
}
class SnowArea_MAP12_WalkWayLeft : SnowArea_MAP12_MainArea {
void Create(){
VisualThinker vt = Level.SpawnVisualThinker("SnowFlake1");
if (vt){
vt.Texture = texID;
vt.pos = (random(-5760, -4256), random(4608, 5888), 3200);
vt.vel = (random(-12.0, 12.0), random(-12.0, 12.0), -16.0);
vt.scale = (0.5, 0.5);
vtArray.Push(vt);
}
}
}
class SnowArea_MAP12_WalkWayRight: SnowArea_MAP12_MainArea {
void Create(){
VisualThinker vt = Level.SpawnVisualThinker("SnowFlake1");
if (vt){
vt.Texture = texID;
vt.pos = (random(416, 1920), random(4608, 5888), 3200);
vt.vel = (random(-12.0, 12.0), random(-12.0, 12.0), -16.0);
vt.scale = (0.5, 0.5);
vtArray.Push(vt);
}
}
}
class SnowFlake1 : VisualThinker {
override void PostBeginPlay(){
Super.PostBeginPlay();
}
override void Tick(){
Super.Tick();
if (Pos.Z < 1280){
Destroy();
}
}
}