SpeedyB64 Posted February 3, 2009 Share Posted February 3, 2009 Hmm. You could try that. What errors are you getting exactly? Link to comment Share on other sites More sharing options...
Fertal Posted February 3, 2009 Author Share Posted February 3, 2009 Hmm. You could try that. What errors are you getting exactly? unfortunately I cannot try in this moment: I'm at work and I cannot installa F3 and the GECK :( Link to comment Share on other sites More sharing options...
SpeedyB64 Posted February 3, 2009 Share Posted February 3, 2009 I can't try it either I'm at school. Link to comment Share on other sites More sharing options...
Fertal Posted February 3, 2009 Author Share Posted February 3, 2009 no problem, tonight I try ;) Link to comment Share on other sites More sharing options...
thc1234 Posted February 3, 2009 Share Posted February 3, 2009 To use get/set AV without reference You need to be in spell effect script (the spell which is cast on Actor) or in script assigned to Actor. You can't assign scripts at runtime AFAIK (at least not until/if FOSE solves this), so you have to make persistent NPC in GECK and assign it this object script. To use get/set AV with reference (that is somewhere else than object/actor or spell/actor script) You need that reference :PYou can use Player.SetAV (to refer to PC) or some reference NPC. (persistent references can be found in GECK however note than many NPCs are levelled and not persistent, and as such can't be directly referenced in script, unless you acquire treir ref during runtime) For example this way you can change some of susan lancaster stats.SusanLancasterRef.SetAV something 0(tho I'm not sure if persistent NPCs are allways loaded, if not then it will work only when she is around) This can't be obviously done with unnamed NPCs, so you have to think your way of getting their ref during runtime. (if you need to) Link to comment Share on other sites More sharing options...
Fertal Posted February 4, 2009 Author Share Posted February 4, 2009 To use get/set AV with reference (that is somewhere else than object/actor or spell/actor script) You need that reference :PYou can use Player.SetAV (to refer to PC) or some reference NPC. in my script I want to assigne the value of a Player stat (i.e. Small Guns) with GetActorValue and reset this to another value, with SetActorValue. You mean that I must simply specify the ref using Player.GetActorValue SmallGuns and Player.SetActorValue SmallGuns? Link to comment Share on other sites More sharing options...
SpeedyB64 Posted February 4, 2009 Share Posted February 4, 2009 So thats whats wrong (why diden't I think of that) In a script you need to specify the player in order to change values. Syntax: SetActorValue StatName valueSetAV StatName value Example: SetActorValue Strength 60Player.SetActorValue Alteration 50 ---->This is the one you need SetActorValue sets the stat's base value to the new value.Notes * Although called on a reference, this function actually changes the value on the base actor (thus the base value on all references of that base actor). Note also that ModActorValue modifies the stat value only on the reference, and so is usually preferable. Frome the TES CS Wiki (linked from the GECK Wiki) I think SetActorValue is best for the player and ModActorValue is best for NPCs Link to comment Share on other sites More sharing options...
Fertal Posted February 5, 2009 Author Share Posted February 5, 2009 You mean that I must simply specify the ref using Player.GetActorValue SmallGuns and Player.SetActorValue SmallGuns? ok, does it work... now it's time to tuning the mod ;) thank you very much at all! :D Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.