Setting New AI Package

Post » Fri Feb 18, 2011 8:48 pm

Hi guys,
I'm a novice modder trying to make my first full mod with a quest, full AI, and dialogue. This is really my first time working with some of these because I reciently found that there was a http://www.thenexusforums.com/index.php?/topic/164778-tes-construction-set-error/. The scenario for my question however is that the player enters a seemingly abandoned home and discovers a book, upon doing so it tells an NPC sleeping upstairs (same cell) to go downstairs and talk to the player about the book. I've got the book and the dialogue to work, as well as the person to sleep upstairs. However I don't know how to make it so that the person will get up, unlock the door from the room he was in (though I think i know how to do that), and "find" the player after the player has read the book.

Long story short, how can change the AI packages of an NPC by reading a book?
User avatar
[Bounty][Ben]
 
Posts: 3352
Joined: Mon Jul 30, 2007 2:11 pm

Post » Fri Feb 18, 2011 11:32 pm

You just need a simple script:

http://cs.elderscrolls.com/constwiki/index.php/StartConversation
User avatar
Dalley hussain
 
Posts: 3480
Joined: Sun Jun 18, 2006 2:45 am

Post » Fri Feb 18, 2011 8:30 pm

Alright, I'm trying o make a script for the book like that but I'm no script wizard so I have a noob problem:



SCN 000OldBookPictureInHouseScript

Ref 000OldGuyRef

Begin onactivate
StartConversation player, GREETING
End



The script doesn't work (no really?). As you can see: I have the person who's supposed to talk to the player, an old man (who is a persistant reference and has been referenced as 000OldGuyRef), down as referece 000OldGuyRef. But I can't figure out where to put the identifier as to it is him I want to talk to the player. I would imagine it be like: "Ref.000OldGuyRef StartConversation player, GREETING" but that doesn't work.
User avatar
Dina Boudreau
 
Posts: 3410
Joined: Thu Jan 04, 2007 10:59 pm

Post » Sat Feb 19, 2011 3:51 am

Bump, still have that problem with my Old Man not talking to the player. I've tried a few variations such as the script below but still with little result. Perhaps the StartConversation won't work when started from a book, if so i'm back at square one and would like to know if there is a way to change the AI package from a sleep package to a Find Package.


SCN 000OldBookPictureInHouseScript

Ref 000OldGuyRef

Begin onactivate
Set 000OldGuyRef to GetActionRef
GetActionRef StartConversation player, GREETING
StartConversation player, GREETING
End

Any help is greatly appreciated!
User avatar
Emmie Cate
 
Posts: 3372
Joined: Sun Mar 11, 2007 12:01 am

Post » Fri Feb 18, 2011 8:04 pm

You will have problems if your reference names start with numbers. The script compiler may mistake them for formID's, I'm told. If the old man has a reference, you don't need to define it in the script.

SCN MyOldBookPictureInHouseScriptBegin onactivate	MyOldGuyRef.StartConversation player, GREETINGEnd 

User avatar
Rachel Cafferty
 
Posts: 3442
Joined: Thu Jun 22, 2006 1:48 am

Post » Sat Feb 19, 2011 5:58 am

Really? I never heard that before, thanks I'll try that out!
User avatar
Lyd
 
Posts: 3335
Joined: Sat Aug 26, 2006 2:56 pm


Return to IV - Oblivion