Warcraft III resources & community, 2003–2006 · archived

Shallow water restricted to submarines

27 posts
#16
That would work except that once it is stopped, its already in the region and thus it can continue. Is there a way I could make a custom pathing blocker that only blocks certain units?
#17
No, not really. Unless you create like a neutral hostile unit with locust to attack the subs and sink them on shoreline for that, or cause them to move backward
#18
Are they ever supposed to exist as un-submerged units? If so, then you can order them to emerge instead of stop.
#19
Omg Panto I luv you. Why the crap didn't I think of that? And when the unit leaves the region I could make it resubmerge, so the user doesn't have to worry about it.
#20
Well I can't get it to work, I even tried to use rocks to block the subs, they work but then regular boats can't go there. Maybe there is a way to do this with JASS, I really need an answer to this.
#21
Ever just replace the unit with relative life and mana?
#22
What do you mean?

I waa thinking that the game differs shallow water from deep water only in the sense that ground units cannot walk in deep water. I thought that maybe if I changed the movement type of the subs to foot, but then for some reason they arent able to move even when I set their movement height to 180 or higher. Any thoughts?
#23
Movement height is almost entirely an "art" field; it has no effect on the unit's ability to move. Morever, it only makes an effect on Hover and Fly movement types.
Lastly, Foot won't be able to go in deep water at all, which is the one thing you do want them to do. Why would you use Foot?

What was wrong with triggering an unsubmerge?
#24
Foot would make sense if the units were able to walk in it. You see if they could, then the submerged sub would be restricted by the sam things a ground unit would. (IE the shallow terrian wall would then stop the unit as it does above the ocean.) I can't find a trigger command that allows to force a unit use an ability, and I started to lay the regions but ended up using over 100 for a reletively small area.(I was following the coastline exactly.)

I really think there could be a way to do this with JASS, as the game pathing knows not to let ground units fall off the side of the cliff in shallow water. I could use regions, but it seems to sloppy. I would end up using about 600 regions, and that is simply too much.
#25
PantoBlizzard didn't make any difference between shallow and deep water except that "foot" and "horse" movement can't move in deep water, to my knowledge. I'm not sure what you're basing your presumption off of.

As long as there are no Waits in your trigger (and there should be none), even if it's in GUI, it won't mess up which unit's triggering it. It will always finish the trigger its executing before starting the next.

Also, as long as you don't do something silly like an infinite loop, it certainly won't lag. You're talking about a VERY simple trigger.

no Blizzard made naga be able to submerge in deep but not un shallow remember
#26
The game doesn't calculate based on the terrain. It creates a pathing map when you save your map, and makes all its decisions off of that. If a unit can't move in a certain kind of pathing, it can't walk onto it and can't be placed there. The underwater cliff doesn't make a difference. Try sloping your underwater cliffs and see if units can walk over them, then.

Pathing can be unbuildable, unwalkable, or unfly-able, or any combination of those three, or none.

If you hit P in your world editor, you can see the pathing map. Blue represents unbuildable, red unwalkable, and green unfly-able, if I remember right. Combinations of colors represent combinations of pathing. For example, purple is both unbuildable and unwalkable. White cannot be built on, walked through, or flown over.

I'd encourage you to not follow the edges of your shallow water exactly, in order to generalize and use less regions. It will almost certainly be the most efficient and reliable method to solve this.
#27
/me cries

Well back to work then. I still need help on the actual trigger though, perhaps an exampls could be written?