sosoxia Posted May 13, 2024 Posted May 13, 2024 how to write a papyrus script for skyrim that show debug Notification when player's mount(horse) is dead?
ghastley Posted May 14, 2024 Posted May 14, 2024 The player does not have a current mount. The closest that the game tracks is the last horse ridden, and there is no simple way to attach a notification to that. The only mount that is current is the one the player is actually riding, and no notification is needed for that. A quest that provides the player with a mount could use an alias to attach a script to the mount, but that would have to be done as a modification to all such quests, base game and mods alike. Checking if the last ridden horse is dead is easy enough, but knowing you need to ask is the hard part. 1
traison Posted May 15, 2024 Posted May 15, 2024 How about a quest, with an actor alias. Assign the horse to that alias. Give the alias a script and listen for the OnDeath event. The quest can then track whether or not the horse is alive, and can be queried externally if needed.
sosoxia Posted May 16, 2024 Author Posted May 16, 2024 On 5/15/2024 at 3:03 AM, ghastley said: The player does not have a current mount. The closest that the game tracks is the last horse ridden, and there is no simple way to attach a notification to that. The only mount that is current is the one the player is actually riding, and no notification is needed for that. A quest that provides the player with a mount could use an alias to attach a script to the mount, but that would have to be done as a modification to all such quests, base game and mods alike. Checking if the last ridden horse is dead is easy enough, but knowing you need to ask is the hard part. thx for explain!
sosoxia Posted May 16, 2024 Author Posted May 16, 2024 12 hours ago, traison said: How about a quest, with an actor alias. Assign the horse to that alias. Give the alias a script and listen for the OnDeath event. The quest can then track whether or not the horse is alive, and can be queried externally if needed. May I ask how to implement it specifically?
traison Posted May 16, 2024 Posted May 16, 2024 4 hours ago, sosoxia said: May I ask how to implement it specifically? One script for the quest, another for the alias. Have the quest script track when the player mounts a horse: Event OnAnimationEvent(ObjectReference akSource, string asEventName) If (akSource == PlayerRef && asEventName == "tailHorseMount") Actor horse = Game.GetPlayersLastRiddenHorse() TravelCompleted() If (PlayerOwnsHorse(horse)) ; Mark horse as alive again, afterall, you can't mount a dead horse right? ; Asign horse to the "current horse" quest alias EndIf EndIf EndEvent Assign that player owned horse to the quest alias. Have the alias script track when the horse dies: Event OnDeath(Actor akKiller) ; Mark horse as dead in the quest script EndEvent
sosoxia Posted May 17, 2024 Author Posted May 17, 2024 On 5/16/2024 at 6:21 PM, traison said: One script for the quest, another for the alias. Have the quest script track when the player mounts a horse: Event OnAnimationEvent(ObjectReference akSource, string asEventName) If (akSource == PlayerRef && asEventName == "tailHorseMount") Actor horse = Game.GetPlayersLastRiddenHorse() TravelCompleted() If (PlayerOwnsHorse(horse)) ; Mark horse as alive again, afterall, you can't mount a dead horse right? ; Asign horse to the "current horse" quest alias EndIf EndIf EndEvent Assign that player owned horse to the quest alias. Have the alias script track when the horse dies: Event OnDeath(Actor akKiller) ; Mark horse as dead in the quest script EndEvent Bro thx! but.. how can i use these ??? save as a psc? then transfer to Pex? idk how to use
sosoxia Posted May 17, 2024 Author Posted May 17, 2024 46 minutes ago, traison said: Lots to learn then. Could start here. can i make a script file in game /Data folder ? then directly happen?
traison Posted May 17, 2024 Posted May 17, 2024 1 hour ago, sosoxia said: can i make a script file in game /Data folder ? https://ck.uesp.net/wiki/Bethesda_Tutorial_Papyrus_Hello_World
sosoxia Posted May 18, 2024 Author Posted May 18, 2024 5 hours ago, traison said: https://ck.uesp.net/wiki/Bethesda_Tutorial_Papyrus_Hello_World god damn cool! i love u bro!
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now