Jump to content

TG03MeadBarrel and adding a Tankard


Recommended Posts

So in this example, the NPC has to have the goblet in inventory?

 

In your original setup with the script only on the mead barrel, does the NPC also have to have goblet in the inventory? And that one did work, but only for subsequent animations?

Link to comment
Share on other sites

Yes. For this purpose it is designed with one specific person in mind. If you want it to work with random NPC's but not have the Player trigger the triggerbox script try this:

 

 

Scriptname TH_DrinkingIdle_Effect_Script extends ObjectReference

Idle property OffSetCarryMQ201DrinkR Auto
Actor Property PlayerRef Auto

Auto State In
Event OnTrigger(ObjectReference akActionRef)
If akActionRef == !PlayerRef
utility.wait(0.1)
Debug.SendAnimationEvent(akActionRef, "OffSetCarryMQ201DrinkR")
Utility.Wait(8.0)
GoToState("Out")
EndIf
EndEvent
EndState

State Out
Event OnTrigger(ObjectReference akActionRef)
If akActionRef == !PlayerRef
Utility.Wait(8.0)
GoToState("In")

EndIf
EndEvent
EndState

 

 

Have not tested it in game but it compiles. Do the same on the furniture script. As in change the YOURACTOR to !PlayerRef (not the player) and then any random NPC should be able to use it.

 

I had to change some of the wait times around a bit when I moved the set up out of my test cell. But the principle is the same.

Edited by TyburnKetch
Link to comment
Share on other sites

Hi TyburnKetch!

 

You thanked me a while back for making this possible. I suppose I can take the credit for pointing you in the right direction, but you have my admiration for getting this as far as you now have. I couldn't even be bothered to attempt that!

 

I guess this just typifies what Nexus is all about. We all have different knowledge/skills. On our own we can achieve a lot, but together we can work wonders!

 

This is why I love Nexus!

Link to comment
Share on other sites

  • Recently Browsing   0 members

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