AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   How to make bots using flashlights? (https://forums.alliedmods.net/showthread.php?t=71849)

KWo 05-25-2008 14:08

How to make bots using flashlights?
 
Does anyone know how to force the bot to use the flashlight?
That client_cmd(id, "impulse 100") doesn't work at all at bots. I was trying in bot dll code to use:
FakeClientCommand (pEdict, "impulse 100");
but that doesn't affect the bots (even making the bots spriting needs to use extra code instead just some impulse value).

I was trying to use also EF_DIMLIGHT (pEdict->v.effects |= EF_DIMLIGHT), but that one makes the whole bot as a bright light in the dark room, instead making only a small light focused at the point the bot is looking at.
I even did this:
Code:

        MESSAGE_BEGIN (MSG_ONE, gmsgFlashlight, NULL, pEdict);
        WRITE_BYTE (1);
        WRITE_BYTE (100);
        MESSAGE_END ();

and I'm sure the message is sent (I could catch it by a metamod pm_tools plugin), but it also doesn't help.
Any idea?

Orangutanz 05-26-2008 13:16

Re: How to make bots using flashlights?
 
Try messing around with the usercmd_s

Hook CmdStart function then try doing this:
cmd->impulse = 100;

MPNumB 05-27-2008 06:57

Re: How to make bots using flashlights?
 
engclient_cmd("impulse", "100"); shold work.

jim_yang 05-27-2008 07:53

Re: How to make bots using flashlights?
 
Quote:

Originally Posted by MPNumB (Post 630671)
engclient_cmd("impulse", "100"); shold work.

engclient_cmd == FakeClientCommand

Orangutanz 05-27-2008 11:11

Re: How to make bots using flashlights?
 
We've tried and tested, hence why KWo is asking for suggestions.


All times are GMT -4. The time now is 07:28.

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