Advertisement
Guest User

Untitled

a guest
Sep 29th, 2010
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.51 KB | None | 0 0
  1. #include common_scripts\utility;
  2. #include common_scripts\_destructible;
  3. #include common_scripts\_destructible_types;
  4. #using_animtree( "destructibles_dlc" );
  5.  
  6. makeType_dlc( destructibleType )
  7. {
  8. //println( destructibleType );
  9.  
  10. // if it's already been created dont create it again
  11. infoIndex = getInfoIndex( destructibleType );
  12. if ( infoIndex >= 0 )
  13. return infoIndex;
  14.  
  15. found_dlc_destructible = true;
  16. switch ( destructibleType )
  17. {
  18. // add new destructibles here, you can write new functions for them or call the old ones
  19. case "toy_new_dlc_destructible":
  20. toy_glass( "120x110" );
  21. break;
  22. case "toy_security_camera":
  23. toy_security_camera( destructibleType );
  24. break;
  25. case "toy_arcade_machine_1":
  26. toy_arcade_machine( "_1" );
  27. break;
  28. case "toy_arcade_machine_2":
  29. toy_arcade_machine( "_2" );
  30. break;
  31. case "toy_pinball_machine_1":
  32. toy_pinball_machine( "_1" );
  33. break;
  34. case "toy_pinball_machine_2":
  35. toy_pinball_machine( "_2" );
  36. break;
  37. default:
  38. found_dlc_destructible = false;
  39. break;
  40. }
  41.  
  42. if ( !found_dlc_destructible )
  43. {
  44. return undefined;
  45. }
  46.  
  47. infoIndex = getInfoIndex( destructibleType );
  48. assert( infoIndex >= 0 );
  49. return infoIndex;
  50. }
  51.  
  52.  
  53.  
  54.  
  55.  
  56. toy_security_camera( destructibleType )
  57. {
  58. //---------------------------------------------------------------------
  59. // Rotating security camera
  60. //---------------------------------------------------------------------
  61. destructible_create( destructibleType, "tag_camera_tilt", 0, undefined, 32 );
  62. destructible_anim( get_precached_anim( "security_camera_idle" ), #animtree, "setanimknob", undefined, undefined, "security_camera_idle" );
  63. destructible_state( "tag_camera_tilt", "com_security_camera_tilt_animated", 75 );
  64. destructible_anim( get_precached_anim( "security_camera_destroy" ), #animtree, "setanimknob", undefined, undefined, "security_camera_destroy" );
  65. destructible_fx( "tag_fx", "props/security_camera_explosion_moving" );
  66. destructible_sound( "security_camera_sparks" );
  67. destructible_state( undefined, "com_security_camera_d_tilt_animated", undefined, undefined, "no_melee" );
  68. }
  69.  
  70.  
  71. toy_arcade_machine( version )
  72. {
  73. //---------------------------------------------------------------------
  74. // Exploding Arcade Maching
  75. //---------------------------------------------------------------------
  76. destructible_create( "toy_arcade_machine" + version, "tag_origin", 0, undefined, 32 );
  77. destructible_state( "tag_origin", "arcade_machine" + version, 75 );
  78. destructible_fx( "tag_fx", "props/arcade_machine_exp" );
  79. destructible_fx( "tag_fx2", "props/arcade_machine_coins" );
  80. destructible_sound( "arcade_machine_destroy" );
  81. destructible_state( undefined, "arcade_machine" + version + "_des", undefined, undefined, "no_melee" );
  82. }
  83.  
  84.  
  85. toy_pinball_machine( version )
  86. {
  87. //---------------------------------------------------------------------
  88. // Exploding Arcade Maching
  89. //---------------------------------------------------------------------
  90. destructible_create( "toy_pinball_machine" + version, "tag_origin", 0, undefined, 32 );
  91. destructible_state( "tag_origin", "pinball_machine" + version, 75 );
  92. destructible_fx( "tag_fx", "props/pinball_machine_exp", undefined, undefined, undefined, 1 );
  93. destructible_fx( "tag_fx2", "props/arcade_machine_coins" );
  94. destructible_fx( "tag_fx3", "props/pinball_machine_glass" );
  95. destructible_sound( "pinball_machine_destroy" );
  96. destructible_state( undefined, "pinball_machine" + version + "_des", undefined, undefined, "no_melee" );
  97. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement