startingstopping packages in papyrus?

Post » Tue Jun 19, 2012 4:29 pm

I want to start/stop packages from running on an NPC from a script but I can't find any functions to do so. According to the wiki, in the actor script, I only see functions to get the current package or reavaluate them. Is there a way to set which one's running?
User avatar
ruCkii
 
Posts: 3360
Joined: Mon Mar 26, 2007 9:08 pm

Post » Tue Jun 19, 2012 9:27 pm

I don't think there are built-in functions to do this directly, but you can set a variable/property in a script, and then have conditions based around that variable in each of the packages in the actor's package stack, in order to set which package should be running.
User avatar
Myles
 
Posts: 3341
Joined: Sun Oct 21, 2007 12:52 pm

Post » Tue Jun 19, 2012 12:16 pm

Thanks a lot for pointing me in the right direction.

I have ran into another obstacle going that way though, so if anyone can help me, I'd appreatiate it!

When setting the package condition, there's no getScriptProperty condition. There's a getScriptVariable condition (aren't variables private btw?), that requires a reference ID as a parameter. So I added the script with both properties and variables to an actor reference in the game, then, in the condition, I selected the cell and reference as the first parameter. The problem is that there's no way to select the script nor the property/variable because parameter 2 (Variable Name) is Unknown and the drop down box is grayed out.
User avatar
Andy durkan
 
Posts: 3459
Joined: Fri Aug 03, 2007 3:05 pm

Post » Tue Jun 19, 2012 11:12 am

I had the exact same problem the first time--use GetVMScriptVariable rather than GetScriptVariable (likewise use GetVMQuestVariable for getting variables attached to quest scripts). There are functions from past games still in the list of condition functions, that no longer work: GetScriptVariable is one of them.

It is true that variables are private, but a property that's labeled "conditional" can be used in these lists of conditions--that's why I said variable/property, sorry if that wasn't clear. Not sure quite what to call it, a variable that is a property or a property that is a variable. The point is, it's something that you'll set to different values via script, rather than using the "edit properties" dialogue box to give it a fixed assignment.

Hope that helps!
User avatar
Penny Flame
 
Posts: 3336
Joined: Sat Aug 12, 2006 1:53 am

Post » Tue Jun 19, 2012 5:38 pm

I had the exact same problem the first time--use GetVMScriptVariable rather than GetScriptVariable (likewise use GetVMQuestVariable for getting variables attached to quest scripts). There are functions from past games still in the list of condition functions, that no longer work: GetScriptVariable is one of them.

It is true that variables are private, but a property that's labeled "conditional" can be used in these lists of conditions--that's why I said variable/property, sorry if that wasn't clear. Not sure quite what to call it, a variable that is a property or a property that is a variable. The point is, it's something that you'll set to different values via script, rather than using the "edit properties" dialogue box to give it a fixed assignment.

Hope that helps!

Thank you so much! I haven't tried that yet but you've been so helpful! It would have taken me forever to get here by myself.
User avatar
Tasha Clifford
 
Posts: 3295
Joined: Fri Jul 21, 2006 7:08 am


Return to V - Skyrim