Jump to content

Skyrim Script Activation System


yolobomber

Recommended Posts

Posted

Hello everybody,

Today I though of a question, and ofcourse I couldn't find the answer for it anywhere.

The situation is the following, there is a script bound to a furniture object, for example a bed.

Then when a specific actor activates it, something will happen, for now only a Debug.Notification("Hello") for eample.

But when a actor(player, or a npc) activates it, it will ofcourse trigger.

But what if the player is in Markath, and the bed is in Whiterun, would the script trigger each time an npc in Whiterun interacts with it?

Does a script run only on LOS with the player, or will it run where ever the player may be?

Greetings,

YB

 

Posted

Hi.

The Papyrus VM, considers the objects in many different levels. Giving different priorities.

 

Quests & Actors have to max priority. Their scripts is always executed, also if you are not in the same cell (but Quests have to be running, and Actors not disabled.)

Magic Effect. This always run.

ObjectReferences & Packages run only for a while until you left the cell. They re-start when you enter again in the cell (that for interiors, for exteriors you need to be in the cell or in a side cell (3 x 3 matrix))

Statics: the script is not run directly here, but on the ObjectRef that is attached.

 

 

I hope this gives you some answer.

Posted

Ah yeah thanks you, I don't want the system to overload just because of a script that will run way too many times.

Also I have another question you may be able to help with, namely this simple script:

int i = utility.RandomInt(0,10)
Sexlab.QuickStart(Actor1=PlayerRef,Actor2=akSpeaker,AnimationTags="Vaginal")
if(i > 0 && i < 4)
PlayerRef.Additem(FoodHorseMeat, 1)
elseif(i >= 4 && i <= 6)
PlayerRef.Additem(FoodDogMeat, 1)
elseif(i > 6 && i <= 8)
PlayerRef.Additem(FoodLegOfGoat, 1)
else
PlayerRef.Additem(FoodRabbitLeg, 1)
EndIf

For some reasson, on my end it causes almost/everytime a 'pure function call' error of the c++ runtime stuff.

Though there is nothing special here that could cause this in this script as far as I know?

Posted

Be sure that the properties you are using (PlayerRef, FoodHorseMeat, Food...) are set.

SexLab handles it correctly (so playerref is not the problem) but .addItem() can do nasty stuff with a None reference.

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

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