I'm not using the standard Functions.BSF code .... Which function does this? I've lookedpipfromslitherine wrote:Assuming you are using the standard Functions.BSF code, then a unit sitting on the tile should switch the side to that unit's side. It will then stay that way until the other side should capture it.
CHeers
Pip
To capture a unit (switch sides) .... I'm using a modified BullDoze :
Code: Select all
FUNCTION ALL_CAPTURE(me, unit, tilex, tiley)
{
int ap ;
int effectX ;
int effectY ;
//int p ;
effectX = tilex * 100 ;
effectY = tiley * 100 ;
effectX += 50 ;
effectY += 50 ;
// AddVizSpotAnim(effectX, effectY, "wreck_clearing", 0, 0) ;
AddVizUnitText(unit, "IDS_UNIT_CAPTURE", "ffffff", 1) ;
DestroyUnit(unit, 255) ;
RemoveUnit(unit, 2) ;
AddUnit(tilex,tiley,0,"Surrender_brit") ;
// p = GetUnitOnTile(tilex,tiley) ;
// SetAttrib(unit,"AP",8) ;
// stop me firing and bulldozing
//SetAttrib (me, "Shots", 0) ;
// reduce AP
ap = GetAttrib (me, "AP") ;
ap -= CHECK_ALL_CAPTURE (me, unit, tilex, tiley) ;
SetAttrib (me, "AP", ap) ;
}

