NPC AI Help

Post » Thu Dec 16, 2010 11:34 pm

Right, so as most of you know, I know my way round the scripting engine pretty well, but the truth is when it comes to certain other parts of the CS I'm fairly inexperienced.

So here's my problem. I've got a bunch of script generated NPCs But of course all they do is stand about like idiots. They're being put into what is essentially a tavern. What I'd like to do is apply an AI package to make them find the nearest free seat and sit on it - as long as it doesn't require them to leave the current room. Can somebody explain to me (in fairly basic terms) what I need to do in the packages section of the CS to make this happen. I know that once I have a package I can use the "addscriptpackage" command to apply the package to them.

Sorry for my idiocy...

HeX
User avatar
Jessica Nash
 
Posts: 3424
Joined: Tue Dec 19, 2006 10:18 pm

Post » Fri Dec 17, 2010 1:24 am

meh - nevermind. I think i've figured it out. I can at least make them sit a a chair, but if anyone has any ideas about making them find the nearest [b]empty[/] chair i'd still be very appreciative.
User avatar
Rhiannon Jones
 
Posts: 3423
Joined: Thu Sep 21, 2006 3:18 pm

Post » Thu Dec 16, 2010 8:34 pm

I think you can use a Travel package with a Find Any Object > Furniture and they will sit on any empty chairs in the area. Might be wrong about that, though, since I've never tried that myself. AI packages always require a bit of experimentation to get right, in my experience. Check the http://cs.elderscrolls.com/constwiki/index.php/Travel_Package.
User avatar
Darian Ennels
 
Posts: 3406
Joined: Mon Aug 20, 2007 2:00 pm

Post » Fri Dec 17, 2010 3:19 am

I don't remember all the details anymore, but some time ago I wrote this on the Wiki and therealneraverine said the same as TheMagician above:

Observation: a find package with the target set to Any Object and a chair Base Object selected in the ObjectID box causes the actor to play the sit animation on the furniture marker (the thing with a green wireframe) and not on the chair (sits in the air facing the chair, usually). A Find package with a specific chair reference as target works fine (and, so far, is the only acceptable way I've found to make an NPC sit) QQuix 14:28, 13 August 2009 (EDT)

-The best solution in a case like that is to use a Travel Package, and tell the NPC to sit within a certain radius of where they currently are.
therealneraverine 22:50:28, 6 September 2009 (GMT)


I also didn’t try it, because, by the time I mentioned it in the WIKI, I already had scripted a "Chair Control System" (?) to keep track of the free chairs, select one at random and add the corresponding AI package to the actor.
User avatar
Laura Shipley
 
Posts: 3564
Joined: Thu Oct 26, 2006 4:47 am

Post » Thu Dec 16, 2010 10:09 pm

I also didn’t try it, because, by the time I mentioned it in the WIKI, I already had scripted a "Chair Control System" (?) to keep track of the free chairs, select one at random and add the corresponding AI package to the actor.


That's pretty much what i've ended up doing. If in doubt, script the effect you want ;)
User avatar
Matt Terry
 
Posts: 3453
Joined: Sun May 13, 2007 10:58 am


Return to IV - Oblivion