Talk:Info target

From Valve Developer Community
Jump to: navigation, search

Parenting info_targets in CS:S

Disappearing info_targets: Is this a feature or a bug? I create a new info_target, give it a name, compile in VBSP and run in engine (CS btw, but that doesn't matter for this entity). I type ent_fire in the console to see if its present, and it is. Then, I parent the info_target to a func_movelinear so that the target will move in a sequence I'm doing. Recompile BSP and bam, no more info_target by that name? I remove the Parent entry and the info_target is back? Workaround of firing a SetParent when the sequence starts is fine, but this just doesn't seem right. Or maybe I'm wrong... --TracerDX 00:13, 4 Feb 2006 (PST)

info_targets have a flag, [delete on start] make sure it is not checked. This is for optimization purposes. When you set a camera angle when game starts for example. Im not 100% sure about this but I seem to remember something like it. Let me know if it helps.--Deadity 00:30, 4 Feb 2006 (PST)
Wow. quick answer--Deadity 00:31, 4 Feb 2006 (PST)
At least in HL2 info_targets doesn't have any flags at all, or anything similar to what you are describing. Are you thinking about info_null, that is automatically deleted on compile? --Andreasen 01:38, 4 Feb 2006 (PST)
In CS:S, parenting (most) entities doesn't work, probably because of the way entities are reset during round restarts. The parented entity gets deleted or destroyed somehow. (This is why you can't parent ropes in CS:S and have to play silly buggers with logic_measure_movement). One point entity that will parent correctly is env_spark. If you never turn it on, you don't get any sparks and it acts just like an info_target, except that it will reset correctly on round restarts. --Rof 11:24, 4 Feb 2006 (PST)