Skip to main content

Help with package

Submitted by Oblisgr on

Hello, 

I have almost finished a companion mod for Morroblivion but i want to fix the last details. I need help from anyone who knows becaus ei m stuck like 2 days....

We most know how drink package work. We get UseItemAt and apply a potion. The animation gives the actor to stand and drink. If we set a specific ref of a chair he may sit and drink too.

This is my problem. I created companions that act by themselves, using packages of current location. I made them search in current location for furniture and sit. This makes them select random chairs.

I want them to sit and drink while they are sitting. This is not easy to be done but i m trying.

I thought that it may be done the way the eat package works. At eat package the actor will sit down in a random chair (if it is not specified) and eat automatically. Can this be done with UseItemAt (drink) package too? 

This is how i done it so far but it is not working properly. The followind script is for reading but its the same thing. The actor sits and when the read package starts he stands up to read.

 

short NPCSitting
short SittingTrigger

....
....
set NPCSitting to NPC.GetSitting
....
....
If Dice_Package == 2
if SittingTrigger == 0
NPC
.AddScriptPackage NPCSittingCurrentLocation
set SittingTrigger to 1
endif
if NPCSitting == 3
NPC
.RemoveScriptPackage NPCSittingCurrentLocation
NPC
.AddScriptPackage NPCReadingCurrentLocation
PrintToConsole "%z is Reading" name
set SittingTrigger to 0
set DoOnceTrigger7 to 1
endif
endif

 

Karma: 0 (0 votes)
Last edited by Oblisgr on 7 Sep 2012 - 14:59.

Have you tried setting the 'Location' to 'Any Object - Furniture'?

Karma: 0 (0 votes)

Yes

It is not working properly. Actually it gives question idle animation. Possibly it give conflict and the actor doesnt know what to do.

Do you know if there is a sit-read or sit-drink animation? 

Karma: 0 (0 votes)

Had trouble working out where i got letthepeopleDrink.

It Is MAO Expanded is part of a addon for DMC Stylish not made for Morrowind_ob NPC loose there mugs every now and then..

Attachments

Karma: 0 (0 votes)

I used a completed script to control all the action for sitting/standing.

Now my npcs will sit to drink, read, smoke pipe, make alchemy and others.

They select from the chair inthe current location, which means that wherever you leave them, they will manage to live there. 

Karma: 0 (0 votes)