Announcement

Collapse
No announcement yet.

Killing a Spawn? [Bombing Run Mod]

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Killing a Spawn? [Bombing Run Mod]

    What I'm trying to set up is a randomized spawn point for the Bomb. So what i've got is this:

    //Reset Both counters
    spnVar1=0; //Counts Total
    spnVar2=0; //Determining Spawn Variable

    //Run a Count on TOTAL Random Spawn Locations
    ForEach DynamicActors(class'xDSpawner',Test00)
    {
    spnVar1++; //Max spawn points
    }
    //Choose a Random Spawn
    spnVar2=rand(spnVar1);
    //Reset Main Counter
    spnVar1=0;
    ForEach DynamicActors(class'xDSpawner',Test00)
    {
    if (spnVar1 == spnVar2) {
    log("Spawning..");

    //--Destroy Old Stuff--
    ForEach DynamicActors(class'',)
    {
    //Destroy
    }
    //--Create New Stuff--


    //--END SPAWN CODE--
    }
    spnVar1++;
    }

    Under Destroy, I wanted to destroy all instances of the bomb spawn locations and under create new stuff I wanted to create a new spawn location for the bomb.

    Am I on the right track? Am I completely off? Is there a better way to do this?

    (Note: xDSpawner is a placeable class I've created that I've placed all around my level. It basically serves as a locator for where I want the spawn to occur so that I don't have bombs spawning all over the place)

    #2
    Well.. If I were going to do it, I'd start like your idea. If I wanted it to move the bomb spawn every time ball was reset, though, I wouldn't destroy any of the spawn points. I'd first check to see if any bomb spawn points were already there. If so, change it back to the dbombspawn. Then I'd change one to a bomb spawn. This, of course, assumes that dbombspawn is just a dummy placeholder type of object thing, and not an actual spawner of anything, but still a navigation point for bot pathing purposes (and red trail/blue trail goal finding).

    Dicky B (This is all theoretical, naturally, so anything I typed may or may not be a good idea)

    Comment


      #3
      You can't delete an xBombSpawn, or any other subclass of NavigationPoint. What you can do, though, is change it's flag class variable so it spawns a different kind of ball. You can look at the source of my Bombing Spree mod for help.

      Comment


        #4
        Can you place a whole bunch of your spawn points, and then change the code for the bomb so that when it is spawned, reset, whatever, it works through an array of the bomb spawn points to find out which one its going to use?

        I did something like this with my Hot Potato gametype... it used to spawn at random nav points all over the map, but I ended up tying it to nav points near player spawn points.

        You can find it and the source through the link below if you like.

        Comment

        Working...
        X