parent
ccb57364f8
commit
9af1c0c8bd
54 changed files with 123 additions and 131 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,30 @@ |
||||
Scriptname _00E_Func_SetNPCAsCompanion Hidden |
||||
|
||||
Function SetNPCAsCompanion(Actor akActor, bool bCompanion = True, int iCompanionHealth = 100, int iCompanionStamina = 100, int iCompanionMagicka = 100) Global |
||||
;Sets an NPC as companion, showing his health bar, making him friendly, unflagging him as ghost. Does the opposite when bCompanion is set to false. |
||||
;Additionally sets the AVs Health, Stamina, Magicka for the NPC companion |
||||
|
||||
If bCompanion |
||||
|
||||
akActor.SetRelationshipRank(Game.GetForm(0x14) as Actor, 3) |
||||
akActor.SetGhost(False) |
||||
akActor.getActorbase().SetEssential(true) ; just in case, had trouble with FS_NQR05 |
||||
akActor.SetPlayerTeammate(True) |
||||
akActor.IgnoreFriendlyHits() |
||||
akActor.SetActorValue("Health", iCompanionHealth) |
||||
akActor.SetActorValue("Stamina", iCompanionStamina) |
||||
akActor.SetActorValue("Magicka", iCompanionMagicka) |
||||
HealthBarManager.Show(akActor) |
||||
|
||||
Else |
||||
|
||||
akActor.SetGhost(True) |
||||
akActor.getActorbase().SetEssential(true) ; just in case, had trouble with FS_NQR05 |
||||
akActor.ResetHealthAndLimbs() |
||||
akActor.SetPlayerTeammate(False) |
||||
akActor.IgnoreFriendlyHits(False) |
||||
HealthBarManager.Hide(akActor) |
||||
|
||||
EndIf |
||||
|
||||
EndFunction |
Loading…
Reference in new issue