Author Topic: [Vehicle] Technical / Heavy Machine Gun - Sound Update  (Read 7846 times)


Wow this is awesome nice loving work

Nice turret! As for the issue with free look, something must be wrong with the t_look.dsq. Essentially, while holding z the head of the turret should still move, and the player mounted to it; this will also stop the stand from moving while z is held

Can this be used on any vehicle?

Unfortunately no, and it's for the same reason you can't put a tank turret on a tank turret and then put that tank turret in a jeep. The HMG is technically a gun player mounted to a "gun stand" player. You can get on the MG, F8 the MG over a jeep, and when it falls in you'll be in the MG on the jeep, but you won't be able to switch to other seats, and you won't be able to switch to the MG when in the jeep

AFAIK you could put
DshKTurretPlayer.uiName = "DSHK";
BrowningM2TurretPlayer.uiName = "Browning M2";

At the end of server.cs and get access to the guns without the stand, but in reality it wouldn't be very useful unless you had a vehicle specifically designed to carry them

Nice turret! As for the issue with free look, something must be wrong with the t_look.dsq. Essentially, while holding z the head of the turret should still move, and the player mounted to it; this will also stop the stand from moving while z is held

I know what's causing it and it's in the same vein of problems caused by what I explained above. If you take a tank turret and put it in the driver's seat of the jeep you wont be able to free-look. However if you put it in a passenger seat you will be able to. This would also fix the stand rotating. This also raises a bunch of other headache issues however but I'm coming up with some workarounds for the future


What if you made it so that you cannot mount the turret to any player vehicle which has a movement speed under a small amount, if they are a player, or if they are spawned from a hole? This way it mounts to only physics vehicles and boat player vehicles that are spawned from vehicle spawns.
« Last Edit: December 07, 2017, 10:39:32 AM by SWAT One »

The way it works is that when you spawn an HMG, it spawns a Player vehicle which is just the stand, and then it spawns an M2 or DSHK player vehicle, and mounts it to the stand. In that sense, you could mount the stand to a physics vehicle and mount to it easily, but when the stand's mount is occupied by the gun, it wont allow you to switch to that position because it thinks it's already occupied by a "player", in this instance the mounted gun player vehicle. I can work around it by packaging serverCmdNextSeat to detect when there's an available turret to mount to and accommodate for that which is what I'm doing now


PSA: if you have the old heavy machine gun addon, either rename that or delete it
both machine guns are named "Heavy Machine Gun" so change the name to avoid confusion i guess




LMG MOUNTED AND LOADED

this is the weirdest coincidence





release it so I can steal your code