How to check if there is an avalible path?

feelingparty

New Member
Reaction score
3
I'm pretty sure many of you have played Tropical Tower Wars. If so then you should know what I am talking of, if not let me explain: since you put buildings freely (no restrictions on where to put them) there is some system that does not let you block the way of the creeps - the creeps move towards the desired location and when they find there is no way they explode. So does anybody know how this could be done?
 

Rushhour

New Member
Reaction score
46
Someone else wanted to have the same thing, check out the algorithm I wrote:

Explanation:
http://www.thehelper.net/forums/showpost.php?p=1269933&postcount=28

Demo map: (you need JassNewGen pack to edit, save and implement this into your map)
http://www.thehelper.net/forums/showpost.php?p=1270603&postcount=30

It checks if there exists a path between two points/ two pairs of coordinates. In the demo map, the the tower will be destroyed if it blocks. But of course you can wait to kill this tower until a creep comes near it.
Setting the parameters really depends on your map and of the size the maze of towers could be like. Using higher values is more accurate, using lower values is faster.
 

feelingparty

New Member
Reaction score
3
thanx alot. judging by the demo map it is promising :D I wonder however if this system will count doodads as pathing blockers as well
 

Rushhour

New Member
Reaction score
46
It does. Everything including doodads will count as unpathable, if they have a pathing map set in the object editor.

The only problem could be items.

To check if a point is pathable this moves an item to the specific point and checks if the point where the item got moved by the game engine is nearer than 10 yards from the point it should have been moved.
The reasons this works is because the game engine would move the item to another spot if the target isn't walkable.

But since there is a very small possiblity that there is another normal item lying on the ground at a position that gets checked. (item on top of another item doesn't work). So setting the constant boolean to 'true' will check if there are items near the target location. I didn't test this, but this is what vexorian set up his system, so I think it will work ;D

Any more questions?
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • The Helper The Helper:
    Damn here come the bots again - 193 online but they are totally invisible to any stats - bunch of bots!'
  • C cubanismo:
    Re: Taco Tuesday, if there were some way to share edible tacos over the internet, technology would be complete.
    +2
  • The Helper The Helper:
    One can only wish!
  • tom_mai78101 tom_mai78101:
    I'm back from Taiwan
    +1
  • The Helper The Helper:
    I am reorganizing the site I know nobody will notice but I am not done quite yet but the main forums order has been changed and there is a new news category in Other News which is all the remaining headline news stuff not categorized - Headline News is just the stuff that shows on the main page now and the news archive is off the main forums page
  • The Helper The Helper:
    and the real archive lives off of headline news
  • The Helper The Helper:
    Happy Monday!
  • V-SNES V-SNES:
    Happy Saturday!
  • The Helper The Helper:
    Happy Saturday Night!
    +1

    The Helper Discord

    Members online

    No members online now.

    Affiliates

    Hive Workshop NUON Dome World Editor Tutorials

    Network Sponsors

    Apex Steel Pipe - Buys and sells Steel Pipe.
    Top