Created
June 24, 2018 11:24
-
-
Save MeridiusIX/d638f010deac18f31e0292b816571912 to your computer and use it in GitHub Desktop.
Ingame - NPC Programming Extender - TargetCanFly
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//NPC Programming Extender - TargetCanFly | |
/* | |
Description: | |
- This method will check if a grid (identified via | |
entity ID) is capable of proper flight. It will | |
check for thrust in all directions, gyros, power, | |
and a functional ship controller. If any of these | |
requirements are not met, the method returns false. | |
Dependancies: | |
- NPC Programming Extender mod. | |
Arguments: | |
- long entityId //This should be the entity Id of the grid you want to check. | |
*/ | |
bool TargetCanFly(long entityId){ | |
try{ | |
Me.CustomData = entityId.ToString(); | |
return Me.GetValue<bool>("NpcExtender-TargetCanFly"); | |
}catch(Exception exc){ | |
return false; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment