Replay MP turn

Modders can post their questions on scripting and more.

Moderators: Slitherine Core, BA Moderators

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

Replay MP turn

Post by enric »

To my surprise I see that during replay, KILL_CALLBACK is called as if a normal turn were taken, and any variable affected by this functions is affected again.

For exemple in FUNCTION KILL_CALLBACK(id, side) during play turn…
counter = 1;
i = GetUniversalVar("GermanMorale") + counter;

During the turn, one unit is killed, the i = 1 and so the universal variable

BUT, when your opponent opens the turn and watch at the replay, the function is called again so, as GermanMorale was = 1 at the beginning of the replay, during replay a new kill is count so finally its value is 2. In the new version 2.0.6 (not tested) but probably its value will be incremented each time the opponent watch the movie of the turn.
pipfromslitherine
Site Admin
Site Admin
Posts: 9937
Joined: Wed Mar 23, 2005 10:35 pm

Re: Replay MP turn

Post by pipfromslitherine »

The replay does exactly that - replays the turn entirely. I think your situation is probably true as the universal var state is saved seperately from the battle state. You might need to work around it using a ShowSide test perhaps.

Cheers

Pip
Post Reply

Return to “Battle Academy : Modders Corner ”