[Solved] Dynamic Signs to point where payload is?

Discussion in 'Mapping Questions & Discussion' started by Kill_the_Bug, Mar 11, 2019.

  1. Kill_the_Bug

    aa Kill_the_Bug

    Messages:
    1,657
    Positive Ratings:
    344
    Hi,

    Saw this on a map once can't remember the name of it - been ages since I've seen it.

    There was stationary arrow (i.e. in spawn room), that would follow the cart and point towards it.

    Any idea how to make something like that?
     
  2. ficool2

    ficool2 L6: Sharp Member

    Messages:
    250
    Positive Ratings:
    197
    light_dynamic with a Target as the cart name, tick the No Light Models and No Light World in flags, then parent an arrow to it

    There is several more ways to do this, but that should work
     
    • Thanks Thanks x 2
    • Agree Agree x 1
    Last edited: Mar 12, 2019
  3. Kill_the_Bug

    aa Kill_the_Bug

    Messages:
    1,657
    Positive Ratings:
    344
    thanks cool! Are there other ones that I can use? < not sure how the one suggested works when the cart is behind a wall or something.

    i.e. I'd like to put these flat on the floor (cap_point_arrow_small.mdl) and have the arrow auto point towards the cart.

    Alternatively, and it would be cool if I could get it to work, use the floor path lights from portal/portal 2 to go from spawn points to the part on the floor.

    I've tried a turret using a func_rotating but can seem to get it to point at the cart - I can't seem to get the sdk model viewer program to open up so I can look for attachment points on or inside the models. I would need this so I can use SetParentAttachmentMaintainOffset and try to do an arrow that way.
     
  4. ficool2

    ficool2 L6: Sharp Member

    Messages:
    250
    Positive Ratings:
    197
    light_dynamic will look at its target always, through walls and stuff

    To get attachment points, you can decompile a model using Crowbar, and then open a generated .qc file and look for $attachment lines, this will give you their name
     
  5. Izotope

    aa Izotope Never releases maps

    Messages:
    645
    Positive Ratings:
    644
    You can view attachment points in HLMV, no need to decompile.
     
  6. Kill_the_Bug

    aa Kill_the_Bug

    Messages:
    1,657
    Positive Ratings:
    344
    My HLMV isn't working for some reason. I open SDK double click it and get - the configuration info for the game you're trying to edit is invalid or missing and or fatal_error - unable lo load manifest file 'scripts/game_sounds_manifest.txt'

    I looked at some of the models and only found one (and of course it's not one that I need) that has a code line for attachments. If I opened the qc file and added in a line to create my own attachment point and then resaved as a custom model - would that work? And I'm assuming for my goal that I would put this attachment point in the centre of the cart model?

    When I used the light_dynamic for some reason everything is hugely bright even though I checked off the flags indicated.

    Do you know of any maps that have what I'm trying to do, or know of any youtube videos? I could de-compile and see how they did it and then could see if I could export that type of coding into my map.

    I had another thought, which may help, but don't know if it would work on a pl map. The CTF pointer system on the screen that indicates the direction of the briefcase - could I set up something like that and have the directional arrow offset of the pl hud that way the player would know right on their screen which way to run and still see the pl hud, the bonus of course is that it would also lower the entity count by not having to have a lot of extra dynamic entities in the game.
     
  7. Kill_the_Bug

    aa Kill_the_Bug

    Messages:
    1,657
    Positive Ratings:
    344
    Hmm - I decompiled one of the portal 2 intro maps and found just what I need npc_security_camera which is the entity that points the camera/robot eyeball at you as you move around the room, unfortunately TF2 doesn't recognize this entity type :(
     
  8. Kill_the_Bug

    aa Kill_the_Bug

    Messages:
    1,657
    Positive Ratings:
    344
    Re the above post - can non-TF2 entities be put into t script and then packed into a map file so that they will run when the map loads? If yes, how does one do it. i.e. find the entity, copy it into a file and then where in the TF2 file structure would it go?

    Thanks
     
  9. Coding Ethan

    Coding Ethan L2: Junior Member

    Messages:
    94
    Positive Ratings:
    83
    npc_security_camera is only in Portal and Portal 2, this is specified in the game's code, TF2 does not have this entity's code, so cannot use it. Any attempt at loading an unimplemented entity will cause it to be removing from the map ingame, with an error in the console.

    After doing some fiddling around with the light_dynamic method, I found the signs will clip if there's any verticality to the map, you could raise them a bit or just lower the floor beneath them to lessen the effect.

    Hammer logic: prop parented to light which faces the cart, using the sign prop angles seems to work.
    pl_pointarrow_logic.png
    Be sure to go into the light_dynamic's flags and disable lighting world and models.

    Here's how the above settings look ingame.
     
    • Like Like x 1
  10. Kill_the_Bug

    aa Kill_the_Bug

    Messages:
    1,657
    Positive Ratings:
    344
    OMG YOU'RE BRILLIANT!

    Edit: It's starting to work but the starting angles are off at my end - I have the arrow prop horizontal and pointing towards the cart, when I launch map arrow is pointing towards cart and the model is verticle.

    I also tried it with a func_bush point down that the cart but in game it is now verticle.
     
    Last edited: Mar 19, 2019
  11. Kill_the_Bug

    aa Kill_the_Bug

    Messages:
    1,657
    Positive Ratings:
    344
    Ok - fantastic! I got it working with the func_brush - I just needed to figure out the starting angles in relation to the dynamic light!
     
  12. Kill_the_Bug

    aa Kill_the_Bug

    Messages:
    1,657
    Positive Ratings:
    344
    Ok Peeps - I have everything working perfectly - see this map for it in action (or at least this pictures of it in the screen shots):

    https://tf2maps.net/downloads/pl_antimatter.7433/updates

    Here's how it was done in case anyone else needs to do it:

    as per Ficool2 - light_dynamic - tick the No Light Models and No Light World in flags

    Name - cart_tracker_main_01 < this way you can sequence them in your map so the arrows don't get confused
    Entity to point at - your payload prop <as per Coding Ethan

    Next - you can use a prop but I used a func_brush to get around the verticle changes in a my map - just make sure you position your arrow so that when the cart moves you can still see it and not have it disappear in the ceiling/floor/wall. so in mu case:

    func_brush
    Name - Cart_follower_main_01
    Parent - cart_tracker_main_01

    I aligned the straight end of the arrow to the light < so it would act as the pivot point.

    That's it - you should now have a working pointer.

    My thanks again to Ficool2 and Coding Ethan < I had a hard time with this one!