My character wont stay drunk, or is drunk for too long!

Hello,

I’m having an issue with a badly behaved npc that wont stay drunk or stays drunk forever ! I want them to stay drunk up to a certain point then behave normally. I don’t actually want them to be drunk as sobering up that fast is impossible but it’s the best animation I could find for being stunned.

I’ve been experimenting with the conversation scripts “play custom animation” and “play animation” and although looping the play custom animation works it doesn’t cancel until the end of the conversation even if I put in a looping idle animation.

With play animation it’s a bit hit and miss and sometimes it works but on certain conversation lines nothing happens even though I put in the same numbers etc. I suspect it’s something to do with the durations overlapping. As it’s hard to tell how long a conversation line is read for I don’t see how I can ever get that right.

Putting in a very long duration overlaps the end of the “drunkenness” so isn’t really an option and one time even went on after the conversation stopped when I clicked through it fast.

So my question is how can I turn on a permanent drunk appearance and then switch it off during a conversation. Is there a clear everything and be normal script in the conversation tab that wipes out looping animations or ones that are set for a long duration ?

Thank you.

// Place this at the start of the convo.

void main()
{
	PlayCustomAnimation(GetObjectByTag("npc_tag"), "drunk", 1);
}
// Place this at the end of the convo.

void main()
{
	PlayCustomAnimation(GetObjectByTag("npc_tag"), "%", 0);
}
3 Likes

travus that is totally awesome it works perfectly and I am so happy !

I’ve spent ages messing about with this and only managed to get fed up with it.

This is in an extremely important conversation that was looking silly but now it’s just as I wanted it.

Many many thanks, you will now be immortalised in my mod with your name at the top of both scripts.

3 Likes