I'm adding some vendors to the IC Market District. Since I'm super lazy, I want these vendors to simply be disabled at night, and enabled during the day when open for business. I'm a complete dunce when it comes to scripting, but I thought this would be pretty simple. But I can't get it to work right. I have the NPC in game, with the "Initially Disabled" box checked. Here is the script attached to his reference:
scn JFICMarketPriestScript
short doOnce
Begin GameMode
If GameHour >= 8 && GameHour <= 20
If doOnce == 0
JFICMarketPriestREF.enable
set doOnce to 1
endIf
endIf
If GameHour > 21
If doOnce == 1
JFICMarketPriestREF.disable
set doOnce to 0
endIf
endIf
End
It compiles fine and all, but seems to have no effect. I've tried having the NPC enabled or disabled to start, and he stays in either state irrespective of game time. If anyone could tell me what I'm doing wrong, I would really appreciate it. (And I'm sorry if my code is horrific, I really do not "get" scripting very well.)