Locations text
Moderators: Slitherine Core, BA Moderators
Locations text
How can I write over a map a location text? Example: Hill 124, Courseulles, Chapell, Red Beach, etc...
-
pipfromslitherine
- Site Admin

- Posts: 9898
- Joined: Wed Mar 23, 2005 10:35 pm
Re: Locations text
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
www.slitherine.com/files/bbc_ba/Texttemplate.zip
which show how to do exactly that
Cheers
Pip
-
Old_Warrior
- Major - Jagdpanther

- Posts: 1019
- Joined: Fri Apr 30, 2010 3:13 am
Re: Locations text
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";
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
More easy now. Thanks a lot OW 
-
GottaLove88s
- Lieutenant-General - Do 217E

- Posts: 3151
- Joined: Fri Apr 06, 2012 6:18 pm
- Location: Palau
Re: Locations text
Hi OW, Please may I pick your venerable brain?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";
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);
}Code: Select all
IDS_LOC_R2CREULLY, "ROAD TO CREULLY",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
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

- Posts: 9898
- Joined: Wed Mar 23, 2005 10:35 pm
Re: Locations text
Are you sure PreBattleSetup is being called from somewhere?
Cheers
Pip
Cheers
Pip
-
GottaLove88s
- Lieutenant-General - Do 217E

- Posts: 3151
- Joined: Fri Apr 06, 2012 6:18 pm
- Location: Palau
Re: Locations text
DOH!! I'm absolutely certain that it, err, wasn't being called...pipfromslitherine wrote:Are you sure PreBattleSetup is being called from somewhere?
Cheers
Pip
Thanks Pip. It works fine now.
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
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
Re: Locations text
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
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

- Posts: 9898
- Joined: Wed Mar 23, 2005 10:35 pm
Re: Locations text
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
if(GetTurn() == -1)
{
PreBattleSetup() ;
}
to your StartTurn function
Cheers
Pip
