Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

paint_sphere auto trigger keyvalue #259

Open
vrad-exe opened this issue Feb 15, 2024 · 2 comments
Open

paint_sphere auto trigger keyvalue #259

vrad-exe opened this issue Feb 15, 2024 · 2 comments

Comments

@vrad-exe
Copy link
Collaborator

Given that paint_sphere is most often used to apply paint at the start of a map, it'd be nice to have the ability to make it trigger automatically on map load instead of requiring a logic_auto input. This would be a bit tricky to implement though since it'd generally require giving the entities names to target them with I/O, but then that might conflict with user set names, etc...

One solution could be setting the entity's teamnum to a specific value in the postcompiler, then adding a VScript to the map which loops over all paint_spheres and activates ones with a matching team. That could still conflict with user specified team numbers but is a lot less likely because...why would users be setting team numbers on paint_spheres manually? Response contexts could work for this too, but there's no way to access those directly through VScript, so it'd require adding an extra filter entity and using I/O.

Alternatively, since features added by HammerAddons are more clearly labeled now, you could just make it based on targetnames and warn the user that if they have multiple paint_spheres with the same name, setting auto trigger on one of them will make all of them fire.

@TeamSpen210
Copy link
Owner

It'd make most sense to do it by targetnames. Just include in the description that the targetname will be changed so it's not usable directly. Another solution would be to give them all entity scripts, which fire the output and then self-destruct. A third would be to just remove the entities entirely - have a single paint_sphere for each paint type, then store off the positions in a VScript, have it teleport itself to each spot before painting.

@vrad-exe
Copy link
Collaborator Author

Oh another thing to note for this, I remember once noticing that in multiplayer you can't apply gel before the first player has spawned in. You probably want to add a VScript think function which will check for a player entity existing before firing the inputs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants