Author
Message This forum is locked: you cannot post, reply to, or edit topics. This topic is locked: you cannot edit posts or make replies.
presh
Developer
26 Oct 2004



Hello,

Is it possible to attach script to things, say a book, and have it change based on what the PC has done?

Heres what I want to do. I have a small note in the Alma Rulas palace, and it talks about temple stuff. However it becomes irrelevant if the PC has completed the main quest. So can scripts check if the PC has completed the main quest and replace the note with another note that is more up to date?

Sorry, this might be a really stupid question - I know nothing about scripting.

P.S. I know that I'm not allowed to attach scripts to interiors, just seeing if it is possible.

_________________
"Poverty is the worst form of violence."
-- M. Ghandi
Post Thu Jul 21, 2005 9:40 am Send private message             Reply with quote                   up  
Saibot
Developer
20 Apr 2005

Location: Utah

Im still pretty new at scripting but i've seen doors be replaced through scripting, so I'm pretty sure its possible.
Post Thu Jul 21, 2005 9:44 am Send private message       Send e-mail       Reply with quote                   up  
presh
Developer
26 Oct 2004



Cool. Thank you.
_________________
"Poverty is the worst form of violence."
-- M. Ghandi
Post Thu Jul 21, 2005 10:09 am Send private message             Reply with quote                   up  
Stalker
Developer Emeritus
09 Apr 2004

Location: Ukraine

Possible an extremly easy. I'll write it in a few mins.
_________________


Your friendly slavedriver.
Post Thu Jul 21, 2005 10:11 am Send private message             Reply with quote                   up  
Assassinace
Developer
21 Aug 2003

Location: Dreamland

Yeah you just remove and add the object with the script based on if the main quest is done. At any rate I'll write it tonight if stalker doesn't do it.
Post Thu Jul 21, 2005 3:23 pm Send private message             Reply with quote                   up  
Stalker
Developer Emeritus
09 Apr 2004

Location: Ukraine

Assassinace wrote:
Yeah you just remove and add the object with the script based on if the main quest is done. At any rate I'll write it tonight if stalker doesn't do it.

Please do. I have realised that sadly I don't have the time for it. After all it is needed to be tested too.

_________________


Your friendly slavedriver.
Post Thu Jul 21, 2005 3:53 pm Send private message             Reply with quote                   up  
Zalzidrax
Developer
03 Dec 2003

Location: Bothell, WA

Simply check if the cell has changed and if the player has the proper journal entry, and if those both are true enable the new note and disable the old one.
Post Thu Jul 21, 2005 6:23 pm Send private message             Reply with quote                   up  
Assassinace
Developer
21 Aug 2003

Location: Dreamland

begin SCRIPTX

if ( GetPCCell "???" == 1)
if ( GetJournalIndex "Dagoth UR" = x )
PlaceItem "note2" x y z zrot
Disable
endif
endif

end SCRIPTX

Ok now for explanation
SCRIPTX will be your scripts name

??? will be the cell the note is in

"Dagoth UR" will be the main quest journal entry name and x will be the actual entry number

"note2" will be the id of the 2nd note and xyzzrot will be it's coordinates (You can alse just enable the book rather then creating it if you add the note and disable it which is probly easier)

I think that should be everything. Most of that info you can find in the editor but if you have any questions please ask.
Post Fri Jul 22, 2005 11:19 pm Send private message             Reply with quote                   up  
Argoth
Developer
30 Aug 2004



Just a note, if the two books that you are placing are unique it would be probably be easier to put a script on each book and have the script disable and enable them; but the other script would work better if you have many different object. Remember also that in order to delete a specific object it has to be unique (unless you put the scipt on the object and do a cell check) because if you place 5 of the same books you cannot specify which one you are referencing.
Code:

if ( GetJournalIndex "Dagoth UR" > x )
    Disable OR Enable
endif
Post Sat Jul 23, 2005 6:16 pm Send private message       Send e-mail       Reply with quote                   up  
presh
Developer
26 Oct 2004



The two books are unique, so that isn't a problem.

It is a little while before I can add them because I am just building the interior, and scripts are added later.

Thank you for the help.

_________________
"Poverty is the worst form of violence."
-- M. Ghandi
Post Tue Jul 26, 2005 9:54 am Send private message             Reply with quote                   up  
Raijin
Member
13 Jul 2005

Location: NC, USA

Actually, if Dagoth Ur has been killed, I'd suggest just having the first note delete itself, and then have the second note enable itself.

Delete:
Code:
   disable
   setdelete 1
Post Wed Aug 03, 2005 11:43 pm Send private message       Send e-mail       Reply with quote                   up  
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics. This topic is locked: you cannot edit posts or make replies.

 
The content of this site is © by the Tamriel Rebuilt community. Morrowind, its expansions, and its content is © Bethesda Softworks.
Forums powered by phpBB © 2001, 2005 phpBB Group