Note: globals need to be setup beforehand.
- ARTILLERY -
This is a snipet from the D-DAY.BSF ...
Code: Select all
FUNCTION StartTurn(side)
{
if(side == 1)
{
if (GetGlobal("gTrigger") == 1)
{
if (GetGlobal("gTurn") == 2) // 2 turns after start of the first turn with a unit over the river
{
targetx = Rand (24,28) ;
targety = Rand (38,42) ;
SetBonusBaseValue("GermanArtHitWait", 1, 0) ;
CallBonusFunction("BONUS_GERMAN_BATTERY", 1, targetx, targety, -1) ; // Artillery strike after check-point
}
if (GetGlobal("gTurn") == 4) // 4 turns after start of the first turn with a unit over the river
{
targetx = Rand (25,27) ;
targety = Rand (46,50) ;
SetBonusBaseValue("GermanArtHitWait", 1, 0) ;
CallBonusFunction("BONUS_GERMAN_BATTERY", 1, targetx, targety, -1) ; // Artillery strike on main road
}
}
}
}Example ... Hurricane Airstrike :
Code: Select all
SetBonusBaseValue("HurricaneHitWait", 1, 0) ;
CallBonusFunction("BONUS_HURRICANE_BATTERY", 1, targetx, targety, -1) ;Merr

