// Note: although this is a ProphecyC script, the principle remains the same // if you want to code this in WCPPas. // // If you run this mission without the Leech Gun patch, the game will crash, // since it uses new functions! // // Mario "HCl" Brito M_Nav { long x,s NAV_ActivateSelf(); LEECH_Code(7); // enable gun number 7 as leech x = -1000; s = 4; NAV_CreateShip(s, 108, 0, M_Enemy, M_NotTraitor, x, 0, 1000); x = x + 50; NAV_CreateShip(s, 108, 0, M_Enemy, M_NotTraitor, x, 0, 1000); x = x + 50; NAV_CreateShip(s, 108, 0, M_Enemy, M_NotTraitor, x, 0, 1000); x = x + 50; NAV_CreateShip(s, 108, 0, M_Enemy, M_NotTraitor, x, 0, 1000); x = x + 50; NAV_CreateShip(s, 108, 0, M_Enemy, M_NotTraitor, x, 0, 1000); x = x + 50; NAV_CreateShip(s, 108, 0, M_Enemy, M_NotTraitor, x, 0, 1000); x = x + 50; NAV_CreateShip(s, 108, 0, M_Enemy, M_NotTraitor, x, 0, 1000); x = x + 50; NAV_CreateShip(s, 108, 0, M_Enemy, M_NotTraitor, x, 0, 1000); x = x + 50; NAV_CreateShip(s, 108, 0, M_Enemy, M_NotTraitor, x, 0, 1000); x = x + 50; NAV_CreateShip(s, 108, 0, M_Enemy, M_NotTraitor, x, 0, 1000); x = x + 50; while (true) { AI_WaitSeconds(1); } } M_Enemy { SF_SetObjectFlag (3,11); SF_BindToActionSphere(0); SF_ActivateSelf(0); while (true) { if ( LEECH_Get(this()) > 29 ) // 30 hits needed to leech each ship { SF_SetObjectFlag (3,12); AI_SetThrottle(0); AI_IgnoreCollisions(1); } AI_WaitMilliseconds(0); } } M_NotTraitor { // ATTENTION: We don't want to trigger "Traitors never win" when we destroy // a neutral ship (which is in fact what a Leeched ship becomes)... so we // set the ship to Enemy just a heartbeat before it dies :) SF_SetObjectFlag (3,11); }