AwesomeSkyrimDude Posted April 19, 2012 Share Posted April 19, 2012 @fg109 Thank you, and yes I understand papyrus isn't exactly suited to this sort of thing. I want to try anyways. Are there any sites you would recommend to help me learn the language syntax and such? Link to comment Share on other sites More sharing options...
fg109 Posted April 19, 2012 Author Share Posted April 19, 2012 Well, there is always the Creation Kit wiki, but I mostly learn from reading other people's forum posts. :psyduck: There's also the TES Alliance forums but it doesn't seem as active as either here or the Creation Kit forum. It has a good tutorial for beginners, but that's the only tutorial. Link to comment Share on other sites More sharing options...
scrivener07 Posted April 19, 2012 Share Posted April 19, 2012 Thanks for the tips about OnEquipped fg. Works great. I had a similar script to the one below that would constantly receive updates every 2 secs, at least it worked perfectly. So when I tried to control that I did something and cant remember what, now I cant get this to receive updates at all. Im inexperienced and a little tired so Im also having trouble understanding how states work and if I even need them. Hope you can help me once again :happy: Scriptname AlchemistkitScript extends ObjectReference {The alchemist field kit} EVENT OnEquipped(Actor akActor) If akActor == Player ActiveBench = Player.PlaceAtMe(AFK_Bench) Debug.Notification("You unpack your equipment") Utility.Wait(1) ActiveBench.Activate(Player) RegisterForUpdate(1) Debug.Notification("Registering for update") Endif ENDEVENT Event OnUpdate() Debug.Notification("Update event fired") if (ActiveBench.IsFurnitureInUse(true) == false ) UnregisterForUpdate() Debug.Notification("Im not being used - DELETE ME!") ActiveBench.Delete() ;;Player.PlayIdle(EndIdle) ;testing failsafe endif EndEvent Actor Property Player Auto ;note: use Game.GetPlayer() Furniture Property AFK_Bench Auto ;BaseObject ObjectReference Property ActiveBench Auto ;Share variable between events Idle Property EndIdle Auto ;trys to override current idle with one that doesnt loop incase idle gets stuck Link to comment Share on other sites More sharing options...
Haplo_64 Posted April 19, 2012 Share Posted April 19, 2012 How about a script to check the charge of every item in your inventory?Or just the ones equipped, if that's not possible. I'm not sure how the items you are carrying are stored, so I'm not sure this is possible. Link to comment Share on other sites More sharing options...
tmanthewhite Posted April 19, 2012 Share Posted April 19, 2012 Hi, me again. Since I made NPCs' level independant of the player, they are much stronger in the beginning of the game than they used to be. One result of this, is that the giant attack you witness as you approach Whiterun (where the companions are fighting a giant on the Battle-Born farm) is over before you even have a chance to get near. I want to to double that particular giant's hitpoints to give the player an oppertunity to join in, and my questions are: A) Is this even possible?, and B) How do I prevent all giants in the game from doubling their hitpoints if I'd do this? (I tried looking at the script for that encounter, and I don't understand it at all... The giant seems to be a generic spawned giant? Very confused.) Another option I thought of might be to raise the giant's armor rating, possibly by using a spell, but I also have no idea how to do that. Does anybody know my options? Thanks in advance, T. Link to comment Share on other sites More sharing options...
fg109 Posted April 19, 2012 Author Share Posted April 19, 2012 @scrivener07 Duke Patrick had the same problem and he decided to just go with a while loop. In your case, you could also have a script on the work bench to run the updates instead. Also, states are just there to help control whether or not something runs. So something like this: Auto State Give Event OnUpdate() Game.GetPlayer().AddItem(Gold001) EndEvent EndState State Take Event OnUpdate() Game.GetPlayer().RemoveItem(Gold001) EndEvent EndState is the same as this: Bool Give Event OnUpdate() if (Give) Game.GetPlayer().AddItem(Gold001) else Game.GetPlayer().RemoveItem(Gold001) endif EndEvent Using states are better than bools because supposedly it's faster and takes less processing power, or so I hear. I haven't tested it out for myself. It's also a lot less trouble to use if you happen to have a lot of events for each state/circumstance, or more than two states/circumstances. @Haplo_64 Sorry, but there are no script functions dealing with enchantment charges. @tmanthewhite Haven't looked at the quest, but I'm assuming that the giant must be assigned a reference alias. In the spells portion of the alias window for the giant, add an ability that fortifies health. Link to comment Share on other sites More sharing options...
AwesomeSkyrimDude Posted April 19, 2012 Share Posted April 19, 2012 (edited) Well, there is always the Creation Kit wiki, but I mostly learn from reading other people's forum posts. :psyduck: There's also the TES Alliance forums but it doesn't seem as active as either here or the Creation Kit forum. It has a good tutorial for beginners, but that's the only tutorial. Thank you again. I will check it out. Edit: Trying to run your code and it keeps telling me "GetActorReference is not a function or does not exist" I feel like I' am probably missing something very obvious. Edited April 19, 2012 by AwesomeSkyrimDude Link to comment Share on other sites More sharing options...
kryptopyr Posted April 19, 2012 Share Posted April 19, 2012 The follower I'm working on doesn't use the CurrentFollowerFaction but operates off an entirely separate quest that I added. I could probably also use a property that the quest uses to track the follower state, but I wasn't sure how to reference a property from one quest by a different script that is not part of that quest. Would it be something like: MyCustomFollower FollowScript = MyCustomFollowerQuest as MyCustomFollowerIf (FollowScript.FollowerState = 1) SetPlayerTeammate is also used by this quest, though, so I thought that would be easiest. Using IsPlayerTeammate, the script compiled and seemed to run okay. The follower would run to attack, get a certain distance from my character, and then stop combat. Unfortunately, he then immediately returned to combat, tried to run toward enemy, stopped combat, moved a few steps toward me, returned to combat, etc. Do you think it might work to have the script set a variable that would then be used as a condition to trigger a combat override package? In the CK there is a package for Mercer called TG08bMercerWithdrawCombatOverridePackage. It seems to use GetActorValue Variable07 as a condition to trigger the actor to withdraw from combat. That variable is being set by a script that runs during the quest scene (TG08BFightController). I'll play around with it a bit. Between this script and the script you wrote, I'm hoping I can figure it out. I'll let you know if I manage to get it to work. Thank you so much for your help. I might not have it working just yet, but at least I feel like I now have a solid base to work from. I'll almost certainly be back with more questions. Link to comment Share on other sites More sharing options...
M3rvin Posted April 19, 2012 Share Posted April 19, 2012 Is there any function similar to GetInventoryObject added to Oblivion/Fallout 3/Fallout New Vegas by the corresponding script extender (obse,fose,nvse)?It might be added by the skyrim script extender to Skyrim, but I couldn't find any documentation for its functions. Link to comment Share on other sites More sharing options...
screamingabdab Posted April 19, 2012 Share Posted April 19, 2012 Hello fg, I'm after a patrol start modifying script. I've got 2 NPC's that walk the same patrol, but I'm after a script that makes them start at the same time, from the start marker. Possible? Cheers, J Link to comment Share on other sites More sharing options...
Recommended Posts