Carah Posted July 9, 2009 Share Posted July 9, 2009 This is my first attempt at scripting, and everything is working like I want it to. What I have going on is when you activate a container a message pops up, but I haven't figured out how to only have it pop up once. So, every time I open and close the container the message keeps appearing. How do I get to only pop up once? I had a good laugh when I typed in the script "disable messagebox", and when I went into the game the container wasn't there... lol! Thank-you for your time :thumbsup: Link to comment Share on other sites More sharing options...
AncientSpaceAeon Posted July 9, 2009 Share Posted July 9, 2009 Even I can't do scripting as well :P I advice you show the script here, so other members can help you. Link to comment Share on other sites More sharing options...
jefe323 Posted July 9, 2009 Share Posted July 9, 2009 This is my first attempt at scripting, and everything is working like I want it to. What I have going on is when you activate a container a message pops up, but I haven't figured out how to only have it pop up once. So, every time I open and close the container the message keeps appearing. How do I get to only pop up once? I had a good laugh when I typed in the script "disable messagebox", and when I went into the game the container wasn't there... lol! Thank-you for your time :thumbsup: You need to add a condiitional statement. Something like this: begin onactivate if ( doonce == 0 ) messagebox " _ " set doonce to 1endif end Link to comment Share on other sites More sharing options...
Pronam Posted July 9, 2009 Share Posted July 9, 2009 Exactly what jefe says....This is the full tutorial from the CSWiki: MessageBox TutorialBut you're not using any choices, so jefe's example would be enough... Take a look at the first (second murder) DarkBrotherhood Quest at the crate script too. I find it the best example there is...(It is called Darko02CrateScript) It doesn't run in MenuMode, but is a great follow-up from your own.Take a look after you've finished yours, it uses many essential/used functions concerning scripting in general ;). Link to comment Share on other sites More sharing options...
Carah Posted July 9, 2009 Author Share Posted July 9, 2009 Thank-you guys I'll give it a try. This is what I originally had: Begin OnActivateif IsActionRef player == 1Messagebox "__"endifelseactivateendif end Link to comment Share on other sites More sharing options...
Carah Posted July 9, 2009 Author Share Posted July 9, 2009 You need to add a condiitional statement. Something like this: begin onactivate if ( doonce == 0 ) messagebox " _ " set doonce to 1endif end I must of done something wrong. Every thing did what I wanted, except the door of the glass case kept opening and closing, repeatedly on its own. Link to comment Share on other sites More sharing options...
Carah Posted July 9, 2009 Author Share Posted July 9, 2009 Exactly what jefe says....This is the full tutorial from the CSWiki: MessageBox TutorialBut you're not using any choices, so jefe's example would be enough... Take a look at the first (second murder) DarkBrotherhood Quest at the crate script too. I find it the best example there is...(It is called Darko02CrateScript) It doesn't run in MenuMode, but is a great follow-up from your own.Take a look after you've finished yours, it uses many essential/used functions concerning scripting in general ;). The Darko02CrateScript, and Tutorial helped me out, but I'm still trying to understand the fundamentals of scripting, it doesn't come natural to me. It's starting to remind me of math class. When I use some of the scripting from the Crate Script. I'm always getting a window popping-up about errors in certain lines when I try saving. Link to comment Share on other sites More sharing options...
alex2avs Posted July 9, 2009 Share Posted July 9, 2009 What are the errors ? Link to comment Share on other sites More sharing options...
Carah Posted July 9, 2009 Author Share Posted July 9, 2009 The error is: "All script commands must be inside a begin/end block" Link to comment Share on other sites More sharing options...
alex2avs Posted July 9, 2009 Share Posted July 9, 2009 Begin OnActivate if IsActionRef player == 1Messagebox "__"elseactivateendifend this should do it Link to comment Share on other sites More sharing options...
Recommended Posts