Although I have been using SourceMod and coding private plugins for some time, this is my very first public release, but I felt it to be useful enough to release at large.
The inspiration for this plugin was the "Trigger Mapentities" plugin written by HSFighter
. It had been a useful device for map development and testing, not to mention the occasional prank. However, we soon learned its limitations, such as requiring the class name to be able to fire the event. It also couldn't accept input values.
This is the result of my development to create a better version. It basically mimics the function of the "ent_fire" cheat command, enabling the triggering of any and all matching entities complete with optional input, but without spoiling your session by activating cheat mode.
I only delve into Team Fortress 2, but the basic nature of this plugin should render it mod-agnostic.
No CVARs are used other than the version CVAR "sm_trigger_version".
It's as simple as loading it to enable the commands and unloading it to remove them.
The plugin provides three commands, all with ROOT
flag restrictions (easy to change in the source) due to their technical or powerful nature:
- sm_trigger <entity> [input] [value]
This is the command as described. Just use an entity's name or * wildcard and an input and value if desired. You can target an entity number with "#<number>" or an entity in your sights with "@aim".
- sm_findentity <entity>
This is a debugging command I used alongside this one and uses the same entity tracking feature. It will list all entities matching your input, complete with number, actual name, and class name.
(In-game only) Another debugging command based on code from a private debugging plugin I made for myself. It will identify any solid entity you are aiming at and give you information about it, allowing you to record and Trigger it later if you wish.
- v1.1 Released
. Now supports numeric entity targets using the "#" prefix as well as the "@aim" target for targets in sights . This allows for the triggering of unnamed entities. Also added the "sm_aimentity" command to learn about an entity in your sights and greatly expanded the list of default actions.
Standard disclaimers apply. You assume all responsibility for the use of this plugin. Having said that, I sincerely hope this plugin is of use to anyone. I know it has been for myself.