Hi there,
I'm looking to hook a buttons OnPressed output but I'm not too sure how this is done in Source Python. I already have the entity from using EntityIter, just need to know how to hook the thing.
Any advise would be appreciated.
Hook an entity output
-
- Junior Member
- Posts: 19
- Joined: Fri Nov 06, 2015 11:49 pm
Hi,
you can use the EntityOutput listener from the listeners module. Here is an example:You would obviously want to check the output name equals "OnPressed" and maybe check the classname of the caller/activator as well.
you can use the EntityOutput listener from the listeners module. Here is an example:
Syntax: Select all
from listeners import EntityOutput
@EntityOutput
def on_entity_output(output_name, activator, caller, value, delay):
print(output_name)
-
- Junior Member
- Posts: 19
- Joined: Fri Nov 06, 2015 11:49 pm
Return to “Plugin Development Support”
Who is online
Users browsing this forum: No registered users and 114 guests