daisy8 Posted March 8, 2012 Share Posted March 8, 2012 Hi there guys. I am attempting to use the OnHit event and to display some information about the hit on the screen. Really only doing this as an exercise to learn Papyrus !! Here is my script - ScriptName ADZChangeAttackToAggressorScript extends Actor {Script that changes a NPCs focus of attack from the player to another NPC} ObjectReference Property Chiska Auto Event OnHit(ObjectReference akAggressor, Form akSource, Projectile akProjectile, bool abPowerAttack, bool abSneakAttack, bool abBashAttack, bool abHitBlocked) if akAggressor == Chiska Debug.Notification("Bandit hit by Chiska with" + akSource) Game.GetPlayer().AddToFaction(BanditFriendFaction) elseif akAggressor == Game.GetPlayer() Debug.Notification("Bandit hit by ME with my" + akSource) EndIf EndEvent Chiska is another NPC. Any reason why I shouldn't be seeing a message saying either "Bandit hit by Chiska with Fireball" or "Bandit hit by ME with my Sword" ? Dependant on whether the NPC was hit by me or Chiska ?? In game the messages are "Bandit hit by Chiska with [form" or "Bandit hit by ME with my [weapon" Anyhelp ? Link to comment Share on other sites More sharing options...
fg109 Posted March 8, 2012 Share Posted March 8, 2012 Unlike Oblivion, there is no GetName() function in Skyrim. Unbelievable, I know! I hope that the SKSE team can get that in soon, I really miss it. Link to comment Share on other sites More sharing options...
Recommended Posts