Jump to content

Repeating Animation script package on player issue


Khet

Recommended Posts

Right... I figured out how to get what I wanted in the beginning of my mod, just a simple animation where the player wakes up and gets outta bed... not that big of a deal, should be easy, right? Well... no, not really. My problem is... I can't remove the bloody animation! Well, my first issue is when loading it the player is standing up, then about four seconds later the animation plays but I think that can be fixed by a black screen fade in... my real issue comes with the repeating animation. I've got it all set up properly, and I swear it just has something to do with my script not processing right and not removing the animation, here's my set up.

 

 

My quest ID is ASRQuest

 

For stage 1 I have this under the Result Script

 

;waking up, set to add package
Set ASRQuest.RunTimer to 1
Set ASRQuest.Timer to 11.3

 

Stage 2 has this for the Result Script

 

;Stop the Timer
Set ASRQuest.RunTimer to 0
;Done waking up, remove package
Player.RemoveScriptPackage ASRWakeUp

 

And, in my script attached to the quest, I have this:

 

Begin GameMode

;Make sure the cell is loaded and then wake up player

If Player.GetInCell ASRShack == 1
Set Loaded to 1
EndIf

if Loaded == 1
Player.AddScriptPackage ASRWakeUp
SetStage ASRQuest 1
Set Loaded to 2
endif

;Done waking up, set to remove package
if RunTimer == 1
if Timer <= 0
	elseif GetStage ASRQuest == 1
	setStage ASRQuest 2
endif
else
	set Timer to Timer - GetSecondsPassed
endif
endif

End

 

Like I said, I believe it's an issue with the script package not being removed like it should, but I don't know where the hiccup is coming from. Any help on this little bit would be greatly appreciated, it's bugging me like crazy that I've gotten this far and now the animation won't remove. I've downloaded and checked out other mods that use the AddScriptPackage and RemoveScriptPackage and from what I've seen by comparison is SHOULD work... but it isn't.

 

At first I thought my timers were off... but I ended up starting a game, let the animation go... then when it started the second time through I went out to grab a smoke (about 3 or 4 minutes) came back... and the animation was still playing.

Link to comment
Share on other sites

Looks like you have a syntax error in that script:

 

;Done waking up, set to remove package
if RunTimer == 1
if Timer <= 0
	elseif GetStage ASRQuest == 1
	setStage ASRQuest 2
endif
else
	set Timer to Timer - GetSecondsPassed
endif
endif

 

EDIT: You have some blocking problems. It should look more like this:

 

;Done waking up, set to remove package
if RunTimer == 1
if Timer <= 0
	if GetStage ASRQuest == 1
		setStage ASRQuest 2
	endif
else
	set Timer to Timer - GetSecondsPassed
endif
endif

Link to comment
Share on other sites

Nope, not quite. Although, something did chance. Control is returned to player for a few seconds before the animation decides to loop again... dunno if that means anything, or if I just didn't catch it before.

 

Seeing if adding a condition to the package will at least stop it from looping. While it's not really a fix, and more of a workaround, it would let me temporarily focus on other things until I get this little issue straightened out.

 

Edit: Condition didn't even work.. odd.

Link to comment
Share on other sites

Whaddya know, Dyadya, it worked. Pretty obvious... only a single check which always returned true which resulted in the script package being added back to the player. Then again, it's usually the most obvious things that are overlooked. Either way, thanks mate!
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...