Fallout2AM Posted May 23, 2015 Share Posted May 23, 2015 but never executes the rest of the script.when they don't finish the execution, it means they crash at a certain point. Link to comment Share on other sites More sharing options...
Deleted2746547User Posted May 23, 2015 Author Share Posted May 23, 2015 I know.... what I don't know is how to fix the script. Link to comment Share on other sites More sharing options...
sentimeta Posted May 23, 2015 Share Posted May 23, 2015 (edited) I thought the script I wrote might have a problem, but I wasn't 100% sure. To fix it, I think the timer has to be in a separate script. This is what I would do (there's probably a better way, but hey):Create a new quest called BlackBriarWashoeNorthRedoubtTimer. Have Start Game Enabled off, so that it's not constantly running. I would also set the script processing delay to 1 second, or lower, so that the script runs almost instantly.In the quest script, have: scn BlackBriarWashoeNorthRedoubtTimerScript short Timer Begin gamemode if Timer < 2 set Timer to Timer + GetSecondsPassed else ;This is what will happen while the screen is black. ShowMessage BlackbriarConstructionUnderwayMsg SetPCSleepHours 4 BlackbriarNorthRedoubtGuardPlacement.enable ; places hiring clipboard BlackbriarNorthernRedoubtActivatorRef.Enable ; builds redoubt & checkpoints BlackbriarNorthRedoubtActivatorRef.Disable ; disables build anvil BlackbriarNorthRedoubtActivatorRef.markfordelete SetStage BlackbriarOPFire 30 stopquest BlackBriarWashoeNorthRedoubtTimer endif EndNow, back to the BlackbriarNorthRedoubtBuildScript: scn BlackbriarNorthRedoubtBuildScript short AwaitingInput short buttonVar begin OnActivate ShowMessage BlackbriarWashoeNorthRedoubtChoiceMesg set AwaitingInput to 1 end Begin gamemode if awaitingInput == 1 set buttonVar to getbuttonpressed if buttonVar > -1 set awaitingInput to 0 if buttonVar == 0 If BlackbriarBaseStorageRef.GetItemCount BlackbriarHammer >= 1 && BlackbriarBaseStorageRef.GetItemCount BlackbriarMetalResource >= 6 && BlackbriarBaseStorageRef.GetItemCount BlackbriarSandbag >= 18 && BlackbriarBaseStorageRef.GetItemCount BlackbriarResourceWood >= 8 BlackbriarBaseStorageRef.removeitem BlackbriarHammer 1 BlackbriarBaseStorageRef.RemoveItem BlackbriarSandbag 18 BlackbriarBaseStorageRef.RemoveItem BlackbriarMetalResource 6 BlackbriarBaseStorageRef.RemoveItem BlackbriarResourceWood 8 imod FadeToBlack9sISFX PlaySound YourSoundGoesHere startquest BlackBriarWashoeNorthRedoubtTimer else ShowMessage BlackbriarWashoeBuildingMaterialsMsg endif elseif buttonVar == 1 ShowMessage BlackbriarNextTimeMsg endif endif endif end I tested a simplified version of this, where I checked for the amount of caps the player had instead of your basestorageref stuff, and it worked for me.Incidentally, if you want to disable player controls while the screen is black, you could change the timer script to something like this (I didn't test this, but it looks like it should work): scn BlackBriarWashoeNorthRedoubtTimerScript short Stage short timer Begin Gamemode if Timer > 0 set Timer to Timer - GetSecondsPassed elseif Stage == 0 set stage to 1 ShowMessage BlackbriarConstructionUnderwayMsg PlaySound YourSoundGoesHere disableplayercontrols set Timer to 2 elseif Stage == 1 ;after 2 seconds, do this SetPCSleepHours 4 BlackbriarNorthRedoubtGuardPlacement.enable ; places hiring clipboard BlackbriarNorthernRedoubtActivatorRef.Enable ; builds redoubt & checkpoints BlackbriarNorthRedoubtActivatorRef.Disable ; disables build anvil BlackbriarNorthRedoubtActivatorRef.markfordelete SetStage BlackbriarOPFire 30 set stage to 2 set Timer to 2 elseif Stage == 2 ;after 2 more seconds (screen is now not black), do this enableplayercontrols stopquest BlackBriarWashoeNorthRedoubtTimer endif End Edited May 23, 2015 by sentimeta Link to comment Share on other sites More sharing options...
Deleted2746547User Posted October 31, 2015 Author Share Posted October 31, 2015 What am I doing wrong? The message on the activator shows the top two lines of the message itself. But that's it. Shows none of the options... and I can't escape from that screen. BlackbriarBHChipVendorScript short Button short PlayerChipAmount begin OnActivate if IsActionRef player == 1 ShowMessage BlackbriarBHChipsMessage1 endif end BEGIN MenuMode 1001 set Button to GetButtonPressed if ( Button == 0 ) player.additem BlackbriarBHChip 10 player.RemoveItem caps001 10 elseif ( Button == 1 ) player.additem BlackbriarBHChip 50 player.RemoveItem caps001 50 elseif ( Button == 2 ) player.additem BlackbriarBHChip 250 player.RemoveItem caps001 250 elseif ( Button == 3 ) player.additem BlackbriarBHChip 1000 player.RemoveItem caps001 1000 elseif ( Button == 4 ) player.additem BlackbriarBHChip 5000 player.RemoveItem caps001 5000 elseif ( Button == 5 ) set PlayerChipAmount to player.GetItemCount BlackbriarBHChip player.RemoveItem BlackbriarBHChip PlayerChipAmount player.AddItem caps001 PlayerChipAmount elseif ( Button == 6 ) ShowMessage BlackbriarCanceltransactionMSG endif endif END Link to comment Share on other sites More sharing options...
Recommended Posts