Page 1 of 1

Locations text

Posted: Thu Aug 23, 2012 10:57 am
by Granfali
How can I write over a map a location text? Example: Hill 124, Courseulles, Chapell, Red Beach, etc...

Re: Locations text

Posted: Thu Aug 23, 2012 2:49 pm
by pipfromslitherine
There is a neat little example campaign you can download from

www.slitherine.com/files/bbc_ba/Texttemplate.zip

which show how to do exactly that :)

Cheers

Pip

Re: Locations text

Posted: Thu Aug 23, 2012 2:59 pm
by Granfali
Thanks. ;)

Re: Locations text

Posted: Sun Aug 26, 2012 2:55 pm
by Old_Warrior
Here is a sample from the scenario script file:

FUNCTION PreBattleSetup()
{
ShowTextMarker(1, 70, 40, "IDS_LOC_PARIS", 12, "FFFFFF", 1);
}

70 40 is the tile location. 12 is the font size. 8 is usual font size but you can use 12 to emphasize this location over others on the map.

Then just enter in that string in the Text1.txt file in your <name> campaign folder.

String would look like this:

IDS_LOC_PARIS, "PARIS";

Re: Locations text

Posted: Sun Aug 26, 2012 3:25 pm
by Granfali
More easy now. Thanks a lot OW ;)

Re: Locations text

Posted: Wed Nov 07, 2012 12:45 pm
by GottaLove88s
Old_Warrior wrote:Here is a sample from the scenario script file:

FUNCTION PreBattleSetup()
{
ShowTextMarker(1, 70, 40, "IDS_LOC_PARIS", 12, "FFFFFF", 1);
}

70 40 is the tile location. 12 is the font size. 8 is usual font size but you can use 12 to emphasize this location over others on the map.

Then just enter in that string in the Text1.txt file in your <name> campaign folder.

String would look like this:

IDS_LOC_PARIS, "PARIS";
Hi OW, Please may I pick your venerable brain?

I'm trying to use your function in my Scenario.BSF...

Code: Select all

FUNCTION PreBattleSetup()
{
ShowTextMarker(1, 31, 16, "IDS_LOC_R2CREULLY", 12, "FFFFFF", 1);
}
With the following in text1.txt...

Code: Select all

IDS_LOC_R2CREULLY, "ROAD TO CREULLY",
But this text doesn't show up on the Scenario Map... Any ideas why?

I've put a VP flag at 30,17 and initially tried it there (it didn't work either) so I wondered if they might conflict and moved the text to 31,16... but it doesn't seem to work there either...

Re: Locations text

Posted: Wed Nov 07, 2012 3:55 pm
by pipfromslitherine
Are you sure PreBattleSetup is being called from somewhere?

Cheers

Pip

Re: Locations text

Posted: Wed Nov 07, 2012 4:41 pm
by GottaLove88s
pipfromslitherine wrote:Are you sure PreBattleSetup is being called from somewhere?

Cheers

Pip
DOH!! I'm absolutely certain that it, err, wasn't being called... :oops:
Thanks Pip. It works fine now. :D

Re: Locations text

Posted: Wed May 01, 2013 7:39 pm
by DocMogs
ok so i'm trying to do this and i've followed the example in the template with no success

how do i ensure PreBattleSetup is called?

i.e. what file do i alter to make sure it is called?

thanks for any help

Re: Locations text

Posted: Wed May 01, 2013 8:29 pm
by pipfromslitherine
PreBattleSetup is just a user function. Many people use the function name for the function they call to set things up initially. You would need to add something like

if(GetTurn() == -1)
{
PreBattleSetup() ;
}

to your StartTurn function

Cheers

Pip