Okay I've had a quite look and I think I've figured out how it all works -
my next question is how do I find an entity with a given classname or id or
whatever? I've had a bit of a look through the server code but can't quite
figure it and I've looked where I thought it might be based on my knowledge
of GoldSource but still haven't found an equivalent
to pfnFindEntityByString.

On 7 October 2016 at 18:52, Tom Schumann <schumann....@gmail.com> wrote:

> Many thanks - I'll look into the AcceptInput method (there are no Linux
> binaries for what I'm working on but hopefully I can find it in the vtable).
>
> On 6 October 2016 at 23:41, Sam Vanheer <duo...@hotmail.com> wrote:
>
>> I looked around a bit and found nothing that can be used to trigger
>> entities from plugins. The code for I/O is in the game libraries, but no
>> interfaces appear to be exported for use in server plugins.
>>
>> If you're making a plugin for a specific mod and the authors are
>> willing, you can ask for new interfaces to be added to allow for it.
>> They'll need to allow access to g_EventQueue to enable triggering.
>>
>>
>> The only possible alternative i see is calling CBaseEntity::AcceptInput.
>> This is a virtual function, so it's callable.
>>
>> You can get the CBaseEntity pointer through some of the interfaces, but
>> there is no guarantee that every mod has that function in the same place
>> in the class's vtable.
>>
>> If you're willing to experiment and make mod-specific configs then this
>> may be your only other option. I suggest looking into SourceMod to find
>> out how to call this function, since they've probably got the code for
>> it already.
>>
>>
>> Op 3/10/2016 om 3:25 schreef Tom Schumann:
>> > Is it possible to trigger an entity from plugin code? If there is, how
>> is
>> > it done? I'd look up how some Half-Life 2 game entity does it but I'm
>> not
>> > overly familiar with Half-Life 2's entity set to know which entity to
>> look
>> > at.
>> > _______________________________________________
>> > To unsubscribe, edit your list preferences, or view the list archives,
>> please visit:
>> > https://list.valvesoftware.com/cgi-bin/mailman/listinfo/hlcoders
>> >
>>
>>
>> _______________________________________________
>> To unsubscribe, edit your list preferences, or view the list archives,
>> please visit:
>> https://list.valvesoftware.com/cgi-bin/mailman/listinfo/hlcoders
>>
>>
>
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
https://list.valvesoftware.com/cgi-bin/mailman/listinfo/hlcoders

Reply via email to