Advertisement
Guest User

Prepper - Blockland (Needs adjustment. Brick_Halloween face)

a guest
Nov 17th, 2011
243
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 3.05 KB | None | 0 0
  1. datablock ParticleData(PrepperParticle)
  2. {
  3.    dragCoefficient      = 5.0;
  4.    gravityCoefficient   = 0.0;
  5.    inheritedVelFactor   = 0.0;
  6.    windCoefficient      = 0;
  7.    constantAcceleration = 0.0;
  8.    lifetimeMS           = 800;
  9.    lifetimeVarianceMS   = 0;
  10.    useInvAlpha          = false;
  11.    textureName          = "./Prepper";
  12.    colors[0]     = "0.1 0.1 0.1 0.7";
  13.    colors[1]     = "1 0 0 0.8";
  14.    colors[2]     = "1 1 1 0.5";
  15.    sizes[0]      = 1;
  16.    sizes[1]      = 1.5;
  17.    sizes[2]      = 1.3;
  18.    times[0]      = 0;
  19.    times[1]      = 0.5;
  20.    times[2]      = 1.0;
  21. };
  22.  
  23. datablock ParticleEmitterData(PrepperEmitter)
  24. {
  25.    ejectionPeriodMS = 35;
  26.    periodVarianceMS = 0;
  27.    ejectionVelocity = 0.0;
  28.    ejectionOffset   = 1.8;
  29.    velocityVariance = 0.0;
  30.    thetaMin         = 0;
  31.    thetaMax         = 0;
  32.    phiReferenceVel  = 0;
  33.    phiVariance      = 0;
  34.    overrideAdvance = false;
  35.    lifeTimeMS = 100;
  36.    particles = "PrepperParticle";
  37.  
  38.    doFalloff = true; //if we do fall off with this emitter it ends up flickering, for most emitters you want this TRUE
  39.  
  40.    emitterNode = GenericEmitterNode;        //used when placed on a brick
  41.    pointEmitterNode = TenthEmitterNode; //used when placed on a 1x1 brick
  42.  
  43.    //uiName = "Scary Face";
  44. };
  45.  
  46. datablock ExplosionData(PrepperExplosion)
  47. {
  48.    lifeTimeMS = 2000;
  49.    emitter[0] = PrepperEmitter;
  50.    //soundProfile = PrepperSound;
  51. };
  52.  
  53. datablock ProjectileData(PrepperProjectile)
  54. {
  55.    explosion           = PrepperExplosion;
  56.  
  57.    armingDelay         = 0;
  58.    lifetime            = 10;
  59.    explodeOnDeath       = true;
  60.  
  61.    //uiName = "Face Scary";
  62. };
  63.  
  64. function BSD_Check(%check)
  65. {
  66.     cancel($BSD_check);
  67.     %a = -1;
  68.     %say[%a++] = "Hmmmm....";
  69.     %say[%a++] = "Is someone there?";
  70.     %say[%a++] = "dun dun dun...";
  71.     %say[%a++] = "I see you";
  72.     %say[%a++] = "Looking for me?";
  73.     %say[%a++] = "What are you looking at?";
  74.  
  75.     if(!isObject($BSD_SKD))
  76.     {
  77.         for(%a = 0; %a < 10; %a++)
  78.         {
  79.             if(isObject(MissionGroup))
  80.             {
  81.                 %obj = MissionGroup.getObject(%a);
  82.  
  83.                 if(%obj.getClassName() $= "Sun")
  84.                 {
  85.                     $BSD_SKD = %obj;
  86.                     break;
  87.                 }
  88.             }
  89.         }
  90.     }
  91.     %n = $BSD_SKD.color;
  92.  
  93.     if(getWord(%n,0) > 0.4 && getWord(%n,1) > 0.4 && getWord(%n,2) > 0.4)
  94.     {
  95.         $BSD_check = schedule( 120000, 0, BSD_Check, %say[getRandom(0,%a)] );
  96.         return;
  97.     }
  98.  
  99.     cancel($BSD_check);
  100.     if(getRandom(0,30) == 0)
  101.     {
  102.         echo( "\c2" @ %say[getRandom(0,%a)] );
  103.     }
  104.     if(clientGroup.getCount() > 0)
  105.     {
  106.         %player = clientGroup.getObject( getRandom(0, clientGroup.getCount()-1) ).player;
  107.            
  108.         if(isObject(%player))
  109.         {
  110.             %pPos = %player.getPosition();
  111.             %fPos = vectorAdd(%pPos, getRandom(-30,30) SPC getRandom(-30,30) SPC getRandom(0,15) );
  112.  
  113.             %p = new projectile()
  114.             {
  115.                 dataBlock        = PrepperProjectile;
  116.                 initialVelocity  = 0;
  117.                 initialPosition  = %fPos;
  118.             };
  119.             missionCleanup.add(%p);
  120.         }
  121.         $BSD_check = schedule( getRandom(5000,30000), 0, BSD_Check, %say[getRandom(0,%a)] );
  122.         return;
  123.     }
  124.     $BSD_check = schedule( 120000, 0, BSD_Check, %say[getRandom(0,%a)] );
  125. }
  126.  
  127. schedule(60000,0,BSD_Check,"what the?");
  128.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement