class RobotLineFX extends Effects; var() byte NumRobots; var() float BuildStartDelay,BuildEndDelay,RobotsDropDelay; var vector InitialPosition,InitialVelocity; var bool bFinishBuild; #if GAMEVER>=227 #exec MESH MODELIMPORT MESH=RobotMB MODELFILE=skeletalmodels\robot\robot_B.PSK LODSTYLE=10 #exec MESH ORIGIN MESH=RobotMB X=0 Y=0 Z=0 YAW=64 PITCH=0 ROLL=0 #exec ANIM IMPORT ANIM=robotskanimsB ANIMFILE=skeletalmodels\robot\robot_B.PSA COMPRESS=1 MAXKEYS=999999 #exec MESHMAP SCALE MESHMAP=RobotMB X=0.1 Y=0.1 Z=0.1 #exec MESH DEFAULTANIM MESH=RobotMB ANIM=robotskanimsB #exec MESH BOUNDINGBOX MESH=RobotMB XMIN=-350 YMIN=-250 ZMIN=-450 XMAX=350 YMAX=200 ZMAX=430 #EXEC ANIM SEQUENCE ANIM=robotskanimsB SEQ=Assemble STARTFRAME=0 NUMFRAMES=124 RATE=12.5 COMPRESS=1 #exec ANIM DIGEST ANIM=robotskanimsB #EXEC MESHMAP SETTEXTURE MESHMAP=RobotMB NUM=0 TEXTURE=JROBOT1 #exec ANIM NOTIFY ANIM=robotskanimsB SEQ=Assemble TIME=0.08 FUNCTION=StopMove #exec ANIM NOTIFY ANIM=robotskanimsB SEQ=Assemble TIME=0.5 FUNCTION=StartMove #exec ANIM NOTIFY ANIM=robotskanimsB SEQ=Assemble TIME=0.693 FUNCTION=StopMove #exec ANIM NOTIFY ANIM=robotskanimsB SEQ=Assemble TIME=0.895 FUNCTION=StartMove simulated function PostBeginPlay() { Role = ROLE_Authority; InitialPosition = Location; InitialVelocity = Velocity; AnimFrame = 0; SetTimer(BuildStartDelay,false); } /* simulated function StopMove() { Velocity = vect(0,0,0); } simulated function StartMove() { Velocity = InitialVelocity; } */ simulated function Timer() { if( !bFinishBuild ) { Enable('AnimEnd'); PlayAnim('Assemble'); } else { Disable('AnimEnd'); TweenAnim('Assemble',0.01); bFinishBuild = false; SetLocation(InitialPosition); SetTimer(BuildStartDelay,false); } } simulated function AnimEnd() { bFinishBuild = true; SetTimer(BuildEndDelay,false); } simulated final function SpawnBroBot() { local RobotLineFXChild R; R = Spawn(Class'RobotLineFXChild',,,InitialPosition); R.DrawScale = DrawScale; R.BuildEndDelay = BuildEndDelay; R.BuildStartDelay = BuildStartDelay; R.Velocity = InitialVelocity; R.InitialVelocity = InitialVelocity; R.PostBeginPlay(); } auto state BeginBuilding { Begin: while( NumRobots>0 ) { Sleep(RobotsDropDelay); SpawnBroBot(); --NumRobots; } } #endif defaultproperties { RemoteRole=ROLE_None bNoDelete=true AnimSequence="Assemble" RobotsDropDelay=6 NumRobots=3 BuildEndDelay=4 BuildStartDelay=4 DrawType=DT_Mesh DrawScale=2 Velocity=(X=100) #if GAMEVER>=227 Mesh=RobotMB Physics=PHYS_Projectile #endif }