Spectre11950 Posted May 19, 2009 Share Posted May 19, 2009 Hi im fairly new to modding so these are probably been answer before, but anyway. Im making a quest and i want it to start when A)The player picks up a certain holotapeorB)When the player first starts up the game, sorta like the official DLC StartsSo what Script Trigger do i use? THX! Link to comment Share on other sites More sharing options...
BadPenney Posted May 19, 2009 Share Posted May 19, 2009 Hi im fairly new to modding so these are probably been answer before, but anyway. Im making a quest and i want it to start when A)The player picks up a certain holotape Make your quest Start Game Enabled Make a quest script that includes: short DoOnce Begin GameModeif (DoOnce == 0 ) && (player.GetItemCount QuestHolotape == 1) ;[insert the specific item name in place of QuestHolotape]SetStage YourQuest 10 ;(or whatever stage # is the first in your quest)Set DoOnce to 1endifEND and select that script on your quest's Quest Data tab. orB)When the player first starts up the game, sorta like the official DLC StartsSo what Script Trigger do i use? THX! Make your quest Start Game Enabled Make a quest script that includes: short DoOnce Begin GameModeif (DoOnce == 0 )SetStage YourQuest 10 ;(or whatever stage # is the first in your quest)Set DoOnce to 1endifEND and selecet that script on your quest's Quest Data tab.That should begin it immediately. If you want to wait for the CharGen quests to finish before your quest starts: if (DoOnce == 0 ) && ( GetQuestCompleted CG01 == 1 ) Link to comment Share on other sites More sharing options...
Spectre11950 Posted May 19, 2009 Author Share Posted May 19, 2009 I get an Sytax Error saying Unknown command 'DoOnce"does it have to in ()? Exactly like you have it. Link to comment Share on other sites More sharing options...
Spectre11950 Posted May 19, 2009 Author Share Posted May 19, 2009 I get an Sytax Error saying Unknown command 'DoOnce"does it have to in ()? Exactly like you have it. Link to comment Share on other sites More sharing options...
BadPenney Posted May 19, 2009 Share Posted May 19, 2009 I get an Sytax Error saying Unknown command 'DoOnce"does it have to in ()? Exactly like you have it.DoOnce is a just a conventional term used in vanilla Fallout 3 scripting, so I used it. It could be any word really. But you have to define your terms at the beginning of your script by typing “short” followed by the term, unless you’re using a global. You also need to name your script:scn MyQuestSCRIPT short DoOnce Begin GameMode if (DoOnce == 0 ) && (player.GetItemCount QuestHolotape == 1)SetStage YourQuest 10 Set DoOnce to 1endif END DoOnce will always begin at 0 and then you set it to a higher number to prevent your script from running over and over. That is really its only function; to define when something happens and when it doesn't. And no, you don't need (). That is another convention, much like that used in an algebra equation, mostly used to help the programmer keep track of what is going on. The script will run without it, without spaces between lines, without indented lines, etc. But it does require that references be something real that the GECK recognizes. You will also need to define your script as a quest script, rather than the default object script, to make it function in starting your quest. You cannot select an object or effect script as a quest governor. If you cut and paste the above script and try to save it, you will get errors unless QuestHolotape is already a named item and unless there already exists a quest called YourQuest. Those are just examples that can be renamed as needed. It is a good idea to look over scripts, quests ands AI packages that already exist in the game to see how things work. Also, using the Find Text function under the Edit menu, and using filters with the ALL list in the Object window can be very useful in finding information and examples. Link to comment Share on other sites More sharing options...
Cipscis Posted May 20, 2009 Share Posted May 20, 2009 @Spectre11950:If you're unfamiliar with the scripting language used in Fallout 3, then you might want to have a look at the beginner's scripting tutorial that I've written. There is a link to it in my signature. Cipscis Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.