Tiranno71 Posted October 2, 2014 Share Posted October 2, 2014 Hi, i need to change weight of target NPC casting a spell as effect. i've looked around but i've found a function that change player weight only. My problem is, there is a function to change weight to npc too?If yes, can anyone post an example? Thank you in advance. Link to comment Share on other sites More sharing options...
IsharaMeradin Posted October 2, 2014 Share Posted October 2, 2014 SKSE's SetWeight can be used for any actor not just the player. Link to comment Share on other sites More sharing options...
Tiranno71 Posted October 2, 2014 Author Share Posted October 2, 2014 (edited) SKSE's SetWeight can be used for any actor not just the player. Thanks for reply, i'm new with scripting .... trying to do this: Scriptname WeightEffect extends activemagiceffect Event OnEffectFinish(Actor akTarget, Actor akCaster) actorbase pakTarget = akTarget.GetActorBase() pakTarget.SetWeight(100.0) pakTarget.QueueNiNodeUpdate() EndEvent the compiler give me these errors: WeightEffect.psc(7,12): SetWeight is not a function or does not existWeightEffect.psc(8,11): QueueNiNodeUpdate is not a function or does not exist how can I solve? Edited October 2, 2014 by Tiranno71 Link to comment Share on other sites More sharing options...
IsharaMeradin Posted October 2, 2014 Share Posted October 2, 2014 Make sure SKSE is installed including the PSC files. Link to comment Share on other sites More sharing options...
Tiranno71 Posted October 2, 2014 Author Share Posted October 2, 2014 Make sure SKSE is installed including the PSC files. Other things work well just this not. can you post a working script for my knowledge? I've just started scripting from a few days. i've created some scripts already with no problems, but never used functions till now.i wull appreciate your help. ...anyway ... thanks. Link to comment Share on other sites More sharing options...
IsharaMeradin Posted October 2, 2014 Share Posted October 2, 2014 SKSE stuff will run in game without the PSC scripts installed in the Data > Scripts > Source folder, but SKSE functions will not be located and prevent scripts from being compiled. Hence I said to make sure that the PSC files were also installed. The following is a modification of your script. It compiles. No idea if it works. Only thing different is that the QueueNiNodeUpdate needed to be called with an actor rather than an actorbase. The SetWeight did not produce an error at all. Thus my suggestion to ensure that SKSE was fully installed is warranted. Scriptname WeightEffect extends activemagiceffect Event OnEffectFinish(Actor akTarget, Actor akCaster) actorbase pakTarget = akTarget.GetActorBase() pakTarget.SetWeight(100.0) akTarget.QueueNiNodeUpdate() EndEvent Link to comment Share on other sites More sharing options...
Sulhir Posted October 2, 2014 Share Posted October 2, 2014 I have often had to go and manually install some of the SKSE scripts because the automated installer doesn't always get it properly - not sure why. But manual always works. Link to comment Share on other sites More sharing options...
Tiranno71 Posted October 3, 2014 Author Share Posted October 3, 2014 Thanks to all, finally has been compiled without errors. I've reinstalled manually all SKSE package and everything is gone right even if the script don't show the change weight when casted the related spell on target. For now it's hard find a solution.... anyway thanks so much again! :) Link to comment Share on other sites More sharing options...
Recommended Posts