enroger Posted December 4, 2010 Share Posted December 4, 2010 Hi guys, a script I'm working on needs to determine the hostility of any actor (NPC/creature) towards the player. I've read the getshouldattack isn't very accurate as if the actors are in different cell then it would return zero. Also I've tried the recommended code there if ( callingActor.getAV aggression > 5 ) if ( callingActor.getDisposition target < callingActor.getAV aggression ) ; actor is hostile toward target endifendif it also didn't work because I think in FO3 max aggression is 3. But I don't know what disposition does, at what value would it cause a creature/NPC to attack the player on sight? Link to comment Share on other sites More sharing options...
rickerhk Posted December 5, 2010 Share Posted December 5, 2010 I haven't seen disposition used much. On the Overseer during 'Escape' is all I can think of.This is what I use to detect enemies in general: short iRelation short iIsEnemy set iRelation to ActorRef.GetFactionRelation Player if ((iRelation <= 1); Neutral or enemy if (iRelation == 0) ;Neutral if (ActorRef.GetAv Aggression > 1) ;Attacks neutrals on sight set iIsEnemy to 1 endif elseif (iRelation == 1) ;Enemy set iIsEnemy to 1 endif else set iIsEnemy to 0 endif Link to comment Share on other sites More sharing options...
enroger Posted December 6, 2010 Author Share Posted December 6, 2010 It worked!! God I was soooo going mad about it! Kudos to you! :thumbsup: Link to comment Share on other sites More sharing options...
Recommended Posts