Jump to content

Home

[KotOR] Determining Hostility


Recommended Posts

For a mod I'm working on, I need to determine in a script if the PC is hostile, friendly, or neutral toward a creature. Unfortunately, I can't find a GetFaction() function or the equivalent. I've tried GetReputation(), but a check with my character as oSource and a hostile character as oTarget is returning values over 10, which doesn't match the documentation. (below) Am I just using GetReputation() incorrectly, or is there some other way to determine this?

 

// 208: Get an integer between 0 and 100 (inclusive) that represents how oSource
// feels about oTarget.
// -> 0-10 means oSource is hostile to oTarget
// -> 11-89 means oSource is neutral to oTarget
// -> 90-100 means oSource is friendly to oTarget
// * Returns -1 if oSource or oTarget does not identify a valid object

int GetReputation(object oSource, object oTarget);

Link to comment
Share on other sites

  • 2 weeks later...

*Update*

 

I've figured out that GetReputation() works fine everywhere but the place I'm using it - k_def_death01. I'm trying to detect all deaths and act based on faction. Does anyone have a way around GetReputation()? Apparently it wasn't made to work with death scripts.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...