Advertisement
bauti777

MTJ - Missile/Super Missile Doors

Sep 15th, 2017
464
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
4CS 2.43 KB | None | 0 0
  1. #include "zcommon.acs"
  2. #library "MISSILES"
  3.  
  4. // THIS SCRIPT REQUIRES "MissileActivatesImpactLines" FLAG IN MAPINFO!!!!
  5. // Also this was tested in Zandronum 3.0. It requires a sourceport that allows named scripts.
  6.  
  7. int mamount = 0; /* Missile Door*/
  8. script "MDoor" (int stag, int ltag)
  9. { // Missile Door (sector, line)
  10.     if (!CheckActorClass(0,"PowerMissileCoop"))
  11.     { // if not a powermissile
  12.    
  13.         SetActivatorToTarget(0); // so the activator isnt the missile, and hudmessage prints to the player
  14.         HudMessage(s:"You need ", d:5-mamount, s:" missiles to open this door";
  15.         HUDMSG_FADEOUT, 1, CR_BLACK, 0.9, -0.9, 1.0, 3.0);
  16.         terminate;
  17.     }
  18.    
  19.            mamount++; // if it's a missile, then + amount
  20.            
  21.     if (mamount  == 5)
  22.     {
  23.         Door_Open(stag, 16, 0);
  24.         SetLineSpecial(ltag,202,0,16,0,70,0);
  25.         mamount = 0;
  26.     }
  27.     else if (mamount < 5)
  28.     {
  29.         SetActivatorToTarget(0);
  30.         HudMessage(s:"You need ", d:5-mamount, s:" missiles to open this door";
  31.         HUDMSG_FADEOUT, 1, CR_BLACK, 0.9, -0.9, 1.0, 3.0);
  32.     }
  33. }
  34.  
  35. int smamount = 0; /* Super Missile Door*/
  36. script "SMDoor" (int stag1, int ltag1)
  37. { // Super Missile Door (sector, line)
  38.     if (!CheckActorClass(0,"SuperMissileCoop")) { // if not a super missile
  39.         SetActivatorToTarget(0);
  40.         HudMessage(s:"You need ", d:2-smamount, s:" super missiles to open this door";
  41.         HUDMSG_FADEOUT, 2, CR_BLACK, 0.9, -0.9, 1.0, 3.0);
  42.         terminate;
  43.     }
  44.    
  45.         smamount++; // if it's a super missile, then increase amount
  46.  
  47.     if (smamount  == 2)
  48.     {
  49.         Door_Open(stag1, 16, 0);
  50.         SetLineSpecial(ltag1,202,0,16,0,70,0);
  51.         smamount = 0;
  52.     }
  53.     else if (smamount < 2)
  54.     {
  55.         SetActivatorToTarget(0);
  56.         HudMessage(s:"You need ", d:2-smamount, s:" super missiles to open this door";
  57.         HUDMSG_FADEOUT, 2, CR_BLACK, 0.9, -0.9, 1.0, 3.0);
  58.     }
  59. }
  60.  
  61. int PBamount = 0; // Power Bomb Door ***NOTWORKINGYET***
  62. script "PBDoor" (int stag1, int ltag1)
  63. { // Power Bomb Door (sector, line)
  64.     if (!CheckActorClass(0,"PowerBomb")) { //
  65.         SetActivatorToTarget(0);
  66.         HudMessage(s:"You need a power bomb to open this door";
  67.         HUDMSG_FADEOUT, 2, CR_BLACK, 0.9, -0.9, 1.0, 3.0);*/
  68.         terminate;
  69.     }
  70.        
  71.         Door_Open(stag1, 16, 0);
  72.         SetLineSpecial(ltag1,202,0,16,0,70,0);
  73.         pbamount = 0;
  74.  
  75. }
  76.  
  77.  
  78.  
  79. /*
  80. DOWNLOAD LINK: https://www.dropbox.com/s/465kbr8g8r1xw6d/MTJresources.pk3?dl=0
  81. Load with metroiddreadnought and metroid dreadnought levels
  82.  */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement