hmmm i just thinked about.
What do you think about the idea, that when game starts - everyone get 1 HHG. But when some particular worm is active - he got +1 HHG every turn.
So you can choose: use HHG now or hold it for next turn (of this particular worm) in case of fail or tactical meanings.
Or.. everyone got 0 HHG when game starts. And worm get +one HHG only when his turn begins. This should expand tactical thinking under this scheme.
Anyway, script is very simple and if you like, you could try it. I`ll write the code:
Code:
override void CWorm::Message(CObject* sender,EMType Type,int MSize,CMessageData* MData)
{
super;
// Set HHG amout = 0 for all worms AT FIRST FRAME of the game.
if (Type == M_FRAME && gframe == 1) // require stepsutils to be loaded;
{
local Weap = GetWeaponByName("Holy Hand Grenade");
GS->Info.AddWeaponEx(WormTeam, Weap->GetWeaponIndex(), Weap->GetPageIndex(), 0);
}
// Add +1 HHG for current worm only when his turn starts.
if (Type == M_TURNBEGIN && CurrentWorm == this) // require p_utils to be loaded;
{
local Weap = GetWeaponByName("Holy Hand Grenade");
GS->Info.AddWeaponEx(WormTeam, Weap->GetWeaponIndex(), Weap->GetPageIndex(), +1);
}
}
This code doesnt care of what settings you will have in weapon editor. It will just set amount to 0 and then add +1.
But if you want to control
from weap editor what amount of weap you want at start of the game - just comment out or delete part of the code that set HHG amount to 0. In that case it will load values from weap editor. But you will need to set those ammo value there
And again, i did not test it. If you got any problems with this - let me know.