dutch666 Posted October 20, 2009 Share Posted October 20, 2009 I need some help with the following script (red): ScriptName DAMolagBalCaveDoor01Script Begin OnActivate if ( GetStage DAMolagBal < 100.00 ) MessageBox "This door is held shut by the Will of Molag Bal" elseif ( GetStage DAMolagBal == 100.00 ) MessageBox "Enter, and beware..." Activate elseif ( GetStage DAMolagBal == 105.00 ) MessageBox "You've failed Me, go away and ponder thou sins..." elseif ( GetStage DAMolagBal == 110.00 ) MessageBox "You've failed Me, go away and ponder thou sins..." endifendifendifendif End When i add the following part to the above script (in red): ScriptName DAMolagBalCaveDoor01Script short doOnce Begin OnActivate if ( GetStage DAMolagBal < 100.00 ) MessageBox "This door is held shut by the Will of Molag Bal" elseif ( GetStage DAMolagBal == 100.00 ) && ( doOnce == 0 ) MessageBox "Enter, and beware..." Activate set doOnce to 1 elseif ( GetStage DAMolagBal == 105.00 ) MessageBox "You've failed Me, go away and ponder thou sins..." elseif ( GetStage DAMolagBal == 110.00 ) MessageBox "You've failed Me, go away and ponder thou sins..." endifendifendifendif End ...the MessageBox doesn't come back (good), but the door is accessible only once (bad)... What do i need to add and/or change to make that particular MessageBox appear only once, but also make the door accessible for an infinite number of times? Thnx for the help, Dutch666 P.S: I apologies for my bad english, and 2: you will be credited in the README of Oblivion4ever v1.1 if you can help me solve this problem. Link to comment Share on other sites More sharing options...
Pronam Posted October 20, 2009 Share Posted October 20, 2009 Get rid of all those spare endifs. Elseifs and Else only need one endif at the end. I use this format in scripts..that way you'll always know if you place to much of them. If that doesn't work, try just using IF's everywhere: ScriptName DAMolagBalCaveDoor01Script Begin OnActivate if ( GetStage DAMolagBal < 100.00 ) MessageBox "This door is held shut by the Will of Molag Bal" elseif ( GetStage DAMolagBal == 100.00 ) MessageBox "Enter, and beware..." Activate elseif ( GetStage DAMolagBal == 105.00 ) MessageBox "You've failed Me, go away and ponder thou sins..." elseif ( GetStage DAMolagBal == 110.00 ) MessageBox "You've failed Me, go away and ponder thou sins..." endif End Link to comment Share on other sites More sharing options...
paladicprince Posted October 20, 2009 Share Posted October 20, 2009 I echo what above poster said about the endifs. but to answer your question a bit further try this: ... elseif ( GetStage DAMolagBal == 100.00 ) && ( doOnce == 0 ) MessageBox "Enter, and beware..." Activate set doOnce to 1 elseif ( GetStage DAMolagBal == 100.00 ) && ( doOnce == 1 ) Activate ... That should be the effect you're after. Link to comment Share on other sites More sharing options...
dutch666 Posted October 21, 2009 Author Share Posted October 21, 2009 :thanks: i wil try your solution(s) Link to comment Share on other sites More sharing options...
dutch666 Posted October 21, 2009 Author Share Posted October 21, 2009 @ Paladicprince & Pronam: It works! Kudo's have been given for the advice and good help :thumbsup: Within 1 week i will post the 1.1 version of my Mod @ TESNEXUS.com Thnx again for the help guys :thanks: P.S: The Script now looks like this; ScriptName DAMolagBalCaveDoor01Script short doOnce Begin OnActivate if ( GetStage DAMolagBal < 100.00 ) MessageBox "This door is held shut by the Will of Molag Bal" elseif ( GetStage DAMolagBal == 100.00 ) && ( doOnce == 0 ) MessageBox "Enter, and beware..." Activate set doOnce to 1 elseif ( GetStage DAMolagBal == 100.00 ) && ( doOnce == 1 ) Activate elseif ( GetStage DAMolagBal == 105.00 ) MessageBox "You've failed Me, go away and ponder thou sins..." elseif ( GetStage DAMolagBal == 110.00 ) MessageBox "You've failed Me, go away and ponder thou sins..." endif End Link to comment Share on other sites More sharing options...
David Brasher Posted October 21, 2009 Share Posted October 21, 2009 It sounds like you can speak English quite well, but no one can speak archaic English well. elseif ( GetStage DAMolagBal == 105.00 ) MessageBox "You've failed Me, go away and ponder thou sins..." elseif ( GetStage DAMolagBal == 110.00 ) MessageBox "You've failed Me, go away and ponder thou sins..." The text should be "ponder thy sins..." In modern English, what you wrote would come out "ponder you sins..." What you meant to say in modern English was, " ponder your sins..." Sorry to nit-pick, but the goal is to make the best mods we can. I will have to watch for your mod when it comes out. Link to comment Share on other sites More sharing options...
dutch666 Posted October 21, 2009 Author Share Posted October 21, 2009 Ponder thy sins it is.... :thumbsup: Thnx, your correction wil be added to my Mod and i wil mention you in the credits + 1 kudo for you :thanks: Link to comment Share on other sites More sharing options...
dutch666 Posted October 24, 2009 Author Share Posted October 24, 2009 I will have to watch for your mod when it comes out. It's just some simple modding i did, no fancy stuff: http://www.tesnexus.com/downloads/file.php?id=27842 dutch666 Link to comment Share on other sites More sharing options...
Recommended Posts