Page 4 of 4
Posted: Tue Aug 24, 2010 4:08 pm
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.
Posted: Tue Aug 24, 2010 4:19 pm
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
Posted: Tue Aug 24, 2010 4:45 pm
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.
Posted: Thu Aug 26, 2010 4:26 pm
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!
Posted: Fri Aug 27, 2010 3:04 pm
by insidius
Does anyone know?
Posted: Fri Aug 27, 2010 3:26 pm
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.
Posted: Fri Aug 27, 2010 3:54 pm
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?
Posted: Fri Aug 27, 2010 4:05 pm
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
Posted: Fri Aug 27, 2010 4:17 pm
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?
Posted: Fri Aug 27, 2010 4:41 pm
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