Locations text

Download scenarios and talk about scenario design.

Moderators: Slitherine Core, BA Moderators

Post Reply
Granfali
Slitherine
Slitherine
Posts: 1602
Joined: Mon Aug 09, 2010 9:19 am

Locations text

Post by Granfali »

How can I write over a map a location text? Example: Hill 124, Courseulles, Chapell, Red Beach, etc...
pipfromslitherine
Site Admin
Site Admin
Posts: 9898
Joined: Wed Mar 23, 2005 10:35 pm

Re: Locations text

Post 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
Granfali
Slitherine
Slitherine
Posts: 1602
Joined: Mon Aug 09, 2010 9:19 am

Re: Locations text

Post by Granfali »

Thanks. ;)
Old_Warrior
Major - Jagdpanther
Major - Jagdpanther
Posts: 1019
Joined: Fri Apr 30, 2010 3:13 am

Re: Locations text

Post 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";
Granfali
Slitherine
Slitherine
Posts: 1602
Joined: Mon Aug 09, 2010 9:19 am

Re: Locations text

Post by Granfali »

More easy now. Thanks a lot OW ;)
GottaLove88s
Lieutenant-General - Do 217E
Lieutenant-General - Do 217E
Posts: 3151
Joined: Fri Apr 06, 2012 6:18 pm
Location: Palau

Re: Locations text

Post 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...
SCENARIO LINKS
Seelow'45 -> www.slitherine.com/forum/viewtopic.php?f=313&t=55132
Normandy'44 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42094
Dieppe'42 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42347
pipfromslitherine
Site Admin
Site Admin
Posts: 9898
Joined: Wed Mar 23, 2005 10:35 pm

Re: Locations text

Post by pipfromslitherine »

Are you sure PreBattleSetup is being called from somewhere?

Cheers

Pip
GottaLove88s
Lieutenant-General - Do 217E
Lieutenant-General - Do 217E
Posts: 3151
Joined: Fri Apr 06, 2012 6:18 pm
Location: Palau

Re: Locations text

Post 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
SCENARIO LINKS
Seelow'45 -> www.slitherine.com/forum/viewtopic.php?f=313&t=55132
Normandy'44 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42094
Dieppe'42 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42347
DocMogs
Corporal - Strongpoint
Corporal - Strongpoint
Posts: 52
Joined: Mon Oct 29, 2012 3:36 pm

Re: Locations text

Post 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
pipfromslitherine
Site Admin
Site Admin
Posts: 9898
Joined: Wed Mar 23, 2005 10:35 pm

Re: Locations text

Post 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
Post Reply

Return to “Battle Academy : Scenario Design”