Skip to content

addScript-attached local scripts start out inactive

When attaching lua scripts using addScript, these scripts appear to always unload when they become inactive. Triggering them through an eventHandler causes them to reload into memory, run their onLoad function, then immediately unload again. When they next become active, they will again reload and run their onLoad, then function as expected until they become inactive again. Reloadlua does not fix this behaviour.

In addition, using addScript on Activators causes the above issue, but also results in the script reloading every time the game is paused/unpaused. Using Reloadlua DOES fix this issue, but not the other one.

Tested on OpenMW 0.49 164563f5.