ManiumX Posted January 27, 2019 Posted January 27, 2019 (edited) Hey everyone. I was hoping someone out there could help me figure out what's wrong with this script. Begin 1Dum_ScryDetect short OnPCDropshort DoOnce if ( GetPCCell "Sadrith Mora, Telvanni Council House" == 1 ) if ( GetPCCell "Sadrith Mora Tevlanni Council House, Entry" == 0 ) if ( GetDetected Player == 0 ) if ( OnPCDrop == 1 ) if ( DoOnce == 0 ) Journal "1Dum_lil_Telvanni" 10 set DoOnce to 1 endif endif endif endif endif end (Sorry for the crappy formatting. It wouldn't let me paste the script here so I just typed it in by hand.) Anyhow, the script works mostly. The issue I'm having is that the player doesn't have to be undetected and drop the required item at the same time. They can drop the item, wait ten minutes. Hide. And get the journal entry regardless. Any ideas on how to fix this? Edited January 27, 2019 by ManiumX
cyran0 Posted January 27, 2019 Posted January 27, 2019 Once OnPCDrop is true it continues to be true until it is manually reset to zero (false). That you should do as soon as it is true. Also, GetDetected is a fairly resource-hungry function. I suggest you move it inside the OnPCDrop block since it hardly matters if the player is seen if he/she is not dropping the item. Also, a quick return after the journal is set would be welcome. Something like this might work:Begin 1Dum_ScryDetect short OnPCDrop short doOnce if ( doOnce == 1 ) return elseif ( menumode == 1 ) return endif if ( ( GetPCCell "Sadrith Mora, Telvanni Council House" ) == 1 ) if ( ( GetPCCell "Sadrith Mora Tevlanni Council House, Entry" ) == 0 ) if ( OnPCDrop == 1 ) set OnPCDrop to 0 if ( ( GetDetected Player ) == 0 ) Journal "1Dum_lil_Telvanni" 10 set doOnce to 1 endif endif endif endif End
ManiumX Posted January 28, 2019 Author Posted January 28, 2019 Thank you so much. Once I pulled out the redundant ( and corrected the spelling your version of the script worked perfectly! And I know how to avoid such things in the future.
Oblivionaddicted Posted February 15, 2019 Posted February 15, 2019 You shouldn't start your scripts names and editor ID's with numbers, it makes the game crash more oftenly.
ManiumX Posted February 18, 2019 Author Posted February 18, 2019 Really? Weird, I didn't notice an increase in crashing. Even so I'll look at changing them. I just did it that way so I wouldn't have to do so much scrolling while testing and editing.
Recommended Posts