HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

How to detect an Amphibious unit?

09-30-2006, 03:56 PM#1
moyack
Hi:

I'm doing an spell that drowns units in a water bubble, but I need to detect if that unit is an amphibious one. I tried to find if there is any way to detect if a unit can swim , or if a unit belongs to the Naga Race, but I didn't found nothing.

The only solution that I have is to create a function that makes unit type comparison with all the nagas, but I think it's not the best way.

Is there any idea??? Thanks in advance
09-30-2006, 04:12 PM#2
martix
Not to my knowledge. But you can: set point value, compare types of units or detect when a skill is learned/used/otherwise attained.
09-30-2006, 05:12 PM#3
BertTheJasser
Amphibous are considered neither ground nor flying. So check the unit types UNIT_TYPE_GROUND and UNIT_TYPE_FLYING. If both return false, you have a amphibious unit. Clear?
09-30-2006, 06:53 PM#4
moyack
Like the water
10-01-2006, 08:35 AM#5
BertTheJasser
Yes, it's kind of compareable