ObLars Posted April 10, 2011 Share Posted April 10, 2011 Hey. Im in desperate need of help as im stuck to all hell with a mod im working on. Im trying to make my first quest, bear with me - I'v read the "Basic" quest tutorials etc.What im trying to achieve is to repair a Power Source. Namely a Generator. What i'v made so far is the quest, i'v made a Generator which is a Activator with the Generator mesh. I have made a quest objective that tells the player to get 3 "Generator" parts that i'v scattered around the Mojave for me, us.. To find. I activate the activator (The Generator) to get a message shown, through the script attached to the Activator that, like i said gives the player a new Objective, tracking these parts down. I get the compass to work, it points to the individual parts etc - But when i pick up the parts, the compass is still pointing towards where the Parts were, on the floor. HOW can i build a script to accomplish this without killing myself, over.. and over again. QUESTION is; How would i build a script which i can attach to the Activator, that tells my to find the spare parts in a message, get a new objective, then magicly "change" the Activator to a new one, with a Repair option? Im quite confused. Ask if anything. Thanks :) Link to comment Share on other sites More sharing options...
SpeedyB64 Posted April 11, 2011 Share Posted April 11, 2011 well for the quest marker you will want to have your quest script check if the player has the parts. if player.getitemcount YourGeneratorPart 1 //update your quest endif where you update your quest you will want to set your quest stage to the next stage with a message telling you to return the part to the generator and set the generator as the quest marker target. To repair the generator you will want to have a fixed generator placed in the same location as the broken one. You set it to initially disabled and persistent reference, give it a ref name like:ObLFixedGeneratorREFDo the same with your broken generator. Then when you have the parts you can disable the broken one and enable the fixed one.For example: scn BrokenGeneratorSCRIPT begin onactivate if player.getitemcount GeneratorPart 1 ObLFixedGeneratorREF.enable ObLBrokenGeneratorREF.disable //set your quest's stage to the point where the generator is fixed endif end Hope that helps a bit. If you have any other questions feel free to ask. Link to comment Share on other sites More sharing options...
PaladinRider Posted April 11, 2011 Share Posted April 11, 2011 (edited) There is a few ways you can do this. Have a message pop up on activate, and it can tell the player what they'll need. IE "You found a generator that's missing some pieces. It needs thing1, thing2 and thing3" You can have two options for this message: "Walk away" which does just that, and "Fix the generator". The latter option will need 3 conditions. Just right click and create new conditions. Set it to this: "GetItemCount thing1 == 1" Make sure it's set as "Run on Reference". Select 'PlayerRef' from the 188 block. Copy this condition twice, and replace 'thing1' with 'thing2' and 'thing3'. Now the condition says: The player must have thing1, and thing2, and thing3. If the player doesn't have one of these 'things', then the option to fix the generator won't be there. Unless you want the generator to phyiscally change shape, you won't need a new one. You can have another message if you'd like, doing the same thing. The script will just have to be a bit more complex. scriptname fixGenerator short fixed ;0 if not yet fixed, =1 when its fixed. short button begin OnActivate if fixed == 0 showMessage FixGeneratorMessage else showMessage RepairMessage endif Set button to GetButtonPressed end Begin GameMode if button == 1 && fixed == 0 remove thing1, thing2 and thing3. set fixed to 1 elseif button == 1 && fixed == 1 repair options here. endif end This is untested though Edited April 11, 2011 by PaladinRider Link to comment Share on other sites More sharing options...
Recommended Posts