MeWiseMagick Posted February 9, 2010 Share Posted February 9, 2010 I want to make something happen in the game when the character is nearby hostiles (for both exterior and interior conditions). Thing is, what script function would I call for that? Thanks to anyone who can help. Link to comment Share on other sites More sharing options...
David Brasher Posted February 9, 2010 Share Posted February 9, 2010 If you had a particular hostile you wanted the action to occur near, it could be like this: SCN AAHavingBadDaySCRIPT ; Object script attached to AABartTheBandit. Begin GameMode If Getdistance Player <= 1500 StartCombat Player; (Or whatever unpleasantness you fancy.) EndIf End Maybe what you are looking for is IsActorDetected or GetDetectionLevel. Link to comment Share on other sites More sharing options...
MeWiseMagick Posted February 9, 2010 Author Share Posted February 9, 2010 Hm....somewhat. You know when you can't sleep when hostiles are close? Is there are script function about close hostiles in general and not a specific one? I appreciate your help. Link to comment Share on other sites More sharing options...
David Brasher Posted February 9, 2010 Share Posted February 9, 2010 I suspect that the enemy detection involved with sleeping and waiting is hard-coded into the game. I wonder if there is an OBSE function to duplicate that? Hopefully someone knows an answer. Link to comment Share on other sites More sharing options...
SrJoben Posted February 10, 2010 Share Posted February 10, 2010 I don't know how to do this, but i have one piece that might help.You can check disposition and aggression to find out if an actor will attack the player. This is an example off the CS wiki: if ( callingActor.getAV aggression > 5 ) if ( callingActor.getDisposition target < callingActor.getAV aggression ) ; actor is hostile toward target endif endif Now...if your trying to build an enemy detector or something and need to identify arbitrary actors around the player...I think your going to need the OBSE functions that can be used to 'walk through' a list of references...but I"m not help there, my scripting isn't that advanced yet. Link to comment Share on other sites More sharing options...
Recommended Posts