Jump to content

Scripting Question - In the presence of nearby hostiles


MeWiseMagick

Recommended Posts

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

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

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...