4
Fork 0
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

31 lines
836 B

Scriptname PlayerHorseScript extends ReferenceAlias
Event OnDeath(Actor akKiller)
MySelf = GetActorReference()
_00E_HorseOwned.SetValue(0 as float)
EndEvent
Event OnUnload()
If MySelf.IsDead()
; disable the dead horse if it is unloaded
MySelf.Disable()
MySelf.Delete()
(GetOwningQuest() as _00E_NQ06_Functions).sHorseName = ""
; added a new horse that can be bought at the stables
Myself = StablesPosition.PlaceActorAtMe(LvlHorseSaddled)
Alias_HorseRef.ForceRefTo(MySelf)
Alias_HorseRef.GetReference().SetFactionOwner(StablesFaction)
EndIf
EndEvent
Actor Property MySelf Auto
ObjectReference Property StablesPosition Auto
ActorBase Property LvlHorseSaddled Auto
ReferenceAlias Property Alias_HorseRef Auto
Faction Property StablesFaction Auto
GlobalVariable Property _00E_HorseOwned Auto