How can a ship pass under a bridge?

Level 5
Joined
Oct 29, 2023
Messages
25
Hi everyone, I have a question: How can I make a ship pass through a bridge?

I tried letting the ship destroy the bridge, but the problem is that the bridge leaves behind wreckage, so the ship still can’t cross the river.
1754352254665.png


Then I used a trigger to remove the bridge from the game when it dies. That worked to some extent, but there’s another issue: land units can still walk through the area where the bridge used to be.

Does anyone have a good solution for this?
1754352270347.png

1754352319817.png


Also, another question:
Why is it possible to build a shipyard on top of a bridge?
Is there a way to prevent shipyards from being built on bridges?

1754352457453.png


I tried using invisible platforms to block the area, but they have collision issues with the bridge.

Any ideas or suggestions would be greatly appreciated. Thanks a lot!
 
Short answer is that they can't :p Best workaround is either moving them on the other side via trigger when they reach the edge of the bridge, or have some sort of invisible gateway on both sides so that they can figure out a path by themselves

For the shipyard, it's because of these two:

1754391455205.png


I recommend setting it to sea-pathable, a water radius of 0, and movement type to Float, so that they can only be placed on water
 
Short answer is that they can't :p Best workaround is either moving them on the other side via trigger when they reach the edge of the bridge, or have some sort of invisible gateway on both sides so that they can figure out a path by themselves

For the shipyard, it's because of these two:

View attachment 544777

I recommend setting it to sea-pathable, a water radius of 0, and movement type to Float, so that they can only be placed on water
you mean short water, not deep, right?
 
@Tianqi your question is confusing. Your title says "pass under a bridge" while your post text says "pass through a bridge". That is important distinction.

I don't know about passing "under" bridge, but it is definitely possible to pass "through" bridge.
Bridges have two pathing textures: one for "alive" state and other for "dead" state.
If you check your bridge's "Pathing - Pathing Texture" and "Pathing - Pathing Texture (Dead)" fields in Object Editor, you will see which textures they use. Shift+click those fields so that you can see file path of the selected pathing texture.

If you use tools like Warcraft 3 Casc View, you can extract that texture from WC3's asset onto your disk and investigate it.
For example, following is the pathing texture used by "Wide elven bridge (horizontal)":

1754415958267.png


The magenta area is where units cannot pass, while blue is where they can pass.
Here is pathing texture for same bridge, but this time its "dead" version:

1754416045313.png


You can see that the entire middle area is now magenta (blocking). This is why your ships cannot pass through destroyed bridge.
But there is nothing stopping you from using a custom pathing texture, like in following example:

1754416127054.png


It is same as previous pathing texture, except I made the entire middle area black. Black means that this pathing texture will not affect map's existing pathing in any way.
You can import such pathing texture into map, save the map and then assign the texture to the bridge's "Pathing - Pathing Texture (Dead)" object editor field (using again the shift+click trick so that you can see and modify texture path).



As for building a shipyard on a bridge - I am unable to do that in a fresh map, so I think you may have modified the bridge in some way and as a consequence, you can build shipyard there as well.
 
Back
Top