MadGodMods Posted May 19, 2016 Share Posted May 19, 2016 (edited) Somebody do me a solid and please PLEASE (I'm completely stuck until this is resolved) and take a look at my script. It compiles correctly, so no problem there. I'm trying to set it up so that when the button is pressed the Quest begins and sets the stage to 10.Everything looks right to me but when I press the button in-game the quest does not start. I know the problem isn't on the Quest's end because when Icheck the "run on start" box everything works smoothly. So what is wrong with the script? Why will my quest (property "DeployForces") not start? Scriptname FCOMCommandRadioTokenScript extends ObjectReference Armor Property CommandRadio Auto Const Actor Property Player Auto Message Property Message1 Auto Message Property Message2 Auto Message Property Message3 Auto Message Property FirstMessage Auto Quest Property DeployTroops Auto Event OnEquipped(Actor akActor) Menu() Player.RemoveItem(CommandRadio, 1) Player.AddItem(CommandRadio, 1) EndEvent Function Menu(Bool abMenu = True, Int aiButton = 0) While abMenu If aiButton != -1 ; Wait for input (this can prevent problems if recycling the aiButton argument in submenus) aiButton = FirstMessage.Show() ; Main Menu abMenu = False ; End the function If aiButton == 0 ; TESTBUTTOMAIN aiButton = Message1.Show() If aiButton == 0 ; TESTBUTTONbeginsQuest DeployTroops.Start() DeployTroops.SetStage(10) ElseIf aiButton == 1 ; null ElseIf aiButton == 2 ; null EndIf ElseIf aiButton == 1 ; null aiButton = Message2.Show() If aiButton == 0 ; null ElseIf aiButton == 1 ; null ElseIf aiButton == 2 ; null EndIf ElseIf aiButton == 2 ; null aiButton = Message3.Show() If aiButton == 0 ; null ElseIf aiButton == 1 ; null ElseIf aiButton == 2 ; null EndIf EndIf EndIf EndWhile EndFunctionThe specific bit I'm having the trouble with is If aiButton == 0 ; TESTBUTTONbeginsQuest DeployTroops.Start() DeployTroops.SetStage(10) For some reason the above bit is not starting the quest or setting the stage to 10. My guess is that I am not using the Quest property correctly, but I don't know how else to do it. I can't find anything helpful on the wiki either. :/ Help a modder out Edited May 19, 2016 by MadGodSheogorath Link to comment Share on other sites More sharing options...
Reneer Posted May 19, 2016 Share Posted May 19, 2016 (edited) Assuming that DeployTroops is pointing properly to your quest, my only guess would be that abMenu = False ; End the functionis the issue. That should either be at the bottom of your While loop, or only in buttons where you do not want any looping behavior. Maybe try adding some debug.trace functions (and compiling with the Debug flag) to see if the code is even running the Start() and SetStage(10) lines. If DeployTroops is not pointing to your Quest, that would be your problem. If that is the case, the Papyrus compiler will likely be throwing an error in your Papyrus0.log file (C:\Users\<Username>\Documents\my games\Fallout4\Logs\Script\Papyrus.0.log). Edited May 19, 2016 by Reneer Link to comment Share on other sites More sharing options...
MadGodMods Posted May 19, 2016 Author Share Posted May 19, 2016 Thank you! I was able to solve the issue. Link to comment Share on other sites More sharing options...
Reneer Posted May 19, 2016 Share Posted May 19, 2016 Thank you! I was able to solve the issue.So what was the problem? :) Link to comment Share on other sites More sharing options...
MadGodMods Posted May 20, 2016 Author Share Posted May 20, 2016 (edited) Honestly, I'm still not sure. Now it looks like the problem wasn't with the script at all, but the quest itself. I went to my quest and removed the "script event" box and ticked the "on start enabled" box, and then added a stage "0" to the quest, and then set stage 0 to "run on start". Then I went in the game and suddenly the damn thing works. But now there's a different problem. After I got that working I moved on to the next part: Aliases. I haven't changed anything to the script or the quest, all I did was add my aliases and now the quest isn't firing up again. >.< no idea why the CK is giving me so much trouble. Edited May 20, 2016 by MadGodSheogorath Link to comment Share on other sites More sharing options...
Maduin81 Posted May 21, 2016 Share Posted May 21, 2016 Try setting your aliases to optional, I believe there are some issues if they don't fill properly and are mandatory. Also, regarding the first issue, I think it sounds like your quest with the script attached wasn't started to begin with, so how could it call itself when itself doesn't exist. Make sense? Think of it sort of like driving down the road without first getting into the car and starting it. Link to comment Share on other sites More sharing options...
Recommended Posts