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.
  • jonas jonas:
    Is the school system in your country similar to Chinese school system? I could never imagine being a teacher in a Chinese school, what's expected of students and teachers is just so different from what I'd be looking for as a teacher
  • vypur85 vypur85:
    A Levels is based on the UK syllabus offered internationally. So the syllabus is similar throughout different countries, taught in english.
  • vypur85 vypur85:
    I can't speak or write or read much chinese... Too difficult....... Which also makes my life here in china a lil difficult.
  • jonas jonas:
    Oh, I see. I thought Chinese version of A-levels :D
  • jonas jonas:
    I've been using the translate app a lot on my phone. take a photo, translate. take another photo, translate again :D
  • jonas jonas:
    it also has voice translation, my colleagues sometimes use that
  • jonas jonas:
    You came during the 0 covid policy right? How'd you get through quarantine? Did you have some help with the apps and green codes?
  • tom_mai78101 tom_mai78101:
    If you have any Chinese you need help with, let me know.
    +1
  • vypur85 vypur85:
    @jonas Those were the things I did too. Translate app and VPN are always the most important things to have to survive. Lol.
  • vypur85 vypur85:
    Yea I came last year. I was quarantined for about 30 days. Fml. The first day of my quarantine was the eve of Chinese new year last year. Fml again... Lol.
  • vypur85 vypur85:
    @tom_mai78101 IIRC you're from Taiwan right.
  • The Helper The Helper:
    I thought China had cracked down on having any foreign teachers?
  • vypur85 vypur85:
    Yeah I've heard of the news before. My school is still actively hiring foreign teachers. Not sure how things work now.
  • The Helper The Helper:
    yeah it is hard to get reliable information about that kind of stuff
  • The Helper The Helper:
    but you are doing it so it is still doable
  • vypur85 vypur85:
    I think it doesn't affect existing foreign teachers. Then again, its still weird that my school is hiring.
  • The Helper The Helper:
    Happy Monday people hope everyone has a fantastic week!
  • Ghan Ghan:
    Happy Monday?! That's a contradiction.
  • jonas jonas:
  • jonas jonas:
    please put this in the news section, it's crazy
  • tom_mai78101 tom_mai78101:
    Technically, you can post in the Headline News. Just posted your news there.
  • tom_mai78101 tom_mai78101:
    I'm not aware of you not being able to post news.
  • jonas jonas:
    I think technically I can I just forget how
    +1
  • The Helper The Helper:
    Happy Thursday!

    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