I decided to post all of my problems here on this topic.
1. I was wondering how you could have more then just 3 seats for a tank vehicle. When I make 4 mounts on the script, the turret goes away.
2. I was wondering how to mount multiple turrets to a vehicle. I am working on upgrading my Skyhawk so that the side turrets can be controlled by players.
Fixed that, but now none of the turret look or shoot up or down. I only changed this.
function TankVehicle::onAdd(%this,%obj)
{
// Setup the car with some defaults tires & springs
for(%i = 0; %i < %this.numWheels; %i++)
{
%obj.setWheelTire(%i, %this.defaultTire);
%obj.setWheelSpring(%i, %this.defaultSpring);
}
// 4 wheel steering
%obj.setWheelSteering(0,1);
%obj.setWheelSteering(1,1);
%obj.setWheelSteering(2,-0.8);
%obj.setWheelSteering(3,-0.8);
// 4 wheel drive
%obj.setWheelPowered(0,true);
%obj.setWheelPowered(1,true);
%obj.setWheelPowered(2,true);
%obj.setWheelPowered(3,true);
// turret
%t = new AIPlayer()
{
dataBlock = TankTurretPlayer;
};
MissionCleanup.add(%t);
%obj.mountObject(%t, 2);
%obj.turret = %t;
%obj.creationTime = getSimTime();
%t.schedule(10,"rigTurret");
%g = new AIPlayer()
{
dataBlock = TankTurretPlayer;
};
MissionCleanup.add(%t);
%obj.mountObject(%g, 1);
%obj.turret = %g;
%obj.creationTime = getSimTime();
%t.schedule(10,"rigTurret");
}
3. I was wondering how I could use differant shootonclicks for differant slots. Like if one guy shoots the bullets while flying and another guy drops the bombs.