Can you please hold the door!

Post » Sun Sep 13, 2009 12:19 pm

Okie dokey I decided that I wanted to make a AI mod that will effect every single NPC in the game(Hopefully!)

SO I started out making a Hungry variable for a NPC in Seyda neen and is there a way to make it so this person can travel into another cell and get some food.

Or will I have to make another version of this NPC for the cell I want it to go into?
User avatar
jadie kell
 
Posts: 3497
Joined: Sat Jul 29, 2006 3:54 pm

Post » Sun Sep 13, 2009 1:02 pm

BUMP
User avatar
Life long Observer
 
Posts: 3476
Joined: Fri Sep 08, 2006 7:07 pm

Post » Sun Sep 13, 2009 12:57 pm

You can move NPCs to a different location using the Position or PositionCell functions.

You may also want to take a look at Yacoby's "Pursuit Enhanced" mod, which allows things to chase you through load doors, to see what sort of methods he used.
User avatar
Laura Mclean
 
Posts: 3471
Joined: Mon Oct 30, 2006 12:15 pm

Post » Sun Sep 13, 2009 7:22 am

You can move NPCs to a different location using the Position or PositionCell functions.

You may also want to take a look at Yacoby's "Pursuit Enhanced" mod, which allows things to chase you through load doors, to see what sort of methods he used.


okay thanks so would I do

"Eldafire->PostionCell "(cell name here)"

I will make sure to credit it you!
User avatar
Pixie
 
Posts: 3430
Joined: Sat Oct 07, 2006 4:50 am

Post » Sun Sep 13, 2009 4:36 pm

okay thanks so would I do

"Eldafire->PostionCell "(cell name here)"


More like:
"Eldafire"->PositionCell, X, Y, Z, ZRot, "CellID"

Just making sure ;)

Also, to manually script the movement of NPCs all over the game would be a hell of a task :s
Not only that, but it would probably involve attaching scripts to every NPC would could create problems.

You might want to check out http://planetelderscrolls.gamespy.com/View.php?view=Mods.Detail&id=676
User avatar
barbara belmonte
 
Posts: 3528
Joined: Fri Apr 06, 2007 6:12 pm

Post » Sun Sep 13, 2009 2:36 am

More like:
"Eldafire"->PositionCell, X, Y, Z, ZRot, "CellID"

Just making sure ;)

Also, to manually script the movement of NPCs all over the game would be a hell of a task :s
Not only that, but it would probably involve attaching scripts to every NPC would could create problems.

You might want to check out http://planetelderscrolls.gamespy.com/View.php?view=Mods.Detail&id=676


What do you mean by zrot and where is the cell id found because I tried it and it said I needed a cell id!

you are both credited!
User avatar
Roisan Sweeney
 
Posts: 3462
Joined: Sun Aug 13, 2006 8:28 pm

Post » Sun Sep 13, 2009 2:23 am

What do you mean by zrot and where is the cell id found because I tried it and it said I needed a cell id!

you are both credited!


zrot is the z axis rotation (0 = face north, 90 = face east, 180 = face south, 270 = face west). cell id is the name of the cell "Balmora, Guild of Mages", "Vivec", "Pundabit" (some of those may be mispelled or misquoted)
User avatar
Steeeph
 
Posts: 3443
Joined: Wed Apr 04, 2007 8:28 am

Post » Sun Sep 13, 2009 11:15 am

zrot is the z axis rotation (0 = face north, 90 = face east, 180 = face south, 270 = face west). cell id is the name of the cell "Balmora, Guild of Mages", "Vivec", "Pundabit" (some of those may be mispelled or misquoted)


Thanks let me try this out and I will credit you as well!
User avatar
Ricky Meehan
 
Posts: 3364
Joined: Wed Jun 27, 2007 5:42 pm

Post » Sun Sep 13, 2009 4:10 pm

Heh, I wouldn't worry too much about the crediting, but thanks anyway :)

When working with PositionCell, what I usually do is place an NPC at the destination. Then, select the NPC and their co-ordinates appear in the status bar at the bottom (the z-rotation is the number at the end, I think in brackets). Then you can just copy their co-ordinates into your script, and delete them again.

This ensures they will end up exactly where you want them.

Good luck!
User avatar
Juliet
 
Posts: 3440
Joined: Fri Jun 23, 2006 12:49 pm

Post » Sun Sep 13, 2009 12:28 pm

okay I will try that but this does not seem to be working the way I have it set up is sort of like this:

short Eldafire_Hungryif (Gamehour == 8)  set Eldafire_Hungry to 1endifif (Eldafire_Hungry == 1)Eldafire->AItravel (x,y,z)Eldafire->Positioncell (Cordinates, cell)


It is a global start up script
User avatar
Svenja Hedrich
 
Posts: 3496
Joined: Mon Apr 23, 2007 3:18 pm

Post » Sun Sep 13, 2009 3:46 am

You'll want to wait until your NPC completes her movement before moving here to the new cell. Moving NPC's to cells the player is not in is notoriously unpredictable. Moving her into the cell where she eats when the player is in the cell may help.

short Eldafire_Hungryshort Eldafire_eatingif (Gamehour == 8)  set Eldafire_Hungry to 1endifif (Eldafire_Hungry == 1);I assume you have real numbers here Eldafire->AItravel (x,y,z)if ( Eldafire->getAIPackageDone == 1 )   Eldafire->Positioncell (Cordinates, cell)   set eldfire_eating to 1endIfif ( getCurrentCell "cell" == 1 )   if ( eldafire_eating == 1 )      Eldafire->Positioncell (Cordinates, cell)   endIfendIf

User avatar
Jacob Phillips
 
Posts: 3430
Joined: Tue Aug 14, 2007 9:46 am

Post » Sun Sep 13, 2009 2:06 am

Also, there's about a 0.00001% chance you'll ever hit a GameHour of exactly 8. You're going to need to either set an interval (GameHour > 8, GameHour < 8.2) or a second lock variable (if GameHour > 8, if hasEaten == 0) to make that part work right.
User avatar
Project
 
Posts: 3490
Joined: Fri May 04, 2007 7:58 am

Post » Sun Sep 13, 2009 11:03 am

Also, there's about a 0.00001% chance you'll ever hit a GameHour of exactly 8. You're going to need to either set an interval (GameHour > 8, GameHour < 8.2) or a second lock variable (if GameHour > 8, if hasEaten == 0) to make that part work right.


ah there is my issue I assume I wil lmost certanly change that thank you for all of your input!

Do you guys want to be credited for my mod if not I will most certanly make you not credited!
User avatar
Crystal Birch
 
Posts: 3416
Joined: Sat Mar 03, 2007 3:34 pm


Return to III - Morrowind