Toggle Persistance on disabling objects

Post » Wed Jan 20, 2010 7:10 pm

Alright, now for my 50th question in two days, I have a book, and when you pick it up it's supposed to add it to your inventory and disable the one on the ground. Yes i realize this sounds pointless, but for some reason when I tried to pick it up ingame, It didn't pick up, only read it and then froze the menu's. So, here is my alternative. If anyone knows a solution to either that first problem, or how to get around having to make the books references persist, i would be grateful. The pepole in this forum are as amazing as always!

begin 01mc_daedrasummonscriptshort doneif ( OnActivate == 1 )	if ( done == 1 )		Activate		return	else		Set done to 1		PlaceAtPC "01mc_creatureaq" 2 128 1		Journal "mc_dissidentpriest" 50		player->additem "01mc_ethrealvoid" 1		01mc_ethrealvoid->disable		;1 of them, 256 units away, in back (1) of the player		Activate	endifendifEnd

EDIT: Realized I had wrong script up.. :intergalactic:
User avatar
Courtney Foren
 
Posts: 3418
Joined: Sun Mar 11, 2007 6:49 am

Post » Thu Jan 21, 2010 3:19 am

It's not pointless at all. I'm using this method to pick up a specific book without reading it, but in your situation I don't understand why you are doing it. I don't know why you would need the reference to persist either, unless you need to reference it from another script and the book isn't loaded into memory; meaning you haven't visited the cell with the book yet.

Why can't you use the same book? You shouldn't need to disable. Normally, picking up the book again won't redo the other operations. If you just want to have a copy without the script though, I can understand.

I can't see why this script wouldn't work at a glance, assuming all IDs are correct. Though you should get an error compiling if they aren't.
User avatar
Josee Leach
 
Posts: 3371
Joined: Tue Dec 26, 2006 10:50 pm

Post » Thu Jan 21, 2010 3:51 am

It's not pointless at all. I'm using this method to pick up a specific book without reading it, but in your situation I don't understand why you are doing it. I don't know why you would need the reference to persist either, unless you need to reference it from another script and the book isn't loaded into memory; meaning you haven't visited the cell with the book yet.

Why can't you use the same book? Is the script shown attached to the book to update the journal when the player enters the cell?

I don't know what's up with it, but when i tried to pick up the book and hit take, take dissapeared and no book added to my inventory, and when i hit close, it was like i had the menu open but with none of the menus active, then i right clicked and it went back to normal. I tried multiple times to fix it with no result or reason why it was happening, and just came up with this as a quick fix.
User avatar
Stacy Hope
 
Posts: 3391
Joined: Thu Jun 22, 2006 6:23 am

Post » Thu Jan 21, 2010 12:27 am

You edited your post while I was posting, so you may have missed some things I said.
User avatar
Umpyre Records
 
Posts: 3436
Joined: Tue Nov 13, 2007 4:19 pm

Post » Thu Jan 21, 2010 5:05 am

You edited your post while I was posting, so you may have missed some things I said.


Well disregard the script, When I had this script:
begin BILL_MarksDaedraSummon; Summon an Daedra when an item is removed from altar;; script location: should be placed upon an object on a Daedric Altar ; variablesshort doneif ( OnActivate == 1 )	if ( done == 1 )		Activate		return	else		Set done to 1		PlaceAtPC "Dremora_lord" 1 128 1		;1 of them, 256 units away, in back (1) of the player		Activate	endifendifEnd

Whenever i tried to pick up the book, the creature was summoned, but the book would not pick up. Do you know any reason why this would happen? After i encountered this problem, that's why i added the above lines to the scipt, and needed the references to persist on the book, because it added the book and deleted the one on the ground, bypassing the whole process of the glitch
User avatar
Dalton Greynolds
 
Posts: 3476
Joined: Thu Oct 18, 2007 5:12 pm

Post » Thu Jan 21, 2010 4:44 am

So I decided to get visuals so you would know what i meant.

So, I enter the shrine and stand over the book:http://s1142.photobucket.com/albums/n620/slaaneshthecorruptor/Dissident%20priest%20errors/?action=view¤t=MGEScreenshot1.jpg

I activate it:http://s1142.photobucket.com/albums/n620/slaaneshthecorruptor/Dissident%20priest%20errors/?action=view¤t=MGEScreenshot1.jpg#!oZZ10QQcurrentZZhttp%3A%2F%2Fs1142.photobucket.com%2Falbums%2Fn620%2Fslaaneshthecorruptor%2FDissident%2520priest%2520errors%2F%3Faction%3Dview%26current%3DMGEScreenshot2.jpg

I click take:http://s1142.photobucket.com/albums/n620/slaaneshthecorruptor/Dissident%20priest%20errors/?action=view¤t=MGEScreenshot1.jpg#!oZZ9QQcurrentZZhttp%3A%2F%2Fs1142.photobucket.com%2Falbums%2Fn620%2Fslaaneshthecorruptor%2FDissident%2520priest%2520errors%2F%3Faction%3Dview%26current%3DMGEScreenshot3.jpg

when i click close:http://s1142.photobucket.com/albums/n620/slaaneshthecorruptor/Dissident%20priest%20errors/?action=view¤t=MGEScreenshot1.jpg#!oZZ3QQcurrentZZhttp%3A%2F%2Fs1142.photobucket.com%2Falbums%2Fn620%2Fslaaneshthecorruptor%2FDissident%2520priest%2520errors%2F%3Faction%3Dview%26current%3DMGEScreenshot9.jpg

what happens when i click close:http://s1142.photobucket.com/albums/n620/slaaneshthecorruptor/Dissident%20priest%20errors/?action=view¤t=MGEScreenshot10.jpg

