coolbunny1234

Untitled

Oct 20th, 2012
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.73 KB | None | 0 0
  1. /*
  2. this is a custom aircraft script that was in development before i went to rehab. if you can figure out the remainder, and get it working, it'd be the newest mod out there ;)
  3.  
  4. Let me know how your progress goes and if you get stuck, I'll give tips and snippets to get to the next part.
  5.  
  6. -Bunny
  7. */
  8.  
  9. build_custom_aircraft( type )
  10. {
  11. model = undefined;
  12. death_model = undefined;
  13. death_fx = "explosions/large_vehicle_explosion";
  14. death_sound = "explo_metal_rand";
  15. health = 2000;
  16. min_health = 1000;
  17. max_health = 5000;
  18. team = "allies";
  19. bombs = false;
  20. turretType = "default_aircraft_turret";
  21. turretModel = "weapon_machinegun_tiger";
  22. func = undefined;
  23. spawn = undefined;
  24.  
  25. if( type == "rufe" )
  26. {
  27. model = "defaultvehicle";
  28. death_fx = "explosions/large_vehicle_explosion";
  29. death_model = "defaultvehicle";
  30. health = 750;
  31. min_health = 500;
  32. max_health = 1000;
  33. team = "allies";
  34. func = ::axis_plane_init;
  35. spawn = SpawnVehicle( "defaultvehicle", "new_plane", "defaultvehicle", self.origin + 30, self getplayerangles() );
  36.  
  37. // maps\_vehicle::build_predeathfx( "explosions/large_vehicle_explosion", "tag_origin", undefined, undefined, undefined, undefined, undefined, true );
  38. }
  39.  
  40. maps\_vehicle::build_template( "stuka", model, type );
  41. maps\_vehicle::build_localinit( func );
  42.  
  43. maps\_vehicle::build_deathmodel( model, death_model );
  44.  
  45. // build_deathfx( effect, tag, sound, bEffectLooping, delay, bSoundlooping, waitDelay, stayontag, notifyString )
  46. maps\_vehicle::build_deathfx( death_fx, "tag_engine", death_sound, undefined, undefined, undefined, undefined ); // TODO change to actual explosion fx/sound when we get it
  47. maps\_vehicle::build_life( health, min_health, max_health );
  48.  
  49. maps\_vehicle::build_treadfx();
  50.  
  51. maps\_vehicle::build_team( team );
  52.  
  53. // Bomb stuff: TODO Rebuild.x with actual explosion fx, sound, and bomb model when we get them
  54. // quakepower, quaketime, quakeradius, range, min_damage, max_damage
  55. // maps\_planeweapons::build_bomb_explosions( type, 0.5, 2.0, 1024, 768, 400, 25 );
  56. // maps\_planeweapons::build_bombs( type, "com_trashbag", "explosions/fx_mortarExp_dirt", "artillery_explosion" );
  57.  
  58. maps\_vehicle::build_turret( turretType, "tag_gunLeft", turretModel, true );
  59. maps\_vehicle::build_turret( turretType, "tag_gunRight", turretModel, true );
  60. }
  61. axis_plane_init()
  62. {
  63. set_target( self, "air_target", "air_target_offscreen" );
  64. }
  65.  
  66. set_target( ent, shader, offscreen_shader, offset )
  67. {
  68. if( !IsDefined( offset ) )
  69. {
  70. target_set( ent, ( 0, 0, 0 ) );
  71. }
  72. else
  73. {
  74. target_set( ent, offset );
  75. }
  76.  
  77. target_setshader( ent, level.hud_shaders[shader] );
  78.  
  79. if( IsDefined( offscreen_shader ) )
  80. {
  81. target_setoffscreenshader( ent, level.hud_shaders[offscreen_shader] );
  82. }
  83. }
Advertisement
Add Comment
Please, Sign In to add comment