Hello. More very basic modding assistance needed!
This should, in a sensible scripting language, be utterly trivial. But this is Morrowind, so it doesn't seem like it is:
if ( GetJournalIndex "vaba10_mine" >= 10 )
if ( GetJournalIndex "vaba10_mine" < 40 )
enable
endif
else
disable
endif
So obviously, all I want to happen is that the NPC with the script is enabled when the journal is at those points, and otherwise disabled. I get that my "disable" is in the wrong place, logically, but if I try writing something that makes logical sense (to me) Morrowind tells me that it's invalid.
Any help much appreciated on this stupidly trivial question!
2022-10-05 00:13
3 hours 51 min ago
if ( GetJournalIndex "vaba10_mine" < 10 )
if ( GetDisabled == 0 )
disable
endif
elseif ( GetJournalIndex "vaba10_mine" >= 40 )
if ( GetDisabled == 0 )
disable
endif
elseif ( GetDisabled )
enable
endif
Your version doesn't work because it enters the >= 10 branch and completely ignores the final "else". Also, disabling/enabling object at each frame is heavy for performance, so you need to wrap them into GetDisabled checks.
2023-12-22 11:05
7 months 1 week ago
Brilliant. Thank you. Didn't know about "getdisabled"'s usage.