jaredl Posted October 16, 2014 Share Posted October 16, 2014 I have applied an object script to an actor which will work the first time I load a game. If I reload the game the script no longer works like it isn't there. Is there something I am missing? Link to comment Share on other sites More sharing options...
Ladez Posted October 16, 2014 Share Posted October 16, 2014 (edited) . Edited December 5, 2014 by Ladez Link to comment Share on other sites More sharing options...
jaredl Posted October 16, 2014 Author Share Posted October 16, 2014 (edited) scn CreatureScatter float timer short iConfidence short toggle Begin GameMode if toggle == 0 set iConfidence to getav confidence endif if player.GetAnimAction == 2 && GetActorAggroRadiusViolated == 1 set toggle to 1 setav confidence 0 startcombat player endif if timer < 1 && toggle == 1 set timer to timer + GetSecondsPassed else setav confidence, iConfidence set toggle to 0 set timer to 0 endif End Edited October 16, 2014 by jaredl Link to comment Share on other sites More sharing options...
Fallout2AM Posted October 16, 2014 Share Posted October 16, 2014 (edited) setav confidence, iConfidence is that a comma? Also: if player.GetAnimAction == 2 && GetActorAggroRadiusViolated == 1 I guess this is on a single line Edited October 16, 2014 by Fallout2AM Link to comment Share on other sites More sharing options...
jaredl Posted October 16, 2014 Author Share Posted October 16, 2014 Yes that is a comma. I saw it used that way in an example script online and it seems to be the only way I can use a variable with that function. The second part is not on a single line but GECK lets me save it and it does work, at least on the first load. I will try it on the same line and see if it makes a difference. Link to comment Share on other sites More sharing options...
Fallout2AM Posted October 17, 2014 Share Posted October 17, 2014 Even this compile: if player.GetAnimAction == 2 && || %% GetActorAggroRadiusViolated == 1 I don't blindly trust the compiler Link to comment Share on other sites More sharing options...
jazzisparis Posted October 17, 2014 Share Posted October 17, 2014 I have applied an object script to an actorApplied how? Is the script attached to the actor by default, or are you using the SetScript command to attach it? If the latter, then the issue you're describing is to be expected, as SetScript doesn't work properly (as of NVSE 4.5b7). Link to comment Share on other sites More sharing options...
jaredl Posted October 18, 2014 Author Share Posted October 18, 2014 (edited) Even this compile: if player.GetAnimAction == 2 && || %% GetActorAggroRadiusViolated == 1 I don't blindly trust the compilerI went ahead and edited it into the same line but results were the same. I have applied an object script to an actorApplied how? Is the script attached to the actor by default, or are you using the SetScript command to attach it? If the latter, then the issue you're describing is to be expected, as SetScript doesn't work properly (as of NVSE 4.5b7). The script is attached to the base actor by default. For the rest I use the template flag Use Scripts. It turns out the scripts were working on other NPCs, but I was just testing on the same ones over which lose their script after a second load. 00157B37 is the FormID of the Placed Object of one of the NPCs (FalloutNV.esm). Perhaps if someone could take a look. Edited October 18, 2014 by jaredl Link to comment Share on other sites More sharing options...
Fallout2AM Posted October 18, 2014 Share Posted October 18, 2014 Even this compile: if player.GetAnimAction == 2 && || %% GetActorAggroRadiusViolated == 1 I don't blindly trust the compilerI went ahead and edited it into the same line but results were the same. did you remove the comma too? after that, I would printC every script line, to see what exactly is executed and what's not, and when. And I would reload an older save, before the mod, or start a new game. Link to comment Share on other sites More sharing options...
Ladez Posted October 19, 2014 Share Posted October 19, 2014 The comma is syntactically correct, but it's optional so most leave it out. Link to comment Share on other sites More sharing options...
Recommended Posts