Recreating rotating posters from HL:S/BM

Discussion in 'Mapping Questions & Discussion' started by 404UNF, Aug 23, 2015.

  1. 404UNF

    404UNF No longer a "TF2 Beta/Cut Content Historian".

    Messages:
    228
    Positive Ratings:
    57
    Wow, I haven't visited here in ages....but that's mostly because I haven't done any mapping whatsoever until now, when I decided to start working on a new map for my trade server.

    So I'm currently messing around in Hammer (for TF2) with func_rotating and logic_timer. I'm trying to recreate those neat rotating posters from Half Life: Source and the somewhat-recently-released Black Mesa game which appear within the very first part of the game in the lab.

    I have a faint idea of how to make this work but when tested in game, the func_rotating brush I set up doesn't rotate.

    Here's what I've got set up so far:

    The rectangular brush should rotate 90 degrees every 7 seconds...I think.
    [​IMG]

    The logic_timer
    [​IMG]
    [​IMG]

    The func_rotating
    [​IMG]

    What am I doing wrong? Is there a tutorial out there on recreating those rotating posters? Specifically, I'd like to recreate the Black Mesa ones as those have a smoother rolling effect to them. I found and decompiled the map using BSPSource, but when loaded up into Hammer I can't do anything because Hammer freezes for about 2 minutes any time I click anything because the map is so large.
     
  2. Ynders

    aa Ynders absolutely gormful

    Messages:
    403
    Positive Ratings:
    519
    If I remember correctly, func_rotating doesn't work in tf2. You could probably create a similar effect with a func_door_rotating, however.
     
    • Thanks Thanks x 1
  3. 404UNF

    404UNF No longer a "TF2 Beta/Cut Content Historian".

    Messages:
    228
    Positive Ratings:
    57
    Aww. Well, guess I'll give func_door_rotating a try.

    EDIT: Actually, I could turn the func_rotating's into some kind of targettable entity, then just code up a SourceMod plugin that can hook into those entities by their entity name and set name, and cause them to rotate.

    That's actually a good thing because one of the things I'm doing with this map I'm making is looking to add a ton of neat functionality with the use of a SourceMod plugin that I'm coding up that can control entities and such.
     
    Last edited: Aug 23, 2015
  4. Pocket

    aa Pocket func_croc

    Messages:
    4,489
    Positive Ratings:
    2,216
    Does "poster" mean something completely different in non-American English or am I forgetting something significant about Half-Life?
     
  5. Crash

    aa Crash func_nerd

    Messages:
    3,136
    Positive Ratings:
    4,716
    • Thanks Thanks x 1
  6. 404UNF

    404UNF No longer a "TF2 Beta/Cut Content Historian".

    Messages:
    228
    Positive Ratings:
    57
    I'm Canadian. And what I'm referring to (for Half Life: Source) are these posters that are split up onto four rotating rectangular brushes. There's two, and each rectangle has part of 4 posters on each of its 4 sides.
     
  7. spudboy

    spudboy L1: Registered

    Messages:
    37
    Positive Ratings:
    6
    Fun fact: the spinning speed symbols on pass_warehouse all use func_door_rotating. That's what I would try if I were you.
     
  8. Pocket

    aa Pocket func_croc

    Messages:
    4,489
    Positive Ratings:
    2,216
    Ah. Yeah, this is a rare case where using func_door_rotating instead should be no problem, because you'd want it to fire periodically on a loop anyway rather than just rotate continuously.

    Though this is the sort of thing that would probably just be a dynamic prop nowadays; betcha almost anything the ones in Black Mesa are.
     
  9. worMatty

    aa worMatty Repacking Evangelist

    Messages:
    1,072
    Positive Ratings:
    832
    If you make this part of a SourceMod plugin you'd have to distribute it with your map. Also I'm not sure you can really do what you need to, because the movement is built in to the game engine. It's 'Q Physics', or the basic physics engine (not VPhysics) that is responsible for the movement of brushes and player collision with them. I don't think you can manipulate it to such a degree using a server-side mod.

    Crash's link is the best built-in entity to use because you can send an input to the rotating brushes asking them to rotate to an exact position. If your poster segments are square, those positions would be 0.25, 0.5, 0.75 and 1/0. But steve is right, that kind of thing is typically seen in dynamic props because it's far more efficient, so if you can do that in a 3D program like Blender, that'd be the best solution.
     
  10. Pocket

    aa Pocket func_croc

    Messages:
    4,489
    Positive Ratings:
    2,216
    The other cool thing about doing it in an external modeling program is that you can use trilons and have it rotate between three posters instead of just two. (Four, to quote Monty Python, is right out, due to the pieces getting jammed up against each other when they try to turn.) Making perfect equilateral triangles in Hammer is impossible, but in a 3D modeling tool, it's one of the more stupidly simple things you can do.
     
  11. Tumbolisu

    aa Tumbolisu  I ⌄ I 

    Messages:
    935
    Positive Ratings:
    904
    I think triangular pieces would "jam up" exactly the same way.
     
  12. Pocket

    aa Pocket func_croc

    Messages:
    4,489
    Positive Ratings:
    2,216
    Nope. When a square turns so that one of its corners is pointing up, there's another one pointing down. Triangles don't, so there's nothing for it to snag on. (Wow, it took me forever to put into words what would have been clear with an animated diagram.)
     
  13. 404UNF

    404UNF No longer a "TF2 Beta/Cut Content Historian".

    Messages:
    228
    Positive Ratings:
    57
    Yeah but the way the posters do it in HL:Source and Black Mesa involves a staggering of the rotation wherein not all the pieces rotate at the same time. They rotate individually about half a second after the previous piece so as to not "jam".

    EDIT: Jesus christ, picturing the way they work in my head made me realize exactly what you said. They'd still jam.

    EDIT 2: No wait, they had small enough gaps between the slats to prevent jamming. That's how they solved the whole Monty python issue. Just add small enough gaps.

    As for whether or not a plugin can control things, there may be issues with trying to control a world brush mainly because there's no name to specify in the m_iName entprop, but if I convert a rectangular brush into a model using one of the many tutorials I've seen out there, I can 100% without a doubt hook into it as a prop_dynamic, specifying m_iName of course, and rotate it. There's already a plugin out there (quite an old one) that gets the job done fairly easily).

    Long bit about distributing the map below
    Here's where this gets fun for me. I'm not distributing my map on any sites. Right now my server uses the map "trade_masscc_c5_1" which is the "official" map of this Steam group. Let's call them "Group 1". I've gotten "permission" to use their map as I am the host of their server. What does this have to do with anything? Well the creator of the map is the owner of Group 1 and he doesn't take kindly to other groups using his map without his permission.

    Several groups do this including a notable one who we'll call Group 2 that has ripped off the very setup of Group 1 from the map to the plugins being used. Group 1's owner contacted Group 2's owner and politely asked Group 2 to stop using his map unless they tossed him a couple keys as a "rent payment" or something. (I did speak to the owner of Group 1 and told him it's impossible to stop other groups from using his map and that asking for payment was kinda silly)

    My server is also the same though I do a lot of custom stuff that Group 1 doesn't do. So what did the owner of Group 1 do to prevent newer versions of his map from being utilized on other servers? He set up a "help" desk that, using a custom-made SourceMod plugin, brings up an MOTD page featuring info on the server. On any other server, the help desk becomes useless. I'm pretty sure he's also added other plugin-required features that I don't know of.

    Well, that's what I'm planning on doing with my new map except I'm going to take it to the extreme. I'm giving every entity a name so I can later hook into them with a plugin. Some entities I may not do any hooking into. One thing I'm going to try is hooking into certain env_sprite entities that I've placed as "red lights" on the security camera model and then hook into them so I can check if there's anyone on the Spectator team. If yes, turn lights on. If no, turn lights off. This'll work as I put observer points wherever I've put a security camera model.

    I may even create an alternate set of spawn points that have to be disabled via my plugin that cause all players to instantly die repeatedly and then have the true set of spawn points disabled on start so I can hook into them and enable them at map start. This is being done as a preventative measure because of groups like Group 2.

    (I also know of another group (who I host the server of as well) having a former owner who created their map several years ago, who put in a map-wide kill trigger and an incredibly well-hidden button that only he knew of so that if he found another server running his map, he'd slip on, hit the button which enabled the kill-trigger, then watch as the server got dumbfounded and stopped using his map. But that's another story for another day.)
     
    Last edited: Aug 25, 2015
  14. YM

    aa YM LVL100 YM

    Messages:
    7,099
    Positive Ratings:
    5,741
    U wot m8?

    [​IMG]

    This is as perfect as you're going to get out of any 3D package. Plus I even made a guide brush so you can line your origin up with the proper centre of the triangle rather than the centre of the bounding box.
     
    • Thanks Thanks x 1
    Last edited: Aug 25, 2015
  15. worMatty

    aa worMatty Repacking Evangelist

    Messages:
    1,072
    Positive Ratings:
    832
    Sounds good. I remember being told a while ago that HMX compiled some of their Deathrun maps without any entity data, and used a plugin to load it in to the server, so that if a map was ever taken, it would be useless. Good luck in your endeavour. And give any server organisation who steal your stuff a f*** you from me.
     
    • Thanks Thanks x 1
  16. Pocket

    aa Pocket func_croc

    Messages:
    4,489
    Positive Ratings:
    2,216
    Betcha almost anything it does something funny when you save and reload because it's off-grid. I can't even get it to hold on to a brush that snaps to a ½-HU grid because of some quirk of how it stores less-than-whole numbers.
     
  17. YM

    aa YM LVL100 YM

    Messages:
    7,099
    Positive Ratings:
    5,741
    Just tried. It's still absolutely the same, definitely as good as you'd get with any 3D package.
     
  18. Pocket

    aa Pocket func_croc

    Messages:
    4,489
    Positive Ratings:
    2,216
    Does it let you rotate the individual trilons and use that to apply the texture so it all lines up? That's the moment of truth.
     
  19. YM

    aa YM LVL100 YM

    Messages:
    7,099
    Positive Ratings:
    5,741
    As I said
    What's your beef with triangular prisms?
     
  20. Lain

    aa Lain Resident wrong opinion holder

    Messages:
    725
    Positive Ratings:
    653
    This is the perfect thread for the tf2c dm map im planning, thanks everybody.