Iconic985 Posted December 5, 2013 Share Posted December 5, 2013 Basically I want a script that adds +1 to a value every time a Draugr is killed. When this number reaches 100 I want it to add a perk. The perk and stuff I can do my self but I never understood variables so any help would be appreciated. Link to comment Share on other sites More sharing options...
Terra Nova Posted December 5, 2013 Share Posted December 5, 2013 Hello. I cannot help you script this completely. I'm merely pointing you in the direction to get you started. You can create a global variable and use it to track how many have been killed by checking it using the race. You'll needGetRace - Actor. Therefore, if the target killed is not a draugr, nothing would happen. But if it is, it'll check the amount of them killed.You'll have to set the global to 100. And use int count =- 1 to count down from each draugr killed, or vice versa(which would then be int count =+ 1).That's the best I can do for you. Link to comment Share on other sites More sharing options...
koryushin Posted December 5, 2013 Share Posted December 5, 2013 (edited) Hi, Basicaly i would use a cloak effect to attach a script to those in fight with me.Like the tutorial http://www.creationkit.com/Dynamically_Attaching_Scripts The applying effect check if the target is dead and if it is a draugr race. And then add +1 to your global variable. I think it's the easyest way. Correct me if i'm wrongForgive my bad english, i'm french :) Edited December 5, 2013 by koryushin Link to comment Share on other sites More sharing options...
Fistandilius Posted December 5, 2013 Share Posted December 5, 2013 Find the code for the bunnies killed statistic and use that as a model. Link to comment Share on other sites More sharing options...
Iconic985 Posted December 6, 2013 Author Share Posted December 6, 2013 Ok I've got the script working and have tested it using the console command GetGlobalValue. However how do I put it into a message box, for example: Debug.Notification("Killcount: VariableName) ;VariableName is the name of the global variable. Link to comment Share on other sites More sharing options...
Terra Nova Posted December 6, 2013 Share Posted December 6, 2013 (edited) Ok I've got the script working and have tested it using the console command GetGlobalValue. However how do I put it into a message box, for example: Debug.Notification("Killcount: VariableName) ;VariableName is the name of the global variable. It's better to use an actual message box created in the CK and then use it as a property in the script and call it, but to show the amount killed, etc is a different procedure that I don't know how to do. So... for Debug: Debug.Notification("Number of Draugr Killed:" +GlobalVariableName.GetValue())Btw, there is no way to get the number to show up as a pure int, even if you use GetValueInt(). It's always gonna show up as a float. (ex. 50 killed would be 50.000000) Edited December 6, 2013 by Terra Nova Link to comment Share on other sites More sharing options...
Iconic985 Posted December 7, 2013 Author Share Posted December 7, 2013 Thanks a bunch Terra its working now. Sucks about the pure integer thing though. Link to comment Share on other sites More sharing options...
meh321 Posted December 7, 2013 Share Posted December 7, 2013 What about Debug.Notification("Number of Draugr Killed:" +(GlobalVariableName.GetValue() as int)) Link to comment Share on other sites More sharing options...
Recommended Posts