Thanks a lot, that fixed it. Works in both HL2DM and TF2.
For those who are wandering:
pServerPluginHelpers->ClientCommand( pBotEdict, "use weapon_smg1" );
Regards,
Boris.
2014-08-14 14:06 GMT-03:00 Borzh <[email protected]>:
> Thanks for the tip, I will try to do that :)
>
>
> 2014-08-12 21:15 GMT-03:00 Tom Schumann <[email protected]>:
>
> With regards to the second problem, it has been known for a while that the
>> method doesn't quite work as expected. Maybe check how other Source bots
>> work? I think RCBot2 might be open source.
>> Does the "weapon_<name>" command switch to the specified weapon? I
>> haven't done any bot programming in a while but maybe you can send that
>> client command to the bot to get it to switch properly.
>>
>>
>> On 12 August 2014 23:23, Borzh <[email protected]> wrote:
>>
>>> To Valve developers: it should be nicer to have 2 methods,
>>> IBotController::SetActiveWeapon() that sets weapon if bot has it in
>>> some slot
>>> and something like
>>> IBotController::AddWeapon() that should not work if sv_cheats == 0
>>>
>>> Thanks.
>>>
>>>
>>>
>>> 2014-07-28 15:31 GMT-03:00 Borzh <[email protected]>:
>>>
>>> Hi all,
>>>>
>>>> I am creating a bots plugin for HL2DM and I have several problem with
>>>> it:
>>>>
>>>> - Source dedicated server (linux) sends invalid events to plugin when
>>>> using
>>>> bool IGameEventManager::FireEvent( KeyValues * event ):
>>>> event->GetName() always returns empty string.
>>>> Also iterating on values GetFirstValue() / GetNextValue(),
>>>> GetName()
>>>> also returns empty string.
>>>> I started to use IGameEventManager2 and it is working fine.
>>>> I understand that IGameEventManager is used to maintain backward
>>>> compatibility. It doesn't work though.
>>>>
>>>> - IBotController::SetActiveWeapon()* creates new weapon*, even if bot
>>>> have
>>>> picked it. I know that because
>>>> IServerPluginCallbacks::OnEdictAllocated()
>>>> is called every time bot tries to switch weapon using
>>>> IBotController::SetActiveWeapon()!
>>>> So from time to time I get *error allocating edict *(of course there
>>>> are too
>>>> many unused weapons on the map).
>>>> * Anyone know how to fix it?*
>>>>
>>>> Thanks in advance,
>>>> Boris.
>>>>
>>>
>>>
>>> _______________________________________________
>>> 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