Exploiting entities functionality through targetnames Created 4 years ago2020-02-22 19:47:34 UTC by MrMystery MrMystery

Created 4 years ago2020-02-22 19:47:34 UTC by MrMystery MrMystery

Posted 4 years ago2020-02-22 19:47:34 UTC Post #343764
I found out something that might be a 'glitch' potential or simply a feature for some mappers.

I realized that by naming (targetname) two different entities identically, the engine somehow swaps their functionality.

I named both an info_teleport_destination and a multi_manager identically and realized that the multi_manager origin was teleporting stuff instead of the info_teleport_destination.
What's curious is that dev3 console doesn't show any message when you trigger things that way.

This behaviour seems to work with any entity.
For example, if you have two light entities with identical names and one is checked with "start dark", both the lights would start dark.

Did anyone know this trick?
MrMystery MrMysteryBanned
Posted 4 years ago2020-02-22 20:26:06 UTC Post #343765
It has been known for a long time that naming two entities identically triggers them both, however, in the case of a trigger_teleport, it kinda makes sense that the multi_manager would get used as a teledestination.
Thing is, the order of entities in the .map file dictates which one will get triggered 'sooner'. So it doesn't necessarily just swap their functionality.
For example, if you have two light entities with identical names and one is checked with "start dark", both the lights would start dark.
This also makes sense to an extent, however, this is likely done on the compiler level. HLRAD probably works like a state machine when it's dealing with flags of lights. It treats one 'name' as a single entity, but radiates light for each of them individually. It associates the 'start dark' flag with that one name because one of the entities happens to have it.
However, I can't say for sure without looking into how HLRAD works. :s

Either way, it's a cool finding.
Admer456 Admer456If it ain't broken, don't fox it!
You must be logged in to post a response.