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?
Actor Object Script Disappears on Reload
#1
Posted 16 October 2014 - 08:07 AM
#2
Posted 16 October 2014 - 08:48 AM
Gee, I don't know - I haven't been gifted with clairvoyance.
Maybe you could share the script to let people have a look? ![]()
#3
Posted 16 October 2014 - 08:55 AM
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 by jaredl, 16 October 2014 - 08:57 AM.
#4
Posted 16 October 2014 - 11:39 AM
setav confidence, iConfidence
is that a comma?
Also:
if player.GetAnimAction == 2
&& GetActorAggroRadiusViolated == 1
I guess this is on a single line
Edited by Fallout2AM, 16 October 2014 - 11:41 AM.
#5
Posted 16 October 2014 - 08:30 PM
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.
#6
Posted 17 October 2014 - 12:39 AM
Even this compile:
if player.GetAnimAction == 2 && || %% GetActorAggroRadiusViolated == 1
I don't blindly trust the compiler
#7
Posted 17 October 2014 - 03:51 PM
I have applied an object script to an actor
Applied 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).
#8
Posted 18 October 2014 - 08:22 AM
Even this compile:
if player.GetAnimAction == 2 && || %% GetActorAggroRadiusViolated == 1
I don't blindly trust the compiler
I went ahead and edited it into the same line but results were the same.
I have applied an object script to an actor
Applied 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 by jaredl, 18 October 2014 - 08:26 AM.
#9
Posted 18 October 2014 - 07:59 PM
Even this compile:
if player.GetAnimAction == 2 && || %% GetActorAggroRadiusViolated == 1
I don't blindly trust the compiler
I 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.
#10
Posted 19 October 2014 - 10:11 AM
The comma is syntactically correct, but it's optional so most leave it out.



Sign In
Create Account
Back to top









