home *** CD-ROM | disk | FTP | other *** search
/ The Best of Windows 95.com 1996 September / WIN95_09963.iso / fun / wauthor.zip / default.acs < prev    next >
Text File  |  1996-07-26  |  3KB  |  95 lines

  1.  
  2. // When WadAuthor finds no script code, it reads this 
  3. // default script code from the DEFAULT.ACS file in 
  4. // the WadAuthor directory.  For information about 
  5. // programming scripts, please refer to the official 
  6. // Hexen specifications.
  7.  
  8. #include "common.acs"
  9.  
  10. // This script supplies the glass-shattering effect
  11. // used throughout Hexen.  To use it, perform the
  12. // following steps.
  13.  
  14. // 1) Create a sector on the map adjacent to another
  15. //    sector but with a higher floor.  Make sure the
  16. //    linedef below textures look like stained glass,
  17. //    and make sure the main textures look like
  18. //    broken glass.
  19. //
  20. // 2) Create four map spots just in front of the sector.
  21. //    Give two one tag number, and give the others another
  22. //    tag number.  Make their height halfway between
  23. //    floor and ceiling.
  24. //
  25. // 3) Set the stained-glass linedef type to ACS_Execute
  26. //    this script, passing it the tag of the sector you
  27. //    created in step one along with the tag numbers of
  28. //    the things you created.  Make sure the activation
  29. //    code is set to trigger when hit by a projectile.
  30.  
  31. script 1 ( int iSector, int iThingTag1, int iThingTag2 )
  32. {
  33.     int i;    // local loop control variable
  34.  
  35.     // Lower the sector's floor; this exposes a
  36.     // different texture to the player, making it
  37.     // appear the glass has shattered.  Play the
  38.     // shattering sound at the thing locations
  39.     // given by the first tag.
  40.  
  41.     Floor_LowerInstant( iSector, 0, 16 );
  42.     Thingsound( iThingTag1, "GlassShatter", 127 );
  43.     delay(const: 1);
  44.  
  45.     // Create twenty shards of glass at the thing
  46.     // locations given by the thing tags, heading in
  47.     // different directions at different rates.
  48.  
  49.     i = 10;
  50.     while ( i-- > 0 )
  51.     {
  52.         Thing_ProjectileGravity( iThingTag1,
  53.         random( T_STAINEDGLASS1, T_STAINEDGLASS0 ),
  54.             random( 0, 255 ), random( 10, 40 ),
  55.             random( 5,20 ) );
  56.         Thing_ProjectileGravity( iThingTag2,
  57.             random( T_STAINEDGLASS1, T_STAINEDGLASS0 ),
  58.             random( 0, 255 ), random( 10, 40 ),
  59.             random( 5,20 ) );
  60.     }
  61. }
  62.  
  63. // The following scripts are placeholders to allow Korax to function
  64. // correctly.  If your wadmap uses Korax, you may wish to customize
  65. // the following.
  66.  
  67. script 249 ( void )
  68. {
  69.     print(s:"KORAX RAN SCRIPT 249" );
  70. }
  71. script 250 ( void )
  72. {
  73.     print(s:"KORAX RAN SCRIPT 250" );
  74. }
  75. script 251 ( void )
  76. {
  77.     print(s:"KORAX RAN SCRIPT 251" );
  78. }
  79. script 252 ( void )
  80. {
  81.     print(s:"KORAX RAN SCRIPT 252" );
  82. }
  83. script 253 ( void )
  84. {
  85.     print(s:"KORAX RAN SCRIPT 253" );
  86. }
  87. script 254 ( void )
  88. {
  89.     print(s:"KORAX RAN SCRIPT 254" );
  90. }
  91. script 255 ( void )
  92. {
  93.     print(s:"KORAX RAN SCRIPT 255" );
  94. }
  95.