72hr Driveable Tanks! 0.7

Hammer prefab(s) and sourcemod plugin for tanks that players can drive around.

  1. The_Evil_Pickle

    The_Evil_Pickle L2: Junior Member

    Messages:
    56
    Positive Ratings:
    62
    Driveable Tanks! - Hammer prefab(s) and sourcemod plugin for tanks that players can drive around.

    This is my attempt at making the tanks from Frontline able to be driven by players. It has two parts: a basic entity setup in the map that determines how players get into tanks, and a sourcemod plugin that makes the tanks work properly.

    The final goal for this is to make some prefabs people can use in their maps, with the server mod only affecting maps that were built for it. Right now I've only just got some of the basic functions of the tanks working, but ultimately I'm planning to have the tanks operate differently depending on which class is in them, and possibly create a few new game-modes centered around controlling vehicles.

    The .bsp for the example map and the .smx for the plugin are both in the zip folder, along with the decompiled versions for anyone who wants to take a look at how everything works.

    Both the mod and the map are needed for this to work; the map will be glitchy if the soucemod plugin isn't running, and the sourcemod plugin only activates if the map tells it to (or if anyone gets in a bumper car. I'm planning on fixing that compatibility issue in a future version).
     
    • Like Like x 5
  2. The_Evil_Pickle

    The_Evil_Pickle L2: Junior Member

    Messages:
    56
    Positive Ratings:
    62
  3. LeSwordfish

    aa LeSwordfish semi-trained quasi-professional

    Messages:
    4,106
    Positive Ratings:
    6,006
    This is very impressive! I'm glad someone made something like this. Is there any way to make the tank move more like a tank? So a bit slow and lumbering.
     
  4. Crowbar

    aa Crowbar perfektoberfest

    Messages:
    1,429
    Positive Ratings:
    1,173
    Does it uses physics and stuff? impressive though
     
  5. The_Evil_Pickle

    The_Evil_Pickle L2: Junior Member

    Messages:
    56
    Positive Ratings:
    62
    Yup! ...hopefully. I'm planning to make them pretty slow, but I still need to expirement a bit with how to do that :p

    Right now it's just using the same controls and physics bumper-cars use. I might have to do some more in-depth physics stuff to get the hitboxes and desired speed working, though.
     
  6. Crowbar

    aa Crowbar perfektoberfest

    Messages:
    1,429
    Positive Ratings:
    1,173
    I suggest W and S buttons moving the tank forward and back, and A and S simply rotating it over its axis. Would look exactly like a tank moving. Though it might be hard to make.
     
    • Like Like x 1
    • Agree Agree x 1
  7. The_Evil_Pickle

    The_Evil_Pickle L2: Junior Member

    Messages:
    56
    Positive Ratings:
    62
    It actually does work like that, thanks to the bumper car mechanics. The main issue control-wise is that it currently has the movements speed of a bumper car as well, and those things go pretty fast.
     
  8. The_Evil_Pickle

    The_Evil_Pickle L2: Junior Member

    Messages:
    56
    Positive Ratings:
    62
    Fixed player deaths not deleting entities properly, made logic_relay that triggers when a tank is destroyed, fixed a bug involving map resets and player disconnects that caused entities to be deleted randomly.

    Read the rest of this update entry...
     
  9. LeSwordfish

    aa LeSwordfish semi-trained quasi-professional

    Messages:
    4,106
    Positive Ratings:
    6,006
    Something you might be interested in for this - particularly if you hope to drop the Smod aspect - is the Drivable Cars A Boojum Snark made here.
     
  10. The_Evil_Pickle

    The_Evil_Pickle L2: Junior Member

    Messages:
    56
    Positive Ratings:
    62
    Hey, that's really cool! Thanks for giving me the heads-up. It works on completely different principles, so I wouldn't be able to really convert my version to a non-Smod version any time soon, but there's some useful stuff here none the less. I didn't even know logic_measure_movement was a thing, it has a lot of potential. I'll probably do some non-Smod Frontline vehicle stuff with it once the jam is over, we'll see.

    Edity edit: After looking it over a bit more, it seems likely that I could recreate most of the mechanics from my mod in hammer using a few entities and tricks borrowed from ABS. There's still some stuff I don't think I can do, or can't do as reliably, but I'll probably make a simplified version of this project once the event ends that doesn't use any mods.
     
    Last edited: Jul 23, 2016
  11. The_Evil_Pickle

    The_Evil_Pickle L2: Junior Member

    Messages:
    56
    Positive Ratings:
    62
    New Version! Here's the deets:
    Tanks now have a limit to how fast they can move. Turning currently has no limit.

    Class tank changes:
    *Soldier's rocket tank now works as intended.
    *Pyro also now fires a projectile from his tank. It exlodes and lights people on fire.
    *Sniper's tank can shoot lasers (placeholder for bullets). This attack does more damage at long range, but the sniper-tank can also use alt-fire to drop Jarate on enemies that get too close.
    *Scout's tank moves faster than the others, and Heavy's tank moves slower than the others. Spy and Pyro move slightly faster than average.
    *Demoman and Scout both have a charge attack on alt-fire, which can bypass speed restrictions. Scout can cause the tank to jump by hitting the jump key.

    Known issues with this version:
    *Tank models sometimes spawn sideways.
    *Getting in a tank while the server is waiting for players screws everything up.
    *While in a tank, moving backwards doesn't work quite right. Even using the back key to slow down has a very delayed response.

    Read the rest of this update entry...
     
  12. The_Evil_Pickle

    The_Evil_Pickle L2: Junior Member

    Messages:
    56
    Positive Ratings:
    62
    Another new version:

    *Fixed hundreds of random numbers being spammed in server console.
    *Slightly improved issues with reversing in a tank.
    *Balanced Sniper's tank's damage a bit.
    *Gave Heavy's tank a minigun-style weapon (still uses placeholder lasers).
    *Scout's tank now features a flak cannon (it just shoots a burst of like 30 syringes). Very low accuracy at even medium ranges, but combined with the scout-tank's speed and dash ability, it can be very deadly.
    *Demoman's tank now does 2.5x more damage than normal when you dash into someone with it. This means you can kill most classes instantly by charging into them with the tank.
    *Demoman's tank is now slightly slower than average when not dashing.
    ----------------------------
    So now everyone has a fully-equipped tank except for Engy, Medic, and Spy. I've got plans for Engy and Medic, but I've still not quite decided what Spy's tank will do. If anyone has suggestions, let me know!

    Read the rest of this update entry...
     
  13. The_Evil_Pickle

    The_Evil_Pickle L2: Junior Member

    Messages:
    56
    Positive Ratings:
    62
    Two new class tanks complete!

    Engineer Tank: It has a sentry gun on it. Just drive the sentry gun into enemies and watch the carnage.

    Medic Tank: Has a tiny, crappy syringe cannon. But, the tank also heals nearby allies + gives them ammo, and it repairs itself over time!

    Bug fix: tanks controlled by red players are now red, not green.

    So now spy's the only one I don't have anything for. After I've got something for him, I'll finish up balancing/polishing all the tanks into something more presentable. There're probably some bugs that need ironing out as well, though it's just visual stuff. That might not all happen before the jam is up, but I'm hoping to at least get all 9 classes their own tank before the clock hits 0.

    Read the rest of this update entry...
     
  14. The_Evil_Pickle

    The_Evil_Pickle L2: Junior Member

    Messages:
    56
    Positive Ratings:
    62
    Spy now has a brand-new tank! It doesn't fire anything, but it has the plague ability from Mannpower mode when the player is above 200 HP.
    The other feature of the spy tank is that it can turn invisible! It's bound to the player's normal cloak/decloak button, and uses their normal cloak meter. Note that this is not complete invisibility, as the particle effects from the plague ability will still show up. Still, it's useful when trying to get near enough to enemies that you can infect them!

    Additionally, Demoman's tank now has 45% damage resistance against ranged attacks, and Heavy's tank now has 45% damage resistance when above 2000 HP.



    Spy tank bugs:
    There's currently a bug where insta-death will cause the powerup to drop, so fixing that's first on my to-do list.
    Cloaking with the spy tank screws up the color of the model, making it really dark.

    Read the rest of this update entry...
     
  15. The_Evil_Pickle

    The_Evil_Pickle L2: Junior Member

    Messages:
    56
    Positive Ratings:
    62
    Mostly just updating to fix the whole metadata issue, but I did manage to fix a few spy-based bugs.

    *The spy-tank no longer drops a Mannpower power-up if killed too fast. Unfortunately, this fix breaks the mod's compatibility with Mannpower mode in general, but who the heck was planning to make a Mannpower map with tanks in the first place? It would be silly. Mannpower maps will still run fine on a server using the mod, as long as those maps don't have bumper cars in them.

    *Fixed the spy-tank's colors getting messed up when it turns invisible.

    Read the rest of this update entry...
     
  16. Powerlord

    Powerlord L3: Member

    Messages:
    124
    Positive Ratings:
    59
    Dumb question, but is there any source code for the SourceMod plugin?
     
  17. The_Evil_Pickle

    The_Evil_Pickle L2: Junior Member

    Messages:
    56
    Positive Ratings:
    62
    Oops, forgot about that :p Here ya' go.
     

    Attached Files:

    • Like Like x 1
  18. 1blitzer1

    1blitzer1 L1: Registered

    Messages:
    15
    Positive Ratings:
    3
    So cool
     
    • Agree Agree x 1