help with script
hi guys i need help with cript to my map.
I wanted to after the destruction of the castle player 2 (56,26) in place of his people They began to emerge soldiers militia. I've done on the model of the campaign on foreign lands with a mission 11 . but instead the earlier scripts stopped working here they are.
and i wanted I wanted to after the destruction of the enemy tower (43,38) appeared enemy units Player 2 that will fight Can You help me ?
begin
if States.GameTime = 10 then
Actions.ShowMsg(0, 'musisz sie zbroic bo wróg juz szykuje ogromne sily');
end;
procedure OnMissionStart;
var iMain, iAdd: Integer;
begin
iMain := Actions.GiveGroup(0, 21, 18, 50, 7, 4, 4);
iAdd := Actions.GiveGroup(0, 22, 18, 52, 7, 3, 3);
Actions.GroupOrderLink(iAdd, iMain);
iAdd := Actions.GiveGroup(0, 21, 18, 52, 7, 1, 1);
Actions.GroupOrderLink(iAdd, iMain);
iAdd := Actions.GiveGroup(0, 22, 19, 50, 7, 1, 1);
Actions.GroupOrderLink(iAdd, iMain);
// Actions.GroupHungerSet(iMain);
iMain := Actions.GiveGroup(0, 23, 24, 51, 2, 2, 2);
iAdd := Actions.GiveGroup(0, 15, 24, 49, 2, 1, 1);
Actions.GroupOrderLink(iAdd, iMain);
iAdd := Actions.GiveGroup(0, 23, 18, 52, 2, 3, 3);
Actions.GroupOrderLink(iAdd, iMain);
iAdd := Actions.GiveGroup(0, 15, 19, 50, 2, 2, 2);
Actions.GroupOrderLink(iAdd, iMain);
// Actions.GroupHungerSet(iMain);
iMain := Actions.GiveGroup(0, 18, 19, 47, 7, 4, 7);
iAdd := Actions.GiveGroup(0, 17, 19, 45, 7, 6, 6);
Actions.GroupOrderLink(iAdd, iMain);
Actions.GroupSetFormation(iMain, 3);
end;
procedure OnHouseBuilt(aHouseID: Integer);
begin
Actions.GiveWeapons(0,21,4)
Actions.GiveWeapons(0,19,4)
Actions.GiveWeapons(0,17,4)
end;
procedure OnHouseDestroyed(aHouseID: Integer; aDestroyerIndex: Integer);
begin
if (aHouseID = States.HouseAt(43, 38)) then
begin
iMain := Actions.GiveGroup(1, 23, 50, 40, 0, 7, 2);
iAdd := Actions.GiveGroup(1, 14, 52, 41, 0, 5, 1);
Actions.GroupOrderLink(iAdd, iMain);
iAdd := Actions.GiveGroup(1, 26, 44, 35, 0, 5, 3);
Actions.GroupOrderLink(iAdd, iMain);
iAdd := Actions.GiveGroup(1, 16, 46, 36, 0, 3, 2);
Actions.GroupOrderLink(iAdd, iMain);
iMain := Actions.GiveGroup(1, 14, 47, 46, 0, 9, 3);
iAdd := Actions.GiveGroup(1, 15, 49, 46, 0, 2, 1);
Actions.GroupOrderLink(iAdd, iMain);
// Actions.GroupHungerSet(iMain);
end;
I wanted to after the destruction of the castle player 2 (56,26) in place of his people They began to emerge soldiers militia. I've done on the model of the campaign on foreign lands with a mission 11 . but instead the earlier scripts stopped working here they are.
and i wanted I wanted to after the destruction of the enemy tower (43,38) appeared enemy units Player 2 that will fight Can You help me ?
begin
if States.GameTime = 10 then
Actions.ShowMsg(0, 'musisz sie zbroic bo wróg juz szykuje ogromne sily');
end;
procedure OnMissionStart;
var iMain, iAdd: Integer;
begin
iMain := Actions.GiveGroup(0, 21, 18, 50, 7, 4, 4);
iAdd := Actions.GiveGroup(0, 22, 18, 52, 7, 3, 3);
Actions.GroupOrderLink(iAdd, iMain);
iAdd := Actions.GiveGroup(0, 21, 18, 52, 7, 1, 1);
Actions.GroupOrderLink(iAdd, iMain);
iAdd := Actions.GiveGroup(0, 22, 19, 50, 7, 1, 1);
Actions.GroupOrderLink(iAdd, iMain);
// Actions.GroupHungerSet(iMain);
iMain := Actions.GiveGroup(0, 23, 24, 51, 2, 2, 2);
iAdd := Actions.GiveGroup(0, 15, 24, 49, 2, 1, 1);
Actions.GroupOrderLink(iAdd, iMain);
iAdd := Actions.GiveGroup(0, 23, 18, 52, 2, 3, 3);
Actions.GroupOrderLink(iAdd, iMain);
iAdd := Actions.GiveGroup(0, 15, 19, 50, 2, 2, 2);
Actions.GroupOrderLink(iAdd, iMain);
// Actions.GroupHungerSet(iMain);
iMain := Actions.GiveGroup(0, 18, 19, 47, 7, 4, 7);
iAdd := Actions.GiveGroup(0, 17, 19, 45, 7, 6, 6);
Actions.GroupOrderLink(iAdd, iMain);
Actions.GroupSetFormation(iMain, 3);
end;
procedure OnHouseBuilt(aHouseID: Integer);
begin
Actions.GiveWeapons(0,21,4)
Actions.GiveWeapons(0,19,4)
Actions.GiveWeapons(0,17,4)
end;
procedure OnHouseDestroyed(aHouseID: Integer; aDestroyerIndex: Integer);
begin
if (aHouseID = States.HouseAt(43, 38)) then
begin
iMain := Actions.GiveGroup(1, 23, 50, 40, 0, 7, 2);
iAdd := Actions.GiveGroup(1, 14, 52, 41, 0, 5, 1);
Actions.GroupOrderLink(iAdd, iMain);
iAdd := Actions.GiveGroup(1, 26, 44, 35, 0, 5, 3);
Actions.GroupOrderLink(iAdd, iMain);
iAdd := Actions.GiveGroup(1, 16, 46, 36, 0, 3, 2);
Actions.GroupOrderLink(iAdd, iMain);
iMain := Actions.GiveGroup(1, 14, 47, 46, 0, 9, 3);
iAdd := Actions.GiveGroup(1, 15, 49, 46, 0, 2, 1);
Actions.GroupOrderLink(iAdd, iMain);
// Actions.GroupHungerSet(iMain);
end;