Open StefanH-AT opened 3 years ago
A "teleport to attachment" boolean should also be added that, when enabled, makes it behave like SetParentAttachment
(teleporting instead of maintaining offset). That's something that's not currently possible with the comma syntax, or even with TeamSpen's addons.
I'm not sure how to implement this. The teleport to attachment should not be added as a spawnflag because parenting exists on a baseentity level. I was going to add a attachment,maintainoffset
syntax, but can't that just be added to the postcompiler?
It can't as easily, since I'd need to generate a logic_auto
or something to fire the command at the entity - then dealing with problems like if other entities have the same name, what happens if it doesn't have a name, if it's in a template (so I need to put the logic_auto
in that too.....
OnSpawn !self SetParentAttachment ?
Unless you added it, that’s not an output I’m aware of. I suppose I could spawn a logic_relay and parent though that, but it’d be real inefficient.
I'm just going to add the attachment keyvalue only to prop_dynamic and not baseclass
Seems like that'd kind of defeat the purpose, since you'd mainly want to use it to attach things to a prop_dynamic...
TeamSpen210/HammerAddons#80 already exists for this, not sure if we also want to have this implemented in code?
You can already set the attachment point directly by using the, syntax, but a dedicated keyvalue for this will be 👌