home *** CD-ROM | disk | FTP | other *** search
/ Virtual Reality Homebrewer's Handbook / vr.iso / wauthor / sample.acs < prev    next >
Text File  |  1995-11-16  |  2KB  |  95 lines

  1.  
  2. //**************************************************************************
  3. //**
  4. //** test.acs
  5. //**
  6. //**************************************************************************
  7.  
  8. #include "common.acs"
  9.  
  10. script 2 OPEN
  11. {
  12.     int a;
  13.  
  14.     switch( a + 10 )
  15.     {
  16.     case 1:
  17.         break;
  18.     case 2:
  19.         break;
  20.     }
  21.  
  22.     delay(const: 35);
  23.     setlinetexture(11, SIDE_FRONT, TEXTURE_MIDDLE, "castle07");
  24.     delay(const: 35);
  25.     setlinetexture(11, SIDE_FRONT, TEXTURE_MIDDLE, "ice01");
  26.  
  27.     restart;
  28. }
  29.  
  30. #define DIR_UP 1
  31. #define DIR_DOWN 0
  32.  
  33. script 5 (void)
  34. {
  35.     int i;
  36.     int tag;
  37.     int direction;
  38.     str gameTypeString;
  39.     int startTime;
  40.  
  41.     delay(const: 2*35);
  42.     switch(gametype())
  43.     {
  44.         case GAME_SINGLE_PLAYER:
  45.             gameTypeString = "SINGLE PLAYER";
  46.             break;
  47.         case GAME_NET_COOPERATIVE:
  48.             gameTypeString = "COOPERATIVE";
  49.             break;
  50.         case GAME_NET_DEATHMATCH:
  51.             gameTypeString = "DEATHMATCH";
  52.             break;
  53.     }
  54.     print(s: gameTypeString, s: ", SKILL LEVEL ", d: gameskill());
  55.     delay(const: 2*35);
  56.  
  57.     print(s: "NUMBER OF PLAYERS: ", d: playercount());
  58.     delay(const: 2*35);
  59.  
  60.     startTime = timer();
  61.     do
  62.     {
  63.         print(s: "TIMER IS: ", d: timer());
  64.         delay(const: 8);
  65.         ambientsound("FighterGrunt", 127);
  66.     } until(timer() > startTime+5*35);
  67.     delay(const: 3*35);
  68.  
  69.     while(i < 10)
  70.     {
  71.         print(s: "WILL HAPPEN IN ", d: 10-i++, s: " SECONDS ...");
  72.         ambientsound("PickupItem", 127);
  73.         delay(const: 35);
  74.     }
  75.  
  76.     while(TRUE)
  77.     {
  78.         i = 200;
  79.         while(i < 216)
  80.         {
  81.             direction = random(const: 0, 1);
  82.             if(direction == DIR_UP)
  83.             {
  84.                 Floor_RaiseByValue(i, 50, 4);
  85.             }
  86.             else
  87.             {
  88.                 Floor_LowerByValue(i, 50, 4);
  89.             }
  90.             i++;
  91.         }
  92.         delay(const: 16);
  93.     }
  94. }
  95.