robotaz Posted December 24, 2010 Author Share Posted December 24, 2010 Ok... by changing a few numbers, I fixed the first issue but when you choose the no option the begone will keep popping up Link to comment Share on other sites More sharing options...
Deleted1848331User Posted December 24, 2010 Share Posted December 24, 2010 Place short doonce at the top, and where you have the message for the conditions, put if (button == # && DoOnce == 0) then your message, and after the message, put Set DoOnce to 1. Same with the other message if this is happening. Link to comment Share on other sites More sharing options...
robotaz Posted December 24, 2010 Author Share Posted December 24, 2010 (edited) The first message is fine, but when i hit the "no" option it wont do anything. When i hit no I want it to say "Then Begone!" Use a drain health spell I made and then allow you to go back to hit yes. Heres the current script.... scn VampiresNoteSCRIPT Short controlvarShort button Begin OnActivate If ( controlvar ==0 ) MessageBox "Welcome to my lair, you have been chosen by me to become the next vampire of our blood-line. To enter my home you must first be a vampire. To you agree to these conditions?", "Yes", ""No Set controlvar to 1 ElseIf ( controlvar > 1) Activate EndifEnd Begin GameMode If ( controlvar == 1 ) Set button to GetButtonPressed If ( button == -1 ) Return ElseIf ( button == 0 ) Player.addspell VampDisease Player.additem VampiresLairKey 1 Set controlvar to 2endif elseif ( button == 1 ) MessageBox "Then Begone!" Cast greatersucklifeforce Player Set controlvar to 0 EndIf Elseif ( controlvar == 2 ) Activate MessageBox "Then welcome brother." Set controlvar to 3 EndIfEnd Edited December 24, 2010 by robotaz Link to comment Share on other sites More sharing options...
GreatLucifer Posted December 24, 2010 Share Posted December 24, 2010 I suggest.... Set controlvar to 3ElseMessageBox "Then Begone!" Changing this here "Else" into Elseif ( button == 1).... Just to tidy up the script, and probably even fix this error you're having. Lucifer Link to comment Share on other sites More sharing options...
robotaz Posted December 24, 2010 Author Share Posted December 24, 2010 So like this? Set controlvar to 3Elseelseif ( button == 1 )MessageBox "Then Begone!"Cast greatersucklifeforce PlayerSet controlvar to 0EndIfElseif ( controlvar == 2 )ActivateMessageBox "Then welcome brother."Set controlvar to 3EndIfEnd Link to comment Share on other sites More sharing options...
GreatLucifer Posted December 24, 2010 Share Posted December 24, 2010 (edited) scn VampiresNoteSCRIPT Short controlvarShort button Begin OnActivateIf ( controlvar ==0 )MessageBox "Welcome to my lair, you have been chosen by me to become the next vampire of our blood-line. To enter my home you must first be a vampire. To you agree to these conditions?", "Yes", ""NoSet controlvar to 1ElseIf ( controlvar > 1)ActivateEndifEnd Begin GameModeIf ( controlvar == 1 )Set button to GetButtonPressedIf ( button == -1 )ReturnElseIf ( button == 0)MessageBox "Then welcome brother."Player.addspell VampDiseasePlayer.additem VampiresLairKey 1endifSet controlvar to 3Elseif ( button == 1)MessageBox "Then Begone!"Cast greatersucklifeforce PlayerSet controlvar to -1EndIfElseIf ( controlvar == 2 )ActivateSet controlvar to 3EndIfEnd Like this (changing the else into elseif, instead of adding it). Try that, let's see how it works (not at my own workcomputer now, can't test it for you). Lucifer Edited December 24, 2010 by GreatLucifer Link to comment Share on other sites More sharing options...
robotaz Posted December 25, 2010 Author Share Posted December 25, 2010 Well this adds the be gone message, but when you click out it keeps popping up. Also it keeps the final part of the script from happening, So the Then Welcome brother wont pop up, and it wont activate the note. I think this may be because you deleted the set controlvar to 2 part after then welcome brother Link to comment Share on other sites More sharing options...
GreatLucifer Posted December 25, 2010 Share Posted December 25, 2010 (edited) I didn't delete anything, I simply copied your first posted script.... But ok, hold on, this is an easy one.... Will be back in a minute. Lucifer EDIT: scn VampiresNoteSCRIPT short controlvarshort button begin OnActivate If controlvar == 0 messageBox "Welcome to my lair, you have been chosen by me to become the next vampire of our blood-line. To enter my home you must first be a vampire. To you agree to these conditions?", "Yes", "No" set controlvar to 1 ElseIf controlvar > 1 activate EndifEnd Begin GameMode if controlvar != 1 return endif set button to getbuttonpressed if button == -1 return elseif button == 0 messagebox "Then welcome brother." player.addspell VampDisease player.additem VampiresLairKey 1 set controlvar to 2 elseif button == 1 messagebox "Then Begone!" cast greatersucklifeforce player set controlvar to 0 EndIfEnd Tada! I tested it, and it works like a charm. Or was it supposed to do more? Lucifer Edited December 25, 2010 by GreatLucifer Link to comment Share on other sites More sharing options...
robotaz Posted December 27, 2010 Author Share Posted December 27, 2010 (edited) Kk i'll test it and be back EDIT: I'm back to say....IT WORKS PERFECTLY!!! Thank you so much! All of you have been very helpful. Only two more simple questions remain...1: Since the house is a cave should it be dark, or brighter than a normal cave? 2: When I was testing the house I decided to sleep and become the vampire...after 3 days nothing happened...It also says I havent contracted any diseases....might I have used the wrong spell? I just want the opinion of the community, either are fine with me. EDIT:EDIT: Nevermind I came up with a perfect light, and I fixed the vampire disease not working. Edited December 27, 2010 by robotaz Link to comment Share on other sites More sharing options...
GreatLucifer Posted December 27, 2010 Share Posted December 27, 2010 Good to hear, you're welcome. Lucifer Link to comment Share on other sites More sharing options...
Recommended Posts