img



img

Anti-Walling Algorithm


By: _ForgeUser4560947
Addon | img 726




Description

___________________________________________________________________________________________________________________________

Description

This algorithm is designed to work with any set of walls, regardless of position or number. All you need to do is tell it which walls are where. It only works for 2x2 regular blockers right now. If you need something more complicated (i.e. multiple radii), I can probably make it.

When a building is created, a search is conducted for nearby buildings with custom values or adjacency, that is being next to a wall. If it is either of these, it is either given the custom value of the building adjacent to it or the wall adjacent to it. If it's not next to anything, it is given the custom value of zero. Then, it looks for nearby buildings which do not have custom values. If a building is to be given two custom values or a custom value of -1, it is prevented. Alternatively, if the SCV is literally on top of the build site, since Blizzard gave no way to delay building, the new building is removed and the player is given a total refund.

This algorithm is much faster and more efficient than its competitors, since it needs to only make one check each time. It's also very easy to use, since you need only write where buildings can't be built and reassign the spell to your build spell if it isn't already that.

It also comes with a much less efficient remove function which allows for removal of maze structures without issue. This function works by unassigning all of the towers that were adjacent to the one removed and so on and placing the ones adjacent to walls in a separate group. It then re-expands from the walls to make it like it was before. This occurs very, very quickly as well. This is set to happen when any building dies.




About Project

Created: October 4th 2023

Updated: October 4th 2023

Project ID: 82772

License: All Rights Reserved

__________________________________________

Game Versions:

1.01.03

1.01.03

1.01.03

1.01.03

1.01.03

__________________________________________

Flavors:

WoW Retail

__________________________________________

Categories

Companions

Battle

__________________________________________

Main File

_ForgeUser4560947_Anti-Walling Algorithm.zip
  • Release
  • October 4th 2023

    __________________________________________

    Recent File

    _ForgeUser4560947_Anti-Walling Algorithm.zip
  • Release
  • October 4th 2023

    __________________________________________

    Members

    img
    _ForgeUser4560947
    Owner

    __________________________________________

    Report