Guest Posted September 15, 2024 Posted September 15, 2024 I've made club where I want the dancers to have daily routines that mix between sandbox, dancing (custom animations) and sleeping. The custom dance animations are linked in an Ai package with the template package "useidlemarker", and the dancer will move to patrolidlemarker defined in the Ai package. This works so far. The problem is when the Ai package is completed (duration = 60). The NPC will instead of using the next Ai package in the list, which is resting on a bench, just continue using the dance animation idle at the same spot. What can I do to make sure the NPC stops dancing when those 60 ingame time units has passed? What I've tried, but failed: -Linking animations to idle marker instead of Ai package -Setting patrol data to 60 on patrol idle marker to force an stop ,(didn't change template package in Ai package) -Linking the patrol idle marker to another idle marker to try to interrupt the dance animation by moving the actor to next marker - turn off "must complete" on Ai package.
DarkBlade13 Posted September 15, 2024 Posted September 15, 2024 Did you try Function DanceFunction() Dancer1Alias.Clear() Dancer2Alias.ForceRefTo(Dancer1) (Dancer1 as actor).EvaluatePackage() EndFunction ReferenceAlias Property Dancer1Alias Auto ReferenceAlias Property Dancer2Alias Auto Actor Property Dancer1 Auto When running a package it's possible that when the package ends things are bugged. What you want to do it terminate the previous package by expiring conditions or remove them from the package. Then assign the actor to a new package. When that is done you call EvaluatePackage() on the actor so the next package starts playing.
Guest Posted September 15, 2024 Posted September 15, 2024 (edited) 27 minutes ago, DarkBlade13 said: Did you try Function DanceFunction() Dancer1Alias.Clear() Dancer2Alias.ForceRefTo(Dancer1) (Dancer1 as actor).EvaluatePackage() EndFunction ReferenceAlias Property Dancer1Alias Auto ReferenceAlias Property Dancer2Alias Auto Actor Property Dancer1 Auto When running a package it's possible that when the package ends things are bugged. What you want to do it terminate the previous package by expiring conditions or remove them from the package. Then assign the actor to a new package. When that is done you call EvaluatePackage() on the actor so the next package starts playing. Thank you for replying. No I haven't tried that. I'm a noob with scripts and not really sure how to proceed with this. I have not used alias when assigning the AI package to actor. Merely just linked the packages directly to the NPC(s). Does it require me to compile a new script and attach it to the ai package? Or can the text be pasted into the Ai package window that I've attached a screenshot of? Edited September 15, 2024 by Thor2000
DarkBlade13 Posted September 15, 2024 Posted September 15, 2024 The ai packages that are put on the npc's should remain limited for functionality purpose. You need to select the quest aliases tab. Make a new alias, atach the ai packages to that alias.
DarkBlade13 Posted September 15, 2024 Posted September 15, 2024 Check these boxes. Then assign the allias through script. If you need help on how to write scripts you can read my blog or ask me.
Guest Posted September 16, 2024 Posted September 16, 2024 (edited) 18 hours ago, DarkBlade13 said: Check these boxes. Then assign the allias through script. If you need help on how to write scripts you can read my blog or ask me. Thanks. I believe the animation actually do stop and that I was wrong to assume otherwise. It seems that the dance animation has to run to its end regardless of the scheduled time set in the AI package (animations are like 60-120 ingame minutes). Which is sort of fine. I can just put up a "backstage" sandbox package that throws the dancers out when the animation ends. I'm sorry for creating such a fuzz about it. I should have observed the animation with a bit more patience. I've wasted a lot of hours on it already 😖 edit: Thank you Darkblade13 for offering to help though. That's kind. I've put a "follow" on your blog 🙂 Edited September 16, 2024 by Thor2000
Andy14 Posted September 18, 2024 Posted September 18, 2024 On 9/15/2024 at 1:25 PM, Thor2000 said: What can I do to make sure the NPC stops dancing when those 60 ingame time units has passed? The following code also works to end an animation. debug.SendAnimationEvent(theDancer as objectreference, "IdleForceDefaultState") theDancer is the actor
Guest Posted September 19, 2024 Posted September 19, 2024 (edited) 11 hours ago, Andy14 said: The following code also works to end an animation. debug.SendAnimationEvent(theDancer as objectreference, "IdleForceDefaultState") theDancer is the actor Thanks Andy. For now I will just have actors use the dance animations default length. It makes sense since lots of the dances have a "grande finale" 😁. It's a little "weird" how Skyrim engine handles the dance animations. If you wait in game, NPC usually get transported around out of their current state, idles etc. But not from these dance animations. They will dance the exact amount of time the dance animation last even if you wait a week ingame 😅. Sometimes that leads to two actors dancing at the same time. Pretty funny. I've actually used several dances from your mod "Let's dance again" (I noticed permissions are granted as long as you credit properly). The only thing I now miss is decent stripper outfits for the actors and permission to use BnP skin. I noticed BnP doesn't just hand out permissions to use skins on followers and such. Edited September 19, 2024 by Thor2000
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