door/journal script help

Post » Sun Jan 10, 2010 11:16 am

I'm trying to attach a script to a door so that when you enter it , it adds a journal entry to your journal, while also be unlocked with a key. I found this script online and adopted it to my mod, however it does nothing. Can anyone help me? a simple revision of the script to make it work will be wonderful(:

begin mcmistresstilanidooractivatorscriptshort doneif ( done == 1 )	returnendifif ( onactivate == 1 )	Journal "mc_tilani" 80	set done to 1	activateendifend

User avatar
Monika
 
Posts: 3469
Joined: Wed Jan 10, 2007 7:50 pm

Post » Sun Jan 10, 2010 9:30 am

I had a similar problem, where a script was being ignored completely by the game. I traced it to the "if (blah blah) , return, endif" line (I was using that to return on menumode == 1). I fixed this problem by deleting the object in CS, then making a new one after reloading the CS. I then hand-typed the line (as opposed to ctrl-c, ctrl-v like I usually do). After that I had no further problems.

So if I was you, I would try first ctrl-c all of your script text and paste into notepad for storage. Then start a new script that plays a sound (or does something else that is very obvious in-game) on activate, without the do once line. Go into the game and try it out, if you hear the machine-gun sound repeat, you are in business. Now just go back into CS and hand-type your do-once line - I think what is happening in your case, like with mine, is the game is simply returning in all cases for some strange reason. Good luck
User avatar
Dan Endacott
 
Posts: 3419
Joined: Fri Jul 06, 2007 9:12 am

Post » Sun Jan 10, 2010 10:25 am

Try moving "activate" before the "done". If that doesn't work, try pyxlmyxz suggestion and delete the script, save the plugin, reload and start a clean script.

begin mcmistresstilanidooractivatorscriptshort doneif ( done == 1 )	returnendifif ( onactivate == 1 )	Journal "mc_tilani" 80        activate	set done to 1	endifend

User avatar
Curveballs On Phoenix
 
Posts: 3365
Joined: Sun Jul 01, 2007 4:43 am

Post » Sun Jan 10, 2010 3:36 pm

Your script name might be too long.
I know there is a limit in the length that will be functional. Try keeping your script names under 20 characters.
User avatar
jaideep singh
 
Posts: 3357
Joined: Sun Jul 08, 2007 8:45 pm

Post » Sun Jan 10, 2010 6:16 pm

Your script name might be too long.
I know there is a limit in the length that will be functional. Try keeping your script names under 20 characters.

The limit will be around 32 I think. Most probably the limit is 31. The OPs is 35.
User avatar
Eibe Novy
 
Posts: 3510
Joined: Fri Apr 27, 2007 1:32 am

Post » Sun Jan 10, 2010 8:01 pm

The limit will be around 32 I think. Most probably the limit is 31. The OPs is 35.



It def. never occurred to me that it could be that. I'll be sure to shorten the names in the future, thanks so much! :)
User avatar
Chris Cross Cabaret Man
 
Posts: 3301
Joined: Tue Jun 19, 2007 11:33 pm


Return to III - Morrowind