evertaile Posted February 5, 2011 Share Posted February 5, 2011 (edited) Because the items you want the player to collect are not custom made for the quest and are general clutter or droppables you can't attach a begin OnAdd script. Instead add this begin block to your HMGetStuffScript: SCN HMGetstuffSCRIPT Short GotCoyoteHide Short GotGoldenGeckoSKin Short GotAntMeat Begin GameMode If player.GetItemCount NVCoyoteHide == 2 && player.getItemCount GeckoGoldenHide == 2 && GetStage HMQ1 == 20 SetObjectiveCompleted HMQ1 20 1 SetObjectiveDisplayed HMQ1 30 1 SetStage HMQ1 30 AddTopic HMQ1Return else return endif end Uncheck Start Enabled option from quest HMGestuff. In the result script for HMQ1 stage 20 input StartQuest HMGetStuff In the result script for HMQ1 stage 30 input StopQuest HMGetStuff This should do it -- I'm sorry. I didn't quite understand at first what you wanted - I thought you wanted a counter. If you simply want an amount of items for stage up then this should do the job nicely. Edited February 5, 2011 by evertaile Link to comment Share on other sites More sharing options...
viking99 Posted February 7, 2011 Author Share Posted February 7, 2011 (edited) Hi Evertaile thanks for helping me with this. Before I was not sure how the script was supposed to work this script however seem to be what i need, however I can´t get it to work.... It seems the code could be used in three ways: 1. as the questscript for the HMGetstuff quest 2. As a resultscript in the HMGetstuff quest.3: As a resultscript in the HMQ1 quest. I have tried your script though I removed the variables since they are redundant from what I want to do. I simply want a script that checks that I have collected a few copies of three different items and then sets the next stage. this is how the script looks like.SCN HMGetstuffSCRIPT Begin GameMode If player.GetItemCount NVCoyoteHide == 2 && player.getItemCount AntMeat == 2 && player.getItemCount GeckoGoldenHide == 2 && GetStage HMQ1 >= 10 && GetStage HMQ1 < 30 SetObjectiveCompleted HMQ1 20 1 SetObjectiveDisplayed HMQ1 30 1 SetStage HMQ1 30 AddTopic HMQ1Return else return endif end I changed the getStuff == 20 since it according to the linked info from the geck page checkes for a completed quest stage and not an ongoing one. Instead I used. GetStage HMQ1 >= 10 && GetStage HMQ1 < 30 . I did also trye the getStuff == 20 but with no result. To minimize the potential errors I have also used this script to test if it will trigger at all. SCN HMGetstuffTestSCRIPT Begin GameMode If player.GetItemCount NukaCola == 1 SetObjectiveCompleted HMQ1 20 1 SetObjectiveDisplayed HMQ1 30 1 SetStage HMQ1 30 AddTopic HMQ1Return else return endif end That did not work either. As a resultscript for stage 20 I have added : StartQuest HMGetstuff just as you suggested. As a resultscript for stage 30 I have added : StopQuest HMGetStuff Since the script doesn´t seem to trigger I have also tried to use it as a resultscript in HMQ1 under stage 20.I also tried to create a stage 10 to HMGetstuff quest and refer to it with the following script:StartQuest HMGetstuff if getStage HMGetstuff <10 setStage HMGetstuff 10 endif This has worked well for me in trigger area scripts and with a script connected to an object. I honestly don´t know what is wrong I seem to have tested everything.. Edited February 7, 2011 by viking99 Link to comment Share on other sites More sharing options...
evertaile Posted February 8, 2011 Share Posted February 8, 2011 You do understand that the quest must be running in order for it's scripts and conditional branches to work, right? scn HMQ1SCRIPT short DoOnce Begin GameMode if player.GetItemCount ??? == ? && (DoOnce == 0) SetStage HMQ1 ? player.addtopic ??? Set DoOnce to 1 else return endif end if this is the quest script, where ? is the value and stages etc that you want to use, and the quest (in your case HMQ1) is Start Enabled, then regardless of stage, and/or any other variable or condition attached to your quest, collecting the wanted item will stage up. Use this as your base and conditionalise it to suit your needs. Example, if you want the collection to be set for stage 10 to stage up to 20 upon collection of the items, then either add && GetStage HMQ1 10 to the first line of the IF block in the quest script, OR, uncheck Start Enabled and instead attach a script to an area trigger or activator that sets the stage of your quest (HMQ1) to 10 with in the result script of stage 10 StartQuest HMQ1 and the relevant objective information etc. -- another method would be to do it through dialogue, again, unchecking Start Enabled from the quest HMQ1 and creating a dialogue for an NPC or adding a new topic to an existing Dialogue tree. You would in this case have the NPC mention something about wanting a certain item or certain number of items and would put in the result script of that particular topic (after setting the conditions first of course) SetStage HMQ1 10 again kicking off the quest with the StartQuest and objective stuff in the result of stage 10. That is really all I can think of to help you. You only need 1 quest on the go for this to work in a basic manner, unless you are conditionalising conditions or even more tom-foolery, there's no need to extend beyond 1 quest. Link to comment Share on other sites More sharing options...
viking99 Posted February 8, 2011 Author Share Posted February 8, 2011 Ha victory at last ! :-) I finally managed to solve the problem. It seems the key was to replace getStage with getQuestRunning. I´ll post the solution here so you all can benefit from it: I have to quests, one is my main quest called HMQ1, the other is called HMGetStuff. The quest HMGetstuff is start game enabled priority 50 it is not named it´s only purpose is to run a questscript. Begin GameMode means the script runs constantly and is restricted to run only while HMQ1 is active byGetQuestRunning HMQ1 The code for HMGetStuffSCRIPT is:SCN HMGetStuffSCRIPT Begin GameMode If player.GetItemCount NVCoyoteHide == 8 && player.getItemCount GeckoGoldenHide == 8 && player.getItemCount AntMeat == 8 && GetQuestRunning HMQ1 SetObjectiveCompleted HMQ1 20 1 SetObjectiveDisplayed HMQ1 30 1 SetStage HMQ1 30 AddTopic HMQ1Return else return endif end Queststage 5 resultscriptSetObjectiveDisplayed HMQ1 10 1 Queststage 10 resultscript SetObjectiveCompleted HMQ1 10 1 SetObjectiveDisplayed HMQ1 20 1 AddTopic HMQ1Ants AddTopic HMQ1Coyote AddTopic HMQ1GoldenGecko StartQuest HMGetstuff Queststage 20 is taken care of by the getstuff script Queststage 30 : I have chosen to advance to the next stage through dialogue Queststage 40 resultscriptSetObjectiveCompleted HMQ1 30 1 SetObjectiveDisplayed HMQ1 40 1 SetStage HMQ1 100 This stage tells you that you have passed the initiation and now a member of the lodge.This is a good stage to add xp and rewards if you do not choose to add it through dialogue. Queststage 100 Quest completed (check box) THANKS AND KUDOS to Evertaile who made my success possible. I have learned quite a bit on this ordeal. Link to comment Share on other sites More sharing options...
Recommended Posts