Jump to content

Home

How I can make NPC attackable target?


Recommended Posts

Posted

Can you show me? How I can make NPC attackable target (red) that will attack player.

 

If I want one NPC turn to attackable target, then how?

 

Also, how I can make entire NPC in area turn to attackable target?

 

Did I need notepad to make script then rename to file type?

Posted

The simplest way would be to pen KOTOR tool, go to RIMS, go the module the NPC is in, click the NPC template, go to advanced, and set the faction to 5. This is for already existing NPCs. Once you've done that, save the file, and plop it into override.

Posted
Originally posted by Greatstar

Can you show me? How I can make NPC attackable target (red) that will attack player.

 

If I want one NPC turn to attackable target, then how?

 

Also, how I can make entire NPC in area turn to attackable target?

 

Did I need notepad to make script then rename to file type?

 

I think this should turn all creatures in the area hostile. Needless to say running this in the wrong area will mess up your game. :)

 

void main() {
   object oCre = GetFirstObjectInArea();

   while (GetIsObjectValid(oCre)) {
       if (!GetIsEnemy(oCre, GetFirstPC()) 
           && !IsObjectPartyMember(oCre)) 
       {
           ChangeToStandardFaction(oCre, STANDARD_FACTION_HOSTILE_1);
       }
       oCre = GetNextObjectInArea();
   }
}

 

To just make a single creature hostile, pass them as a parameter to a ChangeToStandardFaction() function call.

Archived

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

×
×
  • Create New...