-
Notifications
You must be signed in to change notification settings - Fork 36
Compiler Entities
Spencer Brown edited this page Jun 28, 2023
·
1 revision
The postcompiler provides the ability to use a number of new psecudo-entities, that do not actually exist.
It finds them in the BSP, then either replaces them with other real entities, or removes them entirely. For these entities, the classname in the sprite is gold and they always begin with comp_
.
Inputs to the compiler-only entities are detected and rewritten to implement the desired behaviour. For the most part this should be seamless, but there are some caveats to be aware of:
- It is done at compile time, so
ent_fire
, VScript, etc will need to manually trigger the internal logic. A workaround is to placelogic_relay
s with the desired inputs, then trigger those. - The remapping will replace the original output, so if real entities match the target name, those may no longer recieve the input.
- Special names like
!activator
can still work, but the exact way the outputs are being rewritten needs to be taken into consideration. For example, using!self
in acomp_relay
'sOnTrigger
output will target the caller of the relay, since the output is moved there.
To gain insight into how the remapping is performed, it can be useful to decompile your map, allowing the ability to see the final inputs and outputs produced.