A few general design questions

Download scenarios and talk about scenario design.

Moderators: Slitherine Core, BA Moderators

insidius
Sergeant - Panzer IIC
Sergeant - Panzer IIC
Posts: 195
Joined: Sun Aug 08, 2010 9:49 pm

Post by insidius »

Ok, in my scenario I have enabled mortar movement by switching its type to infantry and allowing it to move only 2 spaces per turn without a transport.

My question is, is it possible to use the 30 cal squads movement animation for the mortar team? I'm thinking the held 30 cal looks 'enough' like a packed up mortar since the animation only lasts a second or two.

Would this be ok do you think? If so, where do I change what animation that squad uses?

Thanks.
pipfromslitherine
Site Admin
Site Admin
Posts: 9878
Joined: Wed Mar 23, 2005 10:35 pm

Post by pipfromslitherine »

It would depend on whether the assets for the mortar crews even have a movement animation!

I think you can create a copy of the .txt animation file (found in DATA\BATTLE\UNITS) in your local MyCampaign\DATA\BATTLE\UNITS folder and try altering the MOVE animation frames.

Cheers

Pip
insidius
Sergeant - Panzer IIC
Sergeant - Panzer IIC
Posts: 195
Joined: Sun Aug 08, 2010 9:49 pm

Post by insidius »

Yeah, I'm not sure if the mortars have a movement animation at all like you were saying. I copied the 30 cal .text and renamed it to US_mortar and it had... well, let's say interesting results.
insidius
Sergeant - Panzer IIC
Sergeant - Panzer IIC
Posts: 195
Joined: Sun Aug 08, 2010 9:49 pm

Post by insidius »

Are there any German heads for use for onscreen messages, for example BHead0Image:pilot_head? The ones I've seen all seem to be US heads.

Also, in this bit of code:

Code: Select all

if( (GetTurn() == 6) )
	{
		if(side == 0)
		{
			// AddUnit with more options : FUNCTION PlaceUnit(x, y, facing, side, team, type)
			
			PlaceUnit(41, 17, 7, 0, 0, "US_truck") ;
			PlaceUnit(63, 0, 8, 0, 0, "US_mortar") ;			
			PlaceUnit(41, 16, 7, 0, 0, "US_truck") ;
			PlaceUnit(63, 1, 8, 0, 0, "US_mortar") ;		
			
			
			
			
		
			ShowUIScreenX( "BattleHead0", "Anim1", "IDS_REINF2", "BHead0Image:pilot_head") ;
			AddVizCamCenter(41, 17);
		  
		}   
	}
Is there any way to have the ShowUIScreenX message and the camera centering to show only for side 0, maybe using the if(side == 0) command? If so, where would I plug it in to that code, exactly? Thank you!
insidius
Sergeant - Panzer IIC
Sergeant - Panzer IIC
Posts: 195
Joined: Sun Aug 08, 2010 9:49 pm

Post by insidius »

Does anyone know?
adherbal
The Artistocrats
The Artistocrats
Posts: 3900
Joined: Fri Jun 24, 2005 6:42 pm
Location: Belgium

Post by adherbal »

I guess this is for MP. It would mean you need a command to test which side the local player controls (in SP this is always side 0). I don't think we have that.
insidius
Sergeant - Panzer IIC
Sergeant - Panzer IIC
Posts: 195
Joined: Sun Aug 08, 2010 9:49 pm

Post by insidius »

adherbal wrote:I guess this is for MP. It would mean you need a command to test which side the local player controls (in SP this is always side 0). I don't think we have that.
Ok, thanks. No German heads anywhere, I take it?
pipfromslitherine
Site Admin
Site Admin
Posts: 9878
Joined: Wed Mar 23, 2005 10:35 pm

Post by pipfromslitherine »

You can use GetShowSide() I think - although you need to INCREDIBLY careful with this - use it ONLY for UI and never in the vizqueue. Otherwise you can cause out of syncs between users.

Cheers

Pip
insidius
Sergeant - Panzer IIC
Sergeant - Panzer IIC
Posts: 195
Joined: Sun Aug 08, 2010 9:49 pm

Post by insidius »

Sounds dangerous, I think I'll skip it. It's not a huge deal anyway.

How about this, though: I'm having a problem with displaying 'objectives' in the upper left hand corner. I'd like it to say:

OBJECTIVE:(on its own line)
"Capture all VPs" (on its own line)

for the US side (side 0) and

OBJECTIVE:
"Defend all VPs"

for the German side (side 1). This is what I have so far, but I'm getting some graphical anomalies and I know it's because I'm not scripting it properly (obviously still learning). This is what I have so far:

Code: Select all

// this callback allows us to display any misc data we want on the screen
FUNCTION DrawScenarioUI()
{
	// only draw in our turn
	if( GetCurrentSide() == 0 )
	{

		// add our kill count to the string
		PrintString("US_OBJ") ;
		
		// now render the string to the screen, remembering that all coordinates
		// are based on a nominal 1024x768 screen size.
		RenderString(12, 90, 5, "fffee37c", "ff000000") ;
	}
	
	if( GetCurrentSide() == 1 )
	{

		// add our kill count to the string
		PrintString("GER_OBJ") ;
		
		// now render the string to the screen, remembering that all coordinates
		// are based on a nominal 1024x768 screen size.
		RenderString(12, 90, 5, "fffee37c", "ff000000") ;
	}
}
What happens is whenever I mouse over a unit and where it can move, it prints its movement information on the same line as my "Capture all VPs" line and displaces it. And when I surrender the scenario, the text stretches across the screen and looks obviously buggy. I know this is a tedious question and I'm sorry, but any advice?
pipfromslitherine
Site Admin
Site Admin
Posts: 9878
Joined: Wed Mar 23, 2005 10:35 pm

Post by pipfromslitherine »

You need a StartString command to empty the string. There is a single working string which you construct and then render.

Cheers

Pip
Post Reply

Return to “Battle Academy : Scenario Design”