i just made a script to make a mine or barrel ecah turn in a random postion.
Code:
//makes a mine every 2 turns
var
turns : integer;
procedure InitHooks;
begin
RegisterHook('OnTurnBegin', ON_TURN_BEGIN);
RegisterHook('OnInIt', ON_INIT)
end;
procedure OnInIt;
begin
turns := 0
end;
procedure OnTurnBegin;
var
newmine : TWPobj;
begin
if turns = 2 then begin
newmine := MakeMine(GetSyncRandom(1920, 10),GetSyncRandom(696, 10));
turns := 0;
end;
turns := turns + 1;
end;
making barrels is pretty similer but with barrels instead of mines,and turns starting at 1 rather then 0 so that they barrels and mines drop toghter.
one thing i wanted to do as check the postion of the mine before it was droped to ensure i was not on top of another worm, however there does not seem to be a way of selecting worms in order(no function to select worm by number/team number that i can find) so i cant do this check. if there is a way can some please let me know thanks.