Jump to content

Recommended Posts

Posted

I have been working on a mod that makes hostile mobs hunt the player at various times across the Outdoor world.

I have been adding hidden quests with scripts and updating existing scripts gradually as I play.

 

I am starting to notice a quest script that handles player events OnHit() and OnPlayerSwimming() and OnPlayerSleepStop() is triggering twice each time it should only trigger once. It's as if two copies of the script are running.

 

I need help finding out how to avoid this and to correct the existing problem.

 

Disable the mod, resave the game, then re-enable the mod?

Posted

Solution:

I was having problems with OnHit(), OnPlayerSleepStop(), OnPlayerSwimming() events double triggering. I thought that this was a problem with me updating the scripts gradually as I was progressing through the game. While I did have some success removing the ESP and PEX script files, and resaving the savegame to try and clear out the quest/script data, that was not the cause of the problem.

 

In the creation kit I created a "Start Enabled/Run Once" quest with a quest alias pointing to the player. It had a script attached which handles the events I just mentioned. At one point in the editor I noticed that the quest alias was missing so I had to add it back in a second time. I thought this was an editor quirk. It wasn't. I was looking at the wrong quest and ended up making 2 quest aliases. This caused the event triggering to double up.

 

That explains why no one else on earth has this problem.

  • Recently Browsing   0 members

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