Skip to content

Instantly share code, notes, and snippets.

@MeridiusIX
Created June 24, 2018 11:24
Show Gist options
  • Save MeridiusIX/d638f010deac18f31e0292b816571912 to your computer and use it in GitHub Desktop.
Save MeridiusIX/d638f010deac18f31e0292b816571912 to your computer and use it in GitHub Desktop.
Ingame - NPC Programming Extender - TargetCanFly
//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