Auto-translated
Good afternoon, I have a major question regarding creating quests using scripts, which breaks down into three separate questions:
1) One of the guides lists the scripts responsible for this, separated by commas:
GetObjectiveState( sObjectiveName, nPlayerID = PLAYER_1 ),
SetObjectiveState( sObjectiveName, nState, nPlayerID = PLAYER_1 )
IsObjectiveVisible( sObjectiveName, nPlayerID = PLAYER_1 )
SetObjectiveVisible( sObjectiveName, bVisible, nPlayerID = PLAYER_1 ),
but it doesn't explain what the differences are and in what specific situations each one is used. Phrases like "Returns the status of the objective," found in another guide, don't mean much to me as someone who isn't familiar with programming. I would like an explanation in plain language. Also, as I understand it, sObjectiveName is the content of the Name graph in the quests in Map Properties Free, and nPlayerID is the player number, but what do nState and bVisible mean?
2) There is a standard quest to capture a city, but I need it to appear in the journal on a specific day. In the code, I wrote:
if GetDate(DAY)==5 then
MessageBox(path.."day5.txt");
GetObjectiveState("dopzadanie1", 1);
end;
In Map Properties Free, I set the kind to objective_kind_manual and also left it at the default value; in both cases, the preceding scripts were executed, and no red messages appeared in the console, but the quest did not appear in the journal.
3) Another quest should also appear in the journal on a specific day and be completed when the hero enters a specific region. Accordingly, the question is what to write after if GetDate(DAY), and after Trigger(REGION_ENTER_AND_STOP_TRIGGER, 'region name', 'function name').
I hope this isn't too confusing. Thank you for your attention