cynderdragon Posted August 6, 2021 Share Posted August 6, 2021 This script controls a door in my "fallout idiot box" mod. The problem is, the script can be spammed even though the door has done what the script says. How can I fix this? Script:scn aaadumdumdooraccess Short activealready ; is the script already running? Short havegumgumshort doorstatus ;1 open, 0 closedshort gumbypassfloat timer ;FailsafeBegin OnActivateIf (activealready == 1) endifEnd ;Door controlBegin OnActivateShowMessage aaagumgumquestionShowMessage aaagumgumquestion1 If (activealready == 0 && player.GetItemCount aaav88bubblegum>10) If (activealready == 0 && player.GetItemCount bubblegum>10)Set havegumgum to 1ElseSet havegumgum to 0EndifEndif If (havegumgum == 1 && activealready == 0)ShowMessage aaagumgumYesif (player.GetItemCount aaav88bubblegum>10)player.removeitem aaav88Bubblegum 10Set doorstatus to 1Set activealready to 1Set timer to 0Set gumbypass to 1Activate elseSet doorstatus to 0Set activealready to 1Set timer to 0Set gumbypass to 0EndifEndif if (gumbypass == 0 && player.GetItemCount bubblegum>10)player.removeitem Bubblegum 10Set doorstatus to 1Set activealready to 1Set timer to 0Set gumbypass to 1Activate elseSet doorstatus to 0Set activealready to 1Set timer to 0 Endif If (havegumgum == 0 && activealready == 0)ShowMessage aaagumgumNo1ShowMessage aaagumgumNo2 Set doorstatus to 0Set activealready to 0Endif ;door reset once the player has opened the gumgumdoor. If (activealready == 1 && doorstatus == 1)if (timer<10)set timer to timer + getSecondsPassedElseactivate;turns off the script failsafe. Set timer to 0Set doorstatus to 0Set activealready to 0Set gumbypass to 0 endifendifEnd Link to comment Share on other sites More sharing options...
Recommended Posts