Jump to content

Noob in need - Scripting


cjhorberg

Recommended Posts

Hi! I'm working on a simple mod which just adds some new NPCs in the game.

 

I'm trying to make them act realistically to guards by making them flee when a guard hits them or enters combat with them.

 

I was trying to do this by using the -Begin OnHit- thing, and then say something like "if attacker.IsGuard ==1 then forceav confidence 0", something simple like that.

 

My problem is that I don't know how to extract any information from the OnHit block. How to I get the reference of the attacker? I know that you can say "Begin OnHit Player" if you only want the block to run when a player attacks the object, but I want to do this in a versatile way, so that my custom NPC can react differently depending on properties that it extracts from the attacker.

Edited by cjhorberg
Link to comment
Share on other sites

  • Recently Browsing   0 members

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