[Solved] Dynamic Signs to point where payload is?

Oct 6, 2008
1,947
445
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?
 

ficool2

L4: Comfortable Member
Oct 28, 2017
161
232
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
 
Last edited:
Oct 6, 2008
1,947
445
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.
 

ficool2

L4: Comfortable Member
Oct 28, 2017
161
232
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
 

Izotope

Sourcerer
aa
May 13, 2013
698
764
You can view attachment points in HLMV, no need to decompile.
 
Oct 6, 2008
1,947
445
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.
 
Oct 6, 2008
1,947
445
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 :(
 
Oct 6, 2008
1,947
445
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
 

Coding Ethan

L2: Junior Member
Oct 12, 2014
93
109
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?

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.
 
Oct 6, 2008
1,947
445
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:
Oct 6, 2008
1,947
445
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!
 
Oct 6, 2008
1,947
445
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!