Jump to content

Stop Animation In Papyrus - Please Help


demidekidasu

Recommended Posts

Hi all,

 

I am working on a new feature for my LIAT - Lively Inns And Taverns mod, where it adds a keg of "local brew" behind the bar of inns. I managed to put a script together which makes your character play out a "drink" idle, then a "drunk start" idle, then a "uncontrollable cough" idle to make it look like vomiting lol

 

Here is the script I chucked together that is attached to the "local brew" object, which runs when the player activates the object. So far, it seemingly works perfect aside from one issue:

 

Scriptname LIATdrinkbrew extends ObjectReference
{Strong local brew}

idle property IdleDrink auto
idle property IdleDrunkStart auto
idle property IdleUncontrollableCough auto

Event OnActivate(ObjectReference akActionRef)

Debug.MessageBox("You down a flaggon of the strong local brew...")

	game.getplayer().playidle (IdleDrink)

		Utility.Wait(10.00)

Debug.MessageBox("The brew hits you like a mad sabre cat!")

	game.getplayer().playidle (IdleDrunkStart)

		Utility.Wait(60.00)

	game.getplayer().playidle (IdleUncontrollableCough)

		Utility.Wait(10.0)

			Debug.MessageBox("The strong brew has found its way to the floor... You feel much better now, but should sit down for a moment.")

endevent

 

 

So, the problem is that the drunk animation will not stop. I put in the vomit animation and the message suggesting to sit down in the hope that either of these actions/animations will reset the idle, but it doesn't.

 

Is there a line I can put in that will force a reset/stop of the idle/animation?

 

I also have another bug with the drunk animation but I will try to fix it on my own first :)

 

Huge thanks in advance to anyone who may know. I have been searching the wiki and google to no avail so far. I am quite new to scripting, BTW :P

Link to comment
Share on other sites

  • 8 months later...

Thread necromancy much :P

 

I can't really remember. It's a long time ago if I'm honest...

 

Bear in mind you need to define the idle in the properties section of your script. Could that be your problem?

Edited by demidekidasu
Link to comment
Share on other sites

  • 6 years later...

debug.SendAnimationEvent(NPCPlayer,"IdleStop_Loose")

debug.SendAnimationEvent(NPCPlayer,"IdleForceDefaultState")

 

 

where NPCPlayer is defined somewhere either as an actor npc or the player

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...