Page 1 of 1

Questions: CampaignVars, empty messages, WIN_SCENARIO_CALLBA

Posted: Tue Jul 17, 2012 6:40 am
by rf900
Hi

I am bit stuck with my current campaign, need some help with this:

I am trying to use campaign vars but cannot find any example, declared then in CAMPAIGN.TXT (VAR maxcarrymis1;) and then using them SetCampaignVar(maxcarrymis1,10); gives an error saying it does not exist or something similar.

Also I try to display messages ingame but they appear empty, ShowUIScreenY( "BattleHead0", "Anim1", "IDS_SPBM1_END"); Those are texts that are defined and even appear in the scenario selection screen.

And the last, calling MenLeftInUnit inside FUNCTION WIN_SCENARIO_CALLBACK(winner) throws an error, maybe at that point units are already unloaded from the map?

Thanks

Re: Questions: CampaignVars, empty messages, WIN_SCENARIO_CA

Posted: Tue Jul 17, 2012 1:53 pm
by rf900
Forget the last one, wasn't including Tools.bsf in the scenario script. :roll:

Re: Questions: CampaignVars, empty messages, WIN_SCENARIO_CA

Posted: Thu Jul 26, 2012 5:00 pm
by pipfromslitherine
You need to make the SetCampaignVar("maxcarrymis1", 10) - it is a string argument.

The popup UI stuff is a little fiddly. Basically there is an object in the UI battlehead0.txt file called BHEAD0TEXT. To show a string on it, you need to name the string

IDS_SPBM1_END_BHEAD0TEXT, "this is the string text",

This is how the system knows where to put text (e.g. if you had a popup with multiple text boxes).

MenLeftInUnit is probably defined in tools.bsf - are you including the file? You can find it by using Find in Files for FUNCTION MenLeftInUnit

Cheers

Pip

Re: Questions: CampaignVars, empty messages, WIN_SCENARIO_CA

Posted: Thu Jul 26, 2012 6:35 pm
by rf900
Thanks a lot pip I was so stuck.

Re: Questions: CampaignVars, empty messages, WIN_SCENARIO_CA

Posted: Thu Jul 26, 2012 6:36 pm
by pipfromslitherine
np - there is such a lot of stuff you can do, it is pretty easy to find things I have failed to document...

I will try and add these things to the online docs if I can stay awake for long enough today :)

Cheers

Pip