Display of Arriving Reinforcements in MP Games

Modders can post their questions on scripting and more.

Moderators: Slitherine Core, BA Moderators

Post Reply
Old_Warrior
Major - Jagdpanther
Major - Jagdpanther
Posts: 1019
Joined: Fri Apr 30, 2010 3:13 am

Display of Arriving Reinforcements in MP Games

Post by Old_Warrior »

I am having a problem whereby the arrival of German reinforcements in a MP game (Germans moving first) is showing up to the US player.

Question: Should this be happening? Do the UI messages work for BOTH players?

Here is my script for the German reinforcements:

if( GetTurn()==4)
{
PlaceUnit(35, 24, 3, 0, 0, "German_Infantry");
PlaceUnit(34, 24, 3, 0, 0, "German_Infantry");
ShowUIScreenX( "BattleHead0", "Anim1", "IDS_LFB-1_REINF", "BHead0Image:US_airborne_head") ;
AddVizCamCenter(32, 24);
}

On the turn they arrive for some reason the US player is getting the announcement. The Sides file and any other settings have properly been set so that the Germans are player 0.

So does the UI messaging only work for the US player?

I have sent off a message to my opponent to see if he was getting the German reinf. messages as his troops arrived but he has yet to answer (at work more than likely).

I would like to use the messages as they remind the players that reinforcements have arrived. However, if it is not possible to turn off the display of this to the other player then I guess I will have to disable the ShowUIScreenX part of the script.
enric
Brigadier-General - 8.8 cm Pak 43/41
Brigadier-General - 8.8 cm Pak 43/41
Posts: 1855
Joined: Sun May 15, 2011 8:47 am

Re: Display of Arriving Reinforcements in MP Games

Post by enric »

I use
if ( GetShowSide() == GetCurrentSide() )
{
ShowUIScreenX( "BattleHead0", "Anim1", "IDS_LFB-1_REINF", "BHead0Image:US_airborne_head") ;
AddVizCamCenter(32, 24);
}
Old_Warrior
Major - Jagdpanther
Major - Jagdpanther
Posts: 1019
Joined: Fri Apr 30, 2010 3:13 am

Re: Display of Arriving Reinforcements in MP Games

Post by Old_Warrior »

Good idea. Have never used that before and will try it out.
Post Reply

Return to “Battle Academy : Modders Corner ”