Jump to content

MCM condition using script on refalias


Recommended Posts

Hi,

I can use conditions on a script attached to my quest for my MCM menu thus:

{
"type": "hiddenSwitcher",
"text": "Invisible switcher control for nukaworld",
"groupControl": 2,
"valueOptions":
{
"sourceType": "PropertyValueBool",
"sourceForm": "dz_no_attacks.esp|0800",
"scriptName": "dz_no_attacks_quest_script",
"propertyName": "nukaworld_installed"
}
},

 

but I am unable to do it with a script attached to a refalias on the quest:

{
"type": "hiddenSwitcher",
"text": "Invisible switcher control for nukaworld",
"groupControl": 2,
"valueOptions":
{
"sourceType": "PropertyValueBool",
"sourceForm": "dz_no_attacks.esp|0800",
"scriptName": "dz_no_attacks_game_load_script", ----------------> this script attached to a refalias for the player
"propertyName": "nukaworld_installed"
}
},

 

I get the error in MCM.log:

Cannot retrieve a property value nukaworld_installed from a form with no scripts attached. (dz_no_attacks.esp|0800)

 

I've tried specifying 0014 instead of 0800 and also Fallout4.esm instead of my mods esp but no joy. Does the script attached to the refalias not get treated as a script attached to the quest?

 

 

diziet

Link to comment
Share on other sites

ReferenceAlias extends Alias which extends ScriptObject. It doesn't have a Form so you can't get its form.

 

You can either have your reference alias set properties on the quest script <dz_no_attacks_quest_script> that MCM can access or use the event I posted in your other thread.

 

I forgot there was an MCM log. Thanks for the tip!

Link to comment
Share on other sites

  • Recently Browsing   0 members

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