Auto-generating spectate cameras from in-game

Discussion in 'Mapping Questions & Discussion' started by Pocket, Dec 21, 2013.

  1. Pocket

    aa Pocket func_croc

    Positive Ratings:
    Something that occurred to me just now. We have a server mod that can gather the player's current position and crosshair angle to produce annotations and save them on another server. There's also a command that commits the current position and angle of every physics prop in the map to the map's source file (or at least, it used to; it might have gotten broken since the file locations changed).

    Would it be possible to make a client-side mod that lets you create spectate cameras in your map's source file by just loading up the compiled map, flying to some spot, aiming, and entering a command? Because that would be pretty cool. (Ideally you could just do it from Hammer, but that's not moddable.)
  2. Geit

    aa Geit 💜 I probably broke it 💜

    Positive Ratings:

    It's certainly possible - as you say Feedback already records position and eye direction (which is basically the defining points of a camera) - all that would be required is writing the results to a VMF using Sourcemod's KeyValue (VDF) functionality.

    It'd be slightly involved - and sourcemod is more suited to servers rather than clients, but it is possible. Also, don't forget about the devshots console command.
  3. A Boojum Snark

    aa A Boojum Snark Toraipoddodezain Mazahabado

    Positive Ratings:
    In lieu of a plugin, you could just use the getpos command ingame to get the numbers you need to place it the same.