what happens when i right click:http://s1142.photobucket.com/albums/n620/slaaneshthecorruptor/Dissident%20priest%20errors/?action=view¤t=MGEScreenshot1.jpg#!oZZ1QQcurrentZZhttp%3A%2F%2Fs1142.photobucket.com%2Falbums%2Fn620%2Fslaaneshthecorruptor%2FDissident%2520priest%2520errors%2F%3Faction%3Dview%26current%3DMGEScreenshot11.jpg

what happens when i turn around:http://s1142.photobucket.com/albums/n620/slaaneshthecorruptor/Dissident%20priest%20errors/?action=view¤t=MGEScreenshot1.jpg#!oZZ1QQcurrentZZhttp%3A%2F%2Fs1142.photobucket.com%2Falbums%2Fn620%2Fslaaneshthecorruptor%2FDissident%2520priest%2520errors%2F%3Faction%3Dview%26current%3DMGEScreenshot11.jpg


So any idea's what's causing this? I'm using the script without the additem and disable part in them in and getting this result
User avatar
Arrogant SId
 
Posts: 3366
Joined: Sat May 19, 2007 11:39 am

Post » Wed Jan 20, 2010 6:43 pm

Wait, I think I see. Try removing the first activate. I think the problem is because it's trying to activate twice in one frame.

You may also want to check the redBookScript script for an idea of how to make it work if the player reads it from the inventory, since you can pick it up without reading if the menu is open.
User avatar
Brittany Abner
 
Posts: 3401
Joined: Wed Oct 24, 2007 10:48 pm

Post » Wed Jan 20, 2010 7:21 pm

Wait, I think I see. Try removing the first activate. I think the problem is because it's trying to activate twice in one frame.

You may also want to check the redBookScript script for an idea of how to make it work if the player reads it from the inventory, since you can pick it up without reading if the menu is open.

Alright so now the take button will close the book, but it is still lying on the floor and is inactivatable after this.

This is the script im using now, i took out the first activate like you said
begin 01mc_daedrasummonscriptshort doneif ( OnActivate == 1 )	if ( done == 1 )		return	else		Set done to 1		PlaceAtPC "01mc_creatureaq" 1 128 1		Journal "mc_dissidentpriest" 50		Activate	endifendifEnd

User avatar
Caroline flitcroft
 
Posts: 3412
Joined: Sat Nov 25, 2006 7:05 am

Post » Thu Jan 21, 2010 1:58 am

Then separate the script into two blocks. Have a look at the other scripts on books in the CS and see if you can figure it out. You can view the script easily from the item window by clicking the button with the ellipses ( ... ) next to the script window, if you didn't know.

Functionally, I don't know how it would be any different, but this is Morrowind and I'm not a real programmer.
User avatar
Deon Knight
 
Posts: 3363
Joined: Thu Sep 13, 2007 1:44 am

Post » Thu Jan 21, 2010 1:29 am

Then separate the script into two blocks. Have a look at the other scripts on books in the CS and see if you can figure it out. You can view the script easily from the item window by clicking the button with the ellipses ( ... ) next to the script window, if you didn't know.

Functionally, I don't know how it would be any different, but this is Morrowind and I'm not a real programmer.


I'll try, thanks for helping!
User avatar
Peter lopez
 
Posts: 3383
Joined: Mon Sep 10, 2007 5:55 pm

Post » Thu Jan 21, 2010 5:56 am

Not tested, but try this:
begin 01mc_daedrasummonscriptshort doneshort OnPCAddif ( OnPCAdd == 1 )        if ( done == 0 )                Set done to 1                PlaceAtPC "01mc_creatureaq" 2 128 1                Journal "mc_dissidentpriest" 50        endifendifEnd

Using OnPCAdd instead of OnActivate should avoid some of the weirdness with books, I think.
User avatar
jessica sonny
 
Posts: 3531
Joined: Thu Nov 02, 2006 6:27 pm

Post » Thu Jan 21, 2010 2:18 am

Not tested, but try this:
begin 01mc_daedrasummonscriptshort doneshort OnPCAddif ( OnPCAdd == 1 )        if ( done == 0 )                Set done to 1                PlaceAtPC "01mc_creatureaq" 2 128 1                Journal "mc_dissidentpriest" 50        endifendifEnd

Using OnPCAdd instead of OnActivate should avoid some of the weirdness with books, I think.

Thanks, I'll try using this one instead! I appreciate it.
User avatar
Dale Johnson
 
Posts: 3352
Joined: Fri Aug 10, 2007 5:24 am

Post » Thu Jan 21, 2010 2:31 am

Thanks, I'll try using this one instead! I appreciate it.

I'm guessing you got this to work correctly and that there is no disabling of the book? Otherwise you'll need to delete the disabled copy as it is still processed.
User avatar
NAtIVe GOddess
 
Posts: 3348
Joined: Tue Aug 15, 2006 6:46 am

Post » Wed Jan 20, 2010 5:35 pm

I'm guessing you got this to work correctly and that there is no disabling of the book? Otherwise you'll need to delete the disabled copy as it is still processed.

Yea it work's fine now. The script Manauser Supplied fixed it :D
User avatar
Timara White
 
Posts: 3464
Joined: Mon Aug 27, 2007 7:39 am

Post » Thu Jan 21, 2010 4:09 am

Yea it work's fine now. The script Manauser Supplied fixed it :D

Figured, but wanted to be sure. All's good then.
User avatar
Lauren Graves
 
Posts: 3343
Joined: Fri Aug 04, 2006 6:03 pm


Return to III - Morrowind