stalkersoldiers Posted July 24, 2008 Share Posted July 24, 2008 ok i am making a mod that is using a quest, but for some reason when i'm scripting it there seems to always be a problem. I want one where it triggers a quest stage when you walk into a cell X2, when you activate a scroll/book X2, and make a specific kill X3.Any help? :thanks: in advance. ( the X# signs mean i'm using multiple of the same idea. the # indicates how many) Link to comment Share on other sites More sharing options...
herosinger Posted July 24, 2008 Share Posted July 24, 2008 You should start with this: http://www.tesnexus.com/downloads/file.php?id=12232 It's a great help in finding specific functions and learning how to use them. Link to comment Share on other sites More sharing options...
stalkersoldiers Posted July 24, 2008 Author Share Posted July 24, 2008 I don't get it still. I'm sorry but scripting is confusing. I copied and pasted stuff from one script to another but replaced the cell name with a different one and it wouldn't save. it kept saying "mismatched if/else/end block" or something like that. and that mod makes it more confusing because it uses technical terms i don't know. thanks anyway. Link to comment Share on other sites More sharing options...
DarkWarrior45 Posted July 24, 2008 Share Posted July 24, 2008 i got an idea. can someone make a sample script for me to base mine off of? I want one where it triggers a quest stage when you walk into a cell X2 This script will need to be part of your quest script.scriptname MyScript1 Begin Gamemode player.GetInCell Chorrol Setstage MyQuest 15 end when you activate a scroll/book X2 This one should be on your book.scriptname MyScript2 Begin OnActivate Activate Setstage MyQuest 15 end and make a specific kill X3 This one, you want to check to see if your target is dead. Again, quest script.scriptname MyScript3 Begin Gamemode Target.Gethealth <= 0 setstage MyQuest 15 end Link to comment Share on other sites More sharing options...
darkdragonfire5 Posted July 24, 2008 Share Posted July 24, 2008 Ok i know this isent my right to say but im making a mod and wat if the mission is to kill several pplz how do i make them show up? and then after i kill those people switch to another set of people after haveing a person attack you. And i need a script to get that person to attack you. I know im asking for a lot for a first mod that im planing to realese as a beta unless i make the quest which i need the scrits and to make my head ache more i still need to get primesion to use some of the mods that im using. :thanks: :pinch: im so stressed about this i didnt sleep till about 10 to 12 this morning plz the help we'll be welcome http://thenexusforums.com/index.php?showtopic=68036 heres a link plz cheack out wat im planning and lend me some help -Darkdragonfire5 [email protected] Link to comment Share on other sites More sharing options...
Vagrant0 Posted July 24, 2008 Share Posted July 24, 2008 Then perhaps you might want to considder doing something less complicated until you have a better understanding of the elements involved. Many people make smaller mods just to test out scripts or ideas, if for no reason other than a chance to really learn something. I myself have done this several times, and learned alot about how alot of things are handled by the game. As a matter of fact, a number of hurdles I've had to cross within the mod project I'm doing right now have been crossed because of my work with some earlier unreleased mods and using very similar methods. So really, don't be so quick to jump into some large, complicated project, no matter how much you may want to do it. Start off small, work on mods which touch on some similar part of the mod you want to do, and get that working. If it is enough to stand on it's own, you can still release it if you want, but you don't have to. Don't get discouraged, take one small step at a time. If something isn't working how you want it to, try to find somewhere that what you're trying to do, in some form, was already done, Read and try to understand what is happening in the scripts within the game, it can provide alot of answers. As for your specific questions, use of a counter variable can keep track of how many times something is done, In the case of the book...scriptname MyScript2 short counter Begin OnActivate if counter != 2 set counter to counter + 1 elseif counter == 2 Activate Setstage MyQuest 10 endif end set counter to counter + 1 endif It's a little more complicated with a cell detection since you need to use a sort of switch to turn off that part of the counter after it has run once so that the script doesn't just count to 2 within the same visit. scriptname MyScript1 short counter short switch Begin Gamemode if getstage MyQuest == 10 if switch == 0 if counter != 2 if player.GetInCell Chorrol == 1 set counter to counter +1 set switch to 1 endif elseif counter == 2 if player.GetInCell Chorrol == 1 Setstage MyQuest 15 set switch to 2 endif endif elseif switch == 1 if player.GetInCell Chorrol == 0 set switch to 0 endif endif endif end But keep in mind this particular use will trigger when the player has changed to any other cell. But you could rig the same sort of switch to several different things. And you can add to that same script to track for those NPCs. scriptname MyScript1 short counter short switch short killcount Begin Gamemode if getstage MyQuest == 10 if switch == 0 if counter != 2 if player.GetInCell Chorrol == 1 set counter to counter +1 set switch to 1 endif elseif counter == 2 if player.GetInCell Chorrol == 1 Setstage MyQuest 15 set switch to 2 endif endif elseif switch == 1 if player.GetInCell Chorrol == 0 set switch to 0 endif endif endif if getstage MyQuest == 15 if killcount == 3 Setstage MyQuest 20 endif endif end When combined with a simple script attached to the people you want to kill...scn YourTargetNPCScriptz01 begin ondeath set MyQuest.killcounter to MyQuest.killcounter + 1 end Makes the quest progress when you have killed 3 people with that script. You could also make it work with specific NPCs if needed just by using "<refname>.getisdead" instead of the killcounter. But really, this may just be a bit beyond your current ability, and you may be best off working on something a little easier. You should however pay attention to those errors in the CS when scripting, it often mentions what line the issue is on, or what is wrong with the script. A simple misplaced "endif" can be enough to break a whole script, or just prevent it from being saved. Link to comment Share on other sites More sharing options...
shadowace Posted July 24, 2008 Share Posted July 24, 2008 Haha Vagrant, you bring down a lot of peoples hopes you do. (Mine included) But alas, I'm making a big mod, for my "first"! But I can script somewhat, I learn as I do things so yeah! Link to comment Share on other sites More sharing options...
stalkersoldiers Posted July 24, 2008 Author Share Posted July 24, 2008 thanks ALOT darwarrior. I was trying to put all of it under quest script. but your idea to seperate the scripts helped. It works perfectly now. thanks again. Link to comment Share on other sites More sharing options...
darkdragonfire5 Posted July 24, 2008 Share Posted July 24, 2008 well thanks for the help and i guese ill keep the mod to myself until i get a better understanding of scripting. And no my spirt is not down i might spend the whole day trying to script when you get outside of prison and when you kill the two bounty hunters to start a quest thank for the scripting help anyways. I'm planning to reales this mod as an alpha, or beta watever you want to call it from the point you exit the sewers to the point you kill all the bounty hunters in anvil because i didnt use a lot of armor mods that i can just use a diffrent set of armor until i made the chadenhall pplz so ya thax Link to comment Share on other sites More sharing options...
stalkersoldiers Posted July 25, 2008 Author Share Posted July 25, 2008 ok one more question about scripts. Is there a script that can add a book to first edition AFTER a certain NPC is killed? if so what does it look like? Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.