Jump to content

Home

Prevent stationary turrets from moving around


WRFan

Recommended Posts

If you run away from enemies or go into stealth mode, the TSL game AI tells enemies to run around, trying to find you. This is ok, as long as the enemies are supposed to move around. But turrets are stationary objects, they are not supposed to move and it looks absolutely weird when they start moving around. This behaviour is controlled through the include file k_inc_generic.nss, it has to be adjusted to prevent turrets from moving around. We do this by simply including an appearance check, if enemies have the turret appearance, don't move them around:

 

Example:

 

int oAppearance = GetAppearanceType(OBJECT_SELF);
if ( oAppearance != 182 && oAppearance != 640 && oAppearance != 183 && oAppearance != 657  )
  {                      
  ActionMoveToLocation( newLoc, TRUE );
}

 

Wrap this around ALL ActionMovement directives in k_inc_generic.nss, everywhere, and then recompile k_ai_master.nss, which uses the generic include

Link to comment
Share on other sites

If you run away from enemies or go into stealth mode, the TSL game AI tells enemies to run around, trying to find you. This is ok, as long as the enemies are supposed to move around. But turrets are stationary objects, they are not supposed to move and it looks absolutely weird when they start moving around.

 

Could also set the movement rate of the turret creature to "Immobile" instead of "Default" in their UTC templates. Should prevent them from moving if I remember correctly.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...