Jump to content

Recommended Posts

Posted (edited)

Hi all,

 

I have some randomly generated NPCs who I want to draw weapons with the player. I'm currently using OnAnimationEvent() to detect when the player draws or sheathes their weapon and a duplicate package on the NPCs, with the Weapon drawn flag checked and a conditional for if the player's weapon is out.

 

I'd like the change to be instant, but the NPCs only seem to realise they need to draw/sheathe when the player enters or exits sneak mode. I've tried EvaluatePackage(), but no luck.

 

Any suggestions?

 

 

Solved: OnAnimationEvent() wasn't firing. I just added the following line to both packages under On Begin, which means I could remove all the code pertaining to this from the core script. My NPCs now draw/sheathe when the player does.

(akActor as Actor).EvaluatePackage(True) 
Edited by Minuos
Posted (edited)

Are these NPCs teammates (Actor.IsPlayerTeammate() == True)? If so, you can add the keyword TeammateReadyWeapon_DO to them.

Edited by LarannKiar
Posted (edited)

No, they aren't teammates. I did toy with the teammate system and that keyword when I was trying to give the player credit for their kills but it overrides/breaks other features of mine that are core to the mod.

Edited by Minuos
  • Recently Browsing   0 members

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