Can anyone tell me why the (following) output event I made has the appropriate arguments and can trigger it's attached function, but when it does the plane doesn't come. (I know it triggers because it will say "Supply Drop Complete".)
function fxDTSBrick::AzjAdjSuppliesDrop(%dblock,%num,%client)
{
%pos = %client.getposition();
%pos = vectoradd(%pos, getRandom(0,0) SPC "-500 50");
%se = new projectile()
{
datablock = spawnprojectile;
initialposition = %pos;
};
missioncleanup.add(%se);
%v = new FlyingVehicle()
{
datablock = AzjairstrikeF14Vehicle;
position = %pos;
};
missionCleanup.add(%v);
%v.setNodeColor(body, "0.2 0.15 0.24 1");
%pilot = new AIPlayer()
{
datablock = PlayerStandardArmor;
};
missionCleanup.add(%pilot);
%pilot.setnodeColor("ALL", "0 0 0 0");
%v.mountobject(%pilot, 0);
%pilot.setMoveY(1);
schedule(18000, 0, removeAirstrikeplane, %v, %pilot);
for(%i=0;%i<%num;%i++)
{
schedule(5600+(%i*40), 0, nopillairstrikeclient, %v,%dblock);
}
schedule(10050,0,messageall,"","Supply drop complete.");
}
function NoPillAirstrikeClient(%obj,%dblock)
{
%cash = new Item()
{
datablock = %dblock;
canPickup = true;
};
%cash.schedule(50,"setTransform", %obj.getTransform());
MissionCleanup.schedule(100, "add", %cash);
}
registerOutputEvent("fxDTSBrick","AzjAdjSuppliesDrop", "string 250 250" TAB "int 1 15 6",1);