I use the Gnomish Submarine on my map and the AI knows not to let it submerge or surface in shallow water, but it can travel through shallow water if it submerges in deep water. Is there any way to fix this?
The model is one of Xaran's. I'm thinking he wants to find a way to get a unit to go to a submerged/morphed form and only be able to go on deep water instead of being able to go to shallow water
The easiest way to do this would be to simply place regions in all your deep water, and when the submerge ability is used, pause the unit, check if it's within one of those regions, and if it isn't, order it to stop, and then unpause it.
I thought of that, but it might lag, and it might not work when multiple units are doing it. It would seem to me that if blizzard made it so you can submerge or surface in shallow water they would have a way to restrict access to it. Any ideas?
Blizzard 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.
The answer to your most recent version of the same question already exists in this thread. Take what has been posted and play with it a little while. Once you've got any kinds of results, come back.
Your respose was too use regions to check the use of the submerge ability. The game already prevents the use of submerge in shallow water. I am trying to make it so a submerged unit can't enter shallow water. I am atm trying to use regions to accomplish this.