Exemplo n.º 1
0
        // Creates new TP-zone to save HALE from falling into death (with penalty of losing life)
        public void SetSafeZone(SFDGameScriptInterface.Vector2 pos, SFDGameScriptInterface.Point sizeFactor)
        {
            // Create a new trigger with the
            IObjectAreaTrigger saveHaleZone = (IObjectAreaTrigger)Game.CreateObject("AreaTrigger", pos);

            saveHaleZone.SetOnEnterMethod("KillZoneTrigger");
            saveHaleZone.SetSizeFactor(sizeFactor);
            if (MODE)
            {
                Game.RunCommand("/MSG " + "SIZE : " + saveHaleZone.GetSize().ToString());
                Game.RunCommand("/MSG " + "SIZEFACTOR : " + saveHaleZone.GetSizeFactor().ToString());
                Game.RunCommand("/MSG " + "BASESIZE : " + saveHaleZone.GetBaseSize().ToString());
            }
        }
Exemplo n.º 2
0
        // Try to modify Gib Zones to be non-lethal for HALE.
        public void ModGibZones()
        {
            string mapName = Game.MapName;

            if (mapName == "Hazardous")
            {
                SFDGameScriptInterface.Vector2 position   = new SFDGameScriptInterface.Vector2(-172, -120);
                SFDGameScriptInterface.Point   sizeFactor = new SFDGameScriptInterface.Point(52, 2);
                SetSafeZone(position, sizeFactor);
            }
            else if (mapName == "Police Station")
            {
                // Game.RunCommand("/MAPROTATION " + "10");

                // for (int i = 0; i < 100; i++)
                // {
                //     Game.RunCommand("/MSG " + "nothing suspicious here...");
                // }
                // Bottom
                SFDGameScriptInterface.Vector2 position1   = new SFDGameScriptInterface.Vector2(-740, -128);
                SFDGameScriptInterface.Point   sizeFactor1 = new SFDGameScriptInterface.Point(93, 3);
                // Left
                SFDGameScriptInterface.Vector2 position2   = new SFDGameScriptInterface.Vector2(-740, 230);
                SFDGameScriptInterface.Point   sizeFactor2 = new SFDGameScriptInterface.Point(5, 45);
                SetSafeZone(position1, sizeFactor1);
                SetSafeZone(position2, sizeFactor2);
            }
            else if (mapName == "Canals")
            {
                SFDGameScriptInterface.Vector2 position   = new SFDGameScriptInterface.Vector2(-212, -164);
                SFDGameScriptInterface.Point   sizeFactor = new SFDGameScriptInterface.Point(37, 2);
                SetSafeZone(position, sizeFactor);
            }
            else if (mapName == "Castle Courtyard")
            {
                SFDGameScriptInterface.Vector2 position   = new SFDGameScriptInterface.Vector2(360, -300);
                SFDGameScriptInterface.Point   sizeFactor = new SFDGameScriptInterface.Point(32, 2);
                SetSafeZone(position, sizeFactor);
            }
            else if (mapName == "Rooftops")
            {
                // Bottom
                SFDGameScriptInterface.Vector2 position1   = new SFDGameScriptInterface.Vector2(-500, -200);
                SFDGameScriptInterface.Point   sizeFactor1 = new SFDGameScriptInterface.Point(125, 3);
                // Left
                SFDGameScriptInterface.Vector2 position2   = new SFDGameScriptInterface.Vector2(-500, 330);
                SFDGameScriptInterface.Point   sizeFactor2 = new SFDGameScriptInterface.Point(5, 67);
                // Right - ei toimi?
                SFDGameScriptInterface.Vector2 position3   = new SFDGameScriptInterface.Vector2(500, 330);
                SFDGameScriptInterface.Point   sizeFactor3 = new SFDGameScriptInterface.Point(5, 67);
                SetSafeZone(position1, sizeFactor1);
                SetSafeZone(position2, sizeFactor2);
                SetSafeZone(position3, sizeFactor3);
            }
            else if (mapName == "Chemical Plant")
            {
                // Left acid container
                SFDGameScriptInterface.Vector2 position   = new SFDGameScriptInterface.Vector2(-76, -120);
                SFDGameScriptInterface.Point   sizeFactor = new SFDGameScriptInterface.Point(14, 3);
                SetSafeZone(position, sizeFactor);
            }
            else if (mapName == "Sector 8")
            {
                // Bottom
                SFDGameScriptInterface.Vector2 position1   = new SFDGameScriptInterface.Vector2(-500, -200);
                SFDGameScriptInterface.Point   sizeFactor1 = new SFDGameScriptInterface.Point(125, 3);
                // Left
                SFDGameScriptInterface.Vector2 position2   = new SFDGameScriptInterface.Vector2(-500, 330);
                SFDGameScriptInterface.Point   sizeFactor2 = new SFDGameScriptInterface.Point(5, 67);
                // Right
                SFDGameScriptInterface.Vector2 position3   = new SFDGameScriptInterface.Vector2(500, 330);
                SFDGameScriptInterface.Point   sizeFactor3 = new SFDGameScriptInterface.Point(5, 67);
                SetSafeZone(position1, sizeFactor1);
                SetSafeZone(position2, sizeFactor2);
                SetSafeZone(position3, sizeFactor3);
            }
            else if (mapName == "Rooftops II")
            {
                // Bottom
                SFDGameScriptInterface.Vector2 position1   = new SFDGameScriptInterface.Vector2(-500, -200);
                SFDGameScriptInterface.Point   sizeFactor1 = new SFDGameScriptInterface.Point(125, 3);
                // Left
                SFDGameScriptInterface.Vector2 position2   = new SFDGameScriptInterface.Vector2(-500, 330);
                SFDGameScriptInterface.Point   sizeFactor2 = new SFDGameScriptInterface.Point(5, 67);
                // Right
                SFDGameScriptInterface.Vector2 position3   = new SFDGameScriptInterface.Vector2(500, 330);
                SFDGameScriptInterface.Point   sizeFactor3 = new SFDGameScriptInterface.Point(5, 67);
                SetSafeZone(position1, sizeFactor1);
                SetSafeZone(position2, sizeFactor2);
                SetSafeZone(position3, sizeFactor3);
            }
            else if (mapName == "Heavy Equipment")
            {
                // Bottom
                SFDGameScriptInterface.Vector2 position1   = new SFDGameScriptInterface.Vector2(-500, -200);
                SFDGameScriptInterface.Point   sizeFactor1 = new SFDGameScriptInterface.Point(125, 3);
                // Right
                SFDGameScriptInterface.Vector2 position2   = new SFDGameScriptInterface.Vector2(500, 330);
                SFDGameScriptInterface.Point   sizeFactor2 = new SFDGameScriptInterface.Point(5, 67);
                SetSafeZone(position1, sizeFactor1);
                SetSafeZone(position2, sizeFactor2);
            }
            else if (mapName == "Plant 47")
            {
                // Bottom
                SFDGameScriptInterface.Vector2 position   = new SFDGameScriptInterface.Vector2(132, -172);
                SFDGameScriptInterface.Point   sizeFactor = new SFDGameScriptInterface.Point(16, 3);
                SetSafeZone(position, sizeFactor);
            }
            else if (mapName == "Old Warehouse")
            {
                // Bottom
                SFDGameScriptInterface.Vector2 position   = new SFDGameScriptInterface.Vector2(-500, -200);
                SFDGameScriptInterface.Point   sizeFactor = new SFDGameScriptInterface.Point(125, 3);
                SetSafeZone(position, sizeFactor);
            }
            else if (mapName == "Tower")
            {
                // Bottom
                SFDGameScriptInterface.Vector2 position   = new SFDGameScriptInterface.Vector2(-500, -200);
                SFDGameScriptInterface.Point   sizeFactor = new SFDGameScriptInterface.Point(125, 3);
                SetSafeZone(position, sizeFactor);
            }
            else if (mapName == "Pistons")
            {
                // Bottom
                SFDGameScriptInterface.Vector2 position1   = new SFDGameScriptInterface.Vector2(-500, -200);
                SFDGameScriptInterface.Point   sizeFactor1 = new SFDGameScriptInterface.Point(125, 3);
                SetSafeZone(position1, sizeFactor1);
                // The GIB-buckets:
                SFDGameScriptInterface.Vector2 position2   = new SFDGameScriptInterface.Vector2(-216, -40);
                SFDGameScriptInterface.Point   sizeFactor2 = new SFDGameScriptInterface.Point(10, 4);
                SetSafeZone(position2, sizeFactor2);
            }
            else if (mapName == "Facility")
            {
                // Bottom
                SFDGameScriptInterface.Vector2 position   = new SFDGameScriptInterface.Vector2(-500, -200);
                SFDGameScriptInterface.Point   sizeFactor = new SFDGameScriptInterface.Point(125, 5);
                SetSafeZone(position, sizeFactor);
                // Maybe left??
            }
            else if (mapName == "Steamship")
            {
                // Bottom
                SFDGameScriptInterface.Vector2 position   = new SFDGameScriptInterface.Vector2(-500, -180);
                SFDGameScriptInterface.Point   sizeFactor = new SFDGameScriptInterface.Point(125, 5);
                SetSafeZone(position, sizeFactor);
            }
            else if (mapName == "East Warehouse")
            {
                // Bottom
                SFDGameScriptInterface.Vector2 position   = new SFDGameScriptInterface.Vector2(-500, -150);
                SFDGameScriptInterface.Point   sizeFactor = new SFDGameScriptInterface.Point(32, 5);
                SetSafeZone(position, sizeFactor);
                // Left??
            }
            else
            {
                Game.RunCommand("/MSG " + "Mapissa " + mapName + ": Halen tervapeikko is off");
            }
        }