Updated mount name control

This commit is contained in:
Eddoursul 2024-01-23 16:16:40 +01:00
parent a3560e8e65
commit 6eb0689e3a
10 changed files with 40 additions and 33 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.

View File

@ -0,0 +1,19 @@
Scriptname _00E_DonkeyNameAlias extends ReferenceAlias Hidden
Event OnPlayerLoadGame()
If _00E_MuleOwned.GetValue() as Int != 0
if NQ06_Freda.sMuleName != ""
_00E_NQ06Bonni.SetName(NQ06_Freda.sMuleName)
endif
EndIf
EndEvent
GlobalVariable Property _00E_MuleOwned Auto
_00E_NQ06_Functions Property NQ06_Freda Auto
ActorBase Property _00E_NQ06Bonni Auto

View File

@ -0,0 +1,19 @@
Scriptname _00E_HorseNameAlias extends ReferenceAlias Hidden
Event OnPlayerLoadGame()
If _00E_HorseOwned.GetValue() as Int != 0
if NQ06_Freda.sHorseName != ""
(PlayerHorseAlias.GetReference() as Actor).GetActorBase().SetName(NQ06_Freda.sHorseName)
endif
EndIf
EndEvent
GlobalVariable Property _00E_HorseOwned Auto
_00E_NQ06_Functions Property NQ06_Freda Auto
ReferenceAlias Property PlayerHorseAlias Auto

View File

@ -1,17 +0,0 @@
Scriptname _00E_NQ06_DonkeyAlias extends ReferenceAlias Hidden
GlobalVariable Property _00E_MuleOwned Auto
Event OnPlayerLoadGame()
If (_00E_MuleOwned.GetValue() as Int) > 0
String sMuleName = (GetOwningQuest() as _00E_NQ06_Functions).sMuleName
if sMuleName != ""
(GetReference() as Actor).GetActorBase().SetName(sMuleName)
endif
EndIf
EndEvent

View File

@ -2,7 +2,7 @@ Scriptname PlayerHorseScript extends ReferenceAlias
Event OnDeath(Actor akKiller) Event OnDeath(Actor akKiller)
MySelf = GetActorReference() MySelf = GetActorReference()
_00E_HorseOwned.SetValue(0) _00E_HorseOwned.SetValue(0 as float)
EndEvent EndEvent
Event OnUnload() Event OnUnload()
@ -14,24 +14,10 @@ Event OnUnload()
; added a new horse that can be bought at the stables ; added a new horse that can be bought at the stables
Myself = StablesPosition.PlaceActorAtMe(LvlHorseSaddled) Myself = StablesPosition.PlaceActorAtMe(LvlHorseSaddled)
Alias_HorseRef.ForceRefTo(MySelf) Alias_HorseRef.ForceRefTo(MySelf)
Alias_HorseRef.GetRef().SetFactionOwner(StablesFaction) Alias_HorseRef.GetReference().SetFactionOwner(StablesFaction)
EndIf EndIf
EndEvent EndEvent
Event OnPlayerLoadGame()
If (_00E_HorseOwned.GetValue() as Int) > 0
String sHorseName = (GetOwningQuest() as _00E_NQ06_Functions).sHorseName
if sHorseName != ""
(GetReference() as Actor).GetActorBase().SetName(sHorseName)
endif
EndIf
EndEvent
Actor Property MySelf Auto Actor Property MySelf Auto
ObjectReference Property StablesPosition Auto ObjectReference Property StablesPosition Auto