Raised This Month: $51 Target: $400
 12% 

[TF2] How to force entity output?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Potato Uno
Veteran Member
Join Date: Jan 2014
Location: Atlanta, Georgia
Old 08-04-2016 , 17:33   [TF2] How to force entity output?
Reply With Quote #1

I see AcceptEntityOutput and HookEntityOutput on the SM API, but I don't see something like AcceptEntityOutput or HookEntityInput.

The HookEntityInput isn't too important, but what I would want to do is be able to force an entity to emit an output. In particular, in TF2, I want to trigger the trigger_capture_area's OnCapTeam* entity outputs without the control point being captured.

I found this function, CBaseEntity::FireNamedOutput and managed to find the function signature in windows. However, I have no idea what this variant_t parameter is, and passing in 0 caused a server crash (...which might not be too surprising).

So my question is, what do I pass into that variant_t parameter (which I assume is a C++ object generated when we use SetVariant* in sourcepawn?), or if there is another way, how do I trigger the entity output? Is this something that I would need a C++ extension to do and can't do with sourcepawn alone? (which would suck but it is what it is)

This is the test plugin if anyone is curious.

Spoiler

Last edited by Potato Uno; 08-04-2016 at 17:35.
Potato Uno is offline
psychonic

BAFFLED
Join Date: May 2008
Old 08-04-2016 , 19:38   Re: [TF2] How to force entity output?
Reply With Quote #2

Quote:
Originally Posted by Potato Uno View Post
However, I have no idea what this variant_t parameter is, and passing in 0 caused a server crash (...which might not be too surprising).
The issue is less of passing 0, but more that it's a 20(?)-byte object and you're passing 4.

I don't think that there's currently a good way to call FireOutput from SM. If you want to file a bug, we could look at something for that, or you could do it in an extension.
psychonic is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 12:01.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode