Results 1 to 4 of 4

Thread: Can't delete/remove smoke or fire via Clod FMB script - any solutions or ideas?

  1. #1
    Ace
    Join Date
    May 2015
    Location
    Kansas City, Missouri area
    Posts
    515
    Post Thanks / Like
    Total Downloaded
    130.02 MB

    Can't delete/remove smoke or fire via Clod FMB script - any solutions or ideas?

    So here is an issue I came across in scripting Cliffs of Dover FMB missions.

    Generally you can get a list of all ground stationaries using a few simple functions CloD makes available to script writers.

    HOWEVER - those lists of ground stationaries do not include a few important items!

    In particular, they don't seem to include smoke or fire objects.

    So I can understand how this likely happened--smoke & fire are simply a different type of object than most others. For example, if you bomb a location you might kill any nearby static object, but you probably wouldn't kill nearby smoke or fire.

    Anyway, this is an issue because for most ground stationary objects, you can place them and then later remove them.

    But with smoke & fire, you can place them--but you can't EVER remove them unless you completely restart the mission.

    Anyone who knows a solution to this, I would really appreciate hearing it!


    Sample .cs file that lists all ground stationaries of the mission and any submission loaded. If you create a .mis file with various groundstationaries including some smoke and fire, you'll see that everything is listed EXCEPT the smoke and fire:
    Code:
     using System;
    using System.Collections.Generic;
    using maddox.GP;
    using maddox.game;
    using maddox.game.world;
    
    
    
    public class Mission : AMission
    {
    
        Dictionary<GroundStationary, int> Stationaries = new Dictionary<GroundStationary, int>();
    
        public override void OnBattleStarted()
        {
            base.OnBattleStarted();
    
            MissionNumberListener = -1;
        }
    
    
        public override void OnMissionLoaded(int missionNumber)
        {
            base.OnMissionLoaded(missionNumber);
    
            foreach (GroundStationary stationary in GamePlay.gpGroundStationarys())
            {
                if (!Stationaries.ContainsKey(stationary))
                {
                    Stationaries[stationary] = missionNumber;
                    Console.WriteLine("Stat: {0} {1} {2} {3}", missionNumber, stationary.Name, stationary.Category, stationary.Title);
                }
            }
        }
    }
    Example of how to get groundstationaries within a distance of a given point--except not that it will NOT list any smoke or fire groundstationaries!
    Code:
    GroundStationary[] gs = GamePlay.gpGroundStationarys(250000, 252000, 1000); //Find all groundstationaries within 1000 meters of map coordinate (250000,252000)
    List of items I know are not picked up by gpGroundStationarys:

    Code:
    Smoke.Environment.Smoke1
    Smoke.Environment.Smoke2 
    Smoke.Environment.BuildingFireSmall 
    Smoke.Environment.BuildingFireBig 
    Smoke.Environment.BigSitySmoke_0 
    Smoke.Environment.BigSitySmoke_1
    More example code relating to placing & remove ground stationaries here:

    https://forums.twcpilots.com/showthread.php?tid=165
    System: Microsoft Windows 10 Pro 64 bit, 10.0.18362 N/A Build 18362, 20,437 MB |
    ASUS GeForce GTX 1060 3GB | Intel Core i5-2500 Quad-Core Processor 3.3 GHz 6 MB Cache LGA 1155 | Intel DB65AL motherboard | ARCTIC Freezer i11 CPU Cooler | SVGA 500 watt power supply | Microsoft Sidewinder 2 Force Feedback joystick

  2. #2
    ATAG Member ATAG_Oskar's Avatar
    Join Date
    Nov 2017
    Location
    Canada
    Posts
    986
    Post Thanks / Like
    Total Downloaded
    908.31 MB

    Re: Can't delete/remove smoke or fire via Clod FMB script - any solutions or ideas?

    Are you wanting to put the fires out? I thought they burned themselves out after a while.

  3. #3
    Ace
    Join Date
    May 2015
    Location
    Kansas City, Missouri area
    Posts
    515
    Post Thanks / Like
    Total Downloaded
    130.02 MB

    Re: Can't delete/remove smoke or fire via Clod FMB script - any solutions or ideas?

    Quote Originally Posted by ATAG_Oskar View Post
    Are you wanting to put the fires out? I thought they burned themselves out after a while.
    Yes, basically to put the fires out.
    System: Microsoft Windows 10 Pro 64 bit, 10.0.18362 N/A Build 18362, 20,437 MB |
    ASUS GeForce GTX 1060 3GB | Intel Core i5-2500 Quad-Core Processor 3.3 GHz 6 MB Cache LGA 1155 | Intel DB65AL motherboard | ARCTIC Freezer i11 CPU Cooler | SVGA 500 watt power supply | Microsoft Sidewinder 2 Force Feedback joystick

  4. #4
    Ace
    Join Date
    May 2015
    Location
    Kansas City, Missouri area
    Posts
    515
    Post Thanks / Like
    Total Downloaded
    130.02 MB

    Re: Can't delete/remove smoke or fire via Clod FMB script - any solutions or ideas?

    Quote Originally Posted by ATAG_Oskar View Post
    Are you wanting to put the fires out? I thought they burned themselves out after a while.
    I went back & checked---our missions are over 15 hours now & some (all?) of the smoke & fire placements last for the entire time.

    Generally, anything I'm able to place I'd like to be able to remove later, for whatever reason or no reason at all.
    System: Microsoft Windows 10 Pro 64 bit, 10.0.18362 N/A Build 18362, 20,437 MB |
    ASUS GeForce GTX 1060 3GB | Intel Core i5-2500 Quad-Core Processor 3.3 GHz 6 MB Cache LGA 1155 | Intel DB65AL motherboard | ARCTIC Freezer i11 CPU Cooler | SVGA 500 watt power supply | Microsoft Sidewinder 2 Force Feedback joystick

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •