StartTurn.bsf

Modders can post their questions on scripting and more.

Moderators: Slitherine Core, BA Moderators

Post Reply
Amaris
Captain - Heavy Cruiser
Captain - Heavy Cruiser
Posts: 929
Joined: Fri Jul 23, 2010 11:08 am
Location: France
Contact:

StartTurn.bsf

Post by Amaris »

If you want restrict this function to the current side don't use:

Code: Select all

	if (GetCurrentSide() == GetUnitSide(me))
	{
		.....
	}
but this:

Code: Select all

	if (GetShowSide() == GetUnitSide(me))
	{
		.....
	}
“Take care, my friend; watch your six, and do one more roll… just for me.”
pipfromslitherine
Site Admin
Site Admin
Posts: 9928
Joined: Wed Mar 23, 2005 10:35 pm

Re: StartTurn.bsf

Post by pipfromslitherine »

You need to be VERY careful using this :) Otherwise you can end up executing different code in MP replays. The current side is the side whose units are currently doing their thing, either under player control or during a replay.

Cheers

Pip
Amaris
Captain - Heavy Cruiser
Captain - Heavy Cruiser
Posts: 929
Joined: Fri Jul 23, 2010 11:08 am
Location: France
Contact:

Re: StartTurn.bsf

Post by Amaris »

pipfromslitherine wrote:You need to be VERY careful using this :) Otherwise you can end up executing different code in MP replays. The current side is the side whose units are currently doing their thing, either under player control or during a replay.

Cheers

Pip
Damn! :?

I think use this function to land the defensive airplanes placed in defense int the previous turn.
This results in changes of attribute value for the units of the active camp (lot of SetAttrib(), no rand() :wink: ). Do you think it might be a problem?
“Take care, my friend; watch your six, and do one more roll… just for me.”
pipfromslitherine
Site Admin
Site Admin
Posts: 9928
Joined: Wed Mar 23, 2005 10:35 pm

Re: StartTurn.bsf

Post by pipfromslitherine »

The key is that in MP you need to make sure the same thing happens in both the player turn and the MP replay.

Cheers

Pip
Amaris
Captain - Heavy Cruiser
Captain - Heavy Cruiser
Posts: 929
Joined: Fri Jul 23, 2010 11:08 am
Location: France
Contact:

Re: StartTurn.bsf

Post by Amaris »

I understand that. :mrgreen:

Well tests will tell! :wink:
“Take care, my friend; watch your six, and do one more roll… just for me.”
Post Reply

Return to “Battle Academy : Modders Corner ”