Balagor Posted November 13, 2010 Share Posted November 13, 2010 Hi there.After spending some days searching for troubleshooting, I give up. I want to disable and enable creatures (Ghosts to be exact) in a part of a script. Normally it works for me with objects. I read all about on the CS WIKI, but it did´nt work. Nor did the copies I tried to paste from existing scripts in the game. What do I do wrong? I have the latest patch for the CS, and use OBSE 0019.I try to make the script run something like this: Scriptname MyNamefloat fQuestDelayTime Begin Menumodeif ( IsPCSleeping == 1 && player.getincell MyCell == 1 )WakeUpPCMyGhostRef.enableSetStage MyQuest 10endifend I either get the warning that my creature is not an object, or (if I remove the "MyGhostRef", and only keep "enable") I get the warning that I need an explixit ref. in my quest.????????? :wallbash: :wallbash: :wallbash: Help will be very much appreciated :biggrin: :biggrin: Thank you in advance Link to comment Share on other sites More sharing options...
slygothmog Posted November 14, 2010 Share Posted November 14, 2010 First, is your ghost already disabled?....you can do this without script, when you place it in the render window, double click on it and tick the box Initially Disabled.I will call it's RefID MyGhostRef as well Scriptname MyName float fQuestDelayTime Begin gamemode set fquestdelaytime to 1 if getstage MyQuest < 10 && IsPCSleeping == 1 && player.getincell MyCell == 1WakeUpPCMyGhostRef.enableSetStage MyQuest 10endifend Try that. It must be a quest script attached to a quest to work. Link to comment Share on other sites More sharing options...
Balagor Posted November 14, 2010 Author Share Posted November 14, 2010 First, Thanks a lot for your help, @Sly.Yes, my Ghost is disabled.I have tried the structure you gave me. I do not get the warning that "my creature is not an object" anymore. However now I get a warning "Script command: (MyGhost.Enable) not found", and can still not save the script. This is how my scrip looks with your structure: Scriptname 1GhostScriptfloat fQuestDelayTimeBegin gamemodeset fquestdelaytime to 1Ref 1TFUndeadBossLvl100Refif getstage 1GhostQuest < 10 && IsPCSleeping == 1 && player.getincell 1TwinFallsHouse == 1WakeUpPC1TFUndeadBossLvl100REF.enableSetStage 1GhostQuest 10endifend I really do not know what is wrong. Just a few days ago I made a script for a door with enable/disable. No problems,Is it my references that cause the problems?I will continue tearing hair off my head :sick: and look into it. Suggestions are welcome. btw kudos, Sly Link to comment Share on other sites More sharing options...
slygothmog Posted November 14, 2010 Share Posted November 14, 2010 There is one line you do not need, and that is your problem here. get rid of this line. Ref 1TFUndeadBossLvl100Ref Open the render window where your ghost is and double click on it....in the box that opens, right at the top is a small box called Reference Editor ID...place the Ref for your Ghost in there if you have not done so....I will use the same as you have done and call it 1TFUndeadBossLvl100REF. Your script should look like this. Scriptname 1GhostScript float fQuestDelayTime Begin gamemode set fquestdelaytime to 1 if getstage 1GhostQuest < 10 && IsPCSleeping == 1 && player.getincell 1TwinFallsHouse == 1WakeUpPC1TFUndeadBossLvl100REF.enableSetStage 1GhostQuest 10endif end Try that, and see what happens....Oh and thank you for the kudo Balagor :thumbsup: :biggrin: Link to comment Share on other sites More sharing options...
Balagor Posted November 14, 2010 Author Share Posted November 14, 2010 It works now. Thank you very much.However I do have some adjustment that was necesarry to get it to run, WakUpPc is to alert player when sleeping. It is not needed. At least it says so in the ElderScroll WIKI, which actually is the same site that told me to use this function. After I inserted an EditorID on MyGhost, I do not need ...."Ref" at the end of the expresion, only "MyGhost". To make the script run at all from sleepmode, I found that I can not use "GameMode" but should use "MenuMode" instead, and refer to 1012 (sleep/wait menu). The finished script looks like this, and it works: Scriptname MyScriptfloat fQuestDelayTimeBegin MenuMode 1012 (sleep/wait)set fquestdelaytime to 1if getstage MyQuest < 10 && IsPCSleeping == 0 && player.getincell MyCell == 1MyGhost.enableSetStage MyQuest 10endifend That´s it. One more time thank you for your help, Slygothmog. Balagor Link to comment Share on other sites More sharing options...
Recommended Posts