Raised This Month: $ Target: $400
 0% 

Catch PodBot Movement.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Paulster1022
Member
Join Date: Apr 2006
Old 08-12-2014 , 18:57   Catch PodBot Movement.
Reply With Quote #1

Essentially want to catch the movement of Bots. It isn't accurate. Works fine with humans though.

Code:
public plugin_init( )
{
register_forward(FM_CmdStart, "fw_cmdstart") 
}


public fw_cmdstart(id, uc, seed)
{
    	static buttons
    	buttons = get_uc(uc, UC_Buttons)

	if(buttons & IN_MOVELEFT && hasMoved[id] != LEFT)
	{
		write_file(g_random_file, "Latest Key:", 0)
		write_file(g_key_file, "Left", 0)
		hasMoved[id] = LEFT
	}

	else if(buttons & IN_MOVERIGHT && hasMoved[id] != RIGHT)
	{
		write_file(g_random_file, "Latest Key:", 0)
		write_file(g_key_file, "Right", 0)
		hasMoved[id] = RIGHT
	}
}
*Not complete code but, is there a better way to go about this for bots? Like i said, it works but it isn't accurate but for humans its great. Thx, I'm using podbots.
Paulster1022 is offline
Send a message via AIM to Paulster1022
NikKOo31
Senior Member
Join Date: May 2013
Location: Home
Old 08-12-2014 , 20:03   Re: Catch PodBot Movement.
Reply With Quote #2

I don't think bots use IN_MOVE*, try using IN_LEFT and IN_RIGHT instead
__________________
Hey ^_^
NikKOo31 is offline
Paulster1022
Member
Join Date: Apr 2006
Old 08-12-2014 , 20:30   Re: Catch PodBot Movement.
Reply With Quote #3

Thanks, ill Try
Paulster1022 is offline
Send a message via AIM to Paulster1022
Paulster1022
Member
Join Date: Apr 2006
Old 08-12-2014 , 20:41   Re: Catch PodBot Movement.
Reply With Quote #4

Doesn't Seem to be accurate. I see him moving left, but it sometimes calls it... Up and down seem a bit more accurate. Another way to detect movement on bots? I've tryed client_prethink function, still not accurate on what direction bot is moving in.

All podbots mostly hold the forward(W) key. Not like regular players, maybe that's why i'm not seeing IN_MOVELEFT or IN_MOVERIGHT or even IN_BACK being called.

Last edited by Paulster1022; 08-12-2014 at 22:35.
Paulster1022 is offline
Send a message via AIM to Paulster1022
NikKOo31
Senior Member
Join Date: May 2013
Location: Home
Old 08-13-2014 , 00:08   Re: Catch PodBot Movement.
Reply With Quote #5

I saw in a post some time ago, someone catching the aim move by the difference with pev_angles (or pev_v_angles, not sure), maybe you can use that, but I can't find that post now D:
__________________
Hey ^_^
NikKOo31 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 13:19.


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