maccyjam Posted November 3, 2011 Share Posted November 3, 2011 Hi,I have been looking for a tutorial and I have also looked at other quests in the core game files in the G.E.C.K to find how to create a quest script where you must kill X amount of Y to complete it.Unfortuantly I couldn't find anything, so can anyone link me to a tutorial that shows me how to do this?Thanks in advance, Link to comment Share on other sites More sharing options...
rjhelms84 Posted November 5, 2011 Share Posted November 5, 2011 if you have specific creature refs the player has to kill, then you can script that pretty easily. You just start a script that has a condition that it only triggers the effect, when all refs are dead. You can say "if Creature1REF.getdead == 1", etc, for the condition. Then say "MyQuest.setstage 100" or something like that. Assuming you've set the quest up. Link to comment Share on other sites More sharing options...
maccyjam Posted November 5, 2011 Author Share Posted November 5, 2011 Oh, I see, seems easy enough.Thanks for your reply. :) Link to comment Share on other sites More sharing options...
mastar891 Posted June 7, 2014 Share Posted June 7, 2014 I'm trying to do this as well, but I can't get it to work. What I think I need to do is set something that checks if the creature/actor is dead. Because if you just do "Creature1REF.getdead == 1" it's going to check if the actor is dead at the moment it processes, and then it realizes that the creature/actor isn't dead so it just keeps going on. I'm thinking about setting a timer that checks every 10-20 seconds, but I have no idea. Anyone have an idea? Link to comment Share on other sites More sharing options...
EsvDefcon Posted June 7, 2014 Share Posted June 7, 2014 I'm trying to do this as well, but I can't get it to work. What I think I need to do is set something that checks if the creature/actor is dead. Because if you just do "Creature1REF.getdead == 1" it's going to check if the actor is dead at the moment it processes, and then it realizes that the creature/actor isn't dead so it just keeps going on. I'm thinking about setting a timer that checks every 10-20 seconds, but I have no idea. Anyone have an idea?OR you could just make a variable which increases with each kill, and use a GetQuestVariable condition to move the quest onto the next stage, when this variable is equal to a certain number. It would be a whole lot simpler. Link to comment Share on other sites More sharing options...
mastar891 Posted June 7, 2014 Share Posted June 7, 2014 I'm trying to do this as well, but I can't get it to work. What I think I need to do is set something that checks if the creature/actor is dead. Because if you just do "Creature1REF.getdead == 1" it's going to check if the actor is dead at the moment it processes, and then it realizes that the creature/actor isn't dead so it just keeps going on. I'm thinking about setting a timer that checks every 10-20 seconds, but I have no idea. Anyone have an idea?OR you could just make a variable which increases with each kill, and use a GetQuestVariable condition to move the quest onto the next stage, when this variable is equal to a certain number. It would be a whole lot simpler. Hm, I'm a bit new to GECK, do you have an example on how to go about this? Link to comment Share on other sites More sharing options...
rjhelms84 Posted June 8, 2014 Share Posted June 8, 2014 If you simply want code to run when a specific creature dies, you can add a script to the NPC form itself, and begin your code with an "OnDeath" block. Link to comment Share on other sites More sharing options...
EsvDefcon Posted June 8, 2014 Share Posted June 8, 2014 (edited) I'm trying to do this as well, but I can't get it to work. What I think I need to do is set something that checks if the creature/actor is dead. Because if you just do "Creature1REF.getdead == 1" it's going to check if the actor is dead at the moment it processes, and then it realizes that the creature/actor isn't dead so it just keeps going on. I'm thinking about setting a timer that checks every 10-20 seconds, but I have no idea. Anyone have an idea?OR you could just make a variable which increases with each kill, and use a GetQuestVariable condition to move the quest onto the next stage, when this variable is equal to a certain number. It would be a whole lot simpler. Hm, I'm a bit new to GECK, do you have an example on how to go about this? Sure, it's really easy to do: Scn KillXScript Short XKills Add this script to your quest. Then, make a new script: Scn TotalXKillsScript Begin onDeath Set KillXQuest.XKills to KillXQuest.XKills +1 End Assign this script to whatever you want X to be (a ghoul, for example). The names aren't important, just make sure that where I've put KillXQuest, you put the name of your actual quest. Edited June 8, 2014 by EsvDefcon Link to comment Share on other sites More sharing options...
mastar891 Posted June 8, 2014 Share Posted June 8, 2014 Ah, I got it to work. Awesome! Link to comment Share on other sites More sharing options...
Recommended Posts