Post by bb on Dec 4, 2017 4:41:14 GMT 1
Hi Guys,
I made a map where the AI bombers should strike one single time against a player target and after that the bombers should be disabled by script (the strike is made with 8 Ju-88, so you can imagine why was so important to disable the bombers after that.
Well, this script should be easy. I started disabling the enemy bombers in the begining of the mission so they wont be used before the right time. And here is the script I made to the time of attack:
function bomba()
EnableAviation(1,3);
SwitchWeather(0);
RunScript("fire", 5000);
RunScript("delenda", 2000);
Suicide()
end;
function delenda()
Cmd(19, 999, 1, GetScriptAreaParams("101c"));
RunScript("mbom", 1000);
Suicide();
end;
function mbom()
DisableAviation(1,-1);
Suicide();
end;
function fire()
flu=GetAviationState(1);
if (flu==3) then
RunScript("BomberEnde",3000);
Suicide();
end;
end;
function BomberEnde()
DisableAviation(1,3);
Suicide();
end;
Note I tried disable the enemy bombers for 2x just to have sure I wouldnt have any problem...
But,
No way, the enemy bombers kept coming several times... I tried eveything, even to disable the aviation using the cheat panel but was impossible. After spent almost 4 hours checking this f**king script I finally decided to do the easier thing: I just called for a bad wheater and finally everything gone right.
Well, to me this is certailly a bug, I believe you simple cant disable the AI bombers, enable it and disable it again as I tried to do. But meaby I did something wrong? Anyone had this bug before?
I made a map where the AI bombers should strike one single time against a player target and after that the bombers should be disabled by script (the strike is made with 8 Ju-88, so you can imagine why was so important to disable the bombers after that.
Well, this script should be easy. I started disabling the enemy bombers in the begining of the mission so they wont be used before the right time. And here is the script I made to the time of attack:
function bomba()
EnableAviation(1,3);
SwitchWeather(0);
RunScript("fire", 5000);
RunScript("delenda", 2000);
Suicide()
end;
function delenda()
Cmd(19, 999, 1, GetScriptAreaParams("101c"));
RunScript("mbom", 1000);
Suicide();
end;
function mbom()
DisableAviation(1,-1);
Suicide();
end;
function fire()
flu=GetAviationState(1);
if (flu==3) then
RunScript("BomberEnde",3000);
Suicide();
end;
end;
function BomberEnde()
DisableAviation(1,3);
Suicide();
end;
Note I tried disable the enemy bombers for 2x just to have sure I wouldnt have any problem...
But,
No way, the enemy bombers kept coming several times... I tried eveything, even to disable the aviation using the cheat panel but was impossible. After spent almost 4 hours checking this f**king script I finally decided to do the easier thing: I just called for a bad wheater and finally everything gone right.
Well, to me this is certailly a bug, I believe you simple cant disable the AI bombers, enable it and disable it again as I tried to do. But meaby I did something wrong? Anyone had this bug before?