Raised This Month: $ Target: $400
 0% 

Can't change bot's origin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
alien
Senior Member
Join Date: Aug 2005
Location: London || Slovakia
Old 10-09-2007 , 09:19   Can't change bot's origin
Reply With Quote #1

Hello!
I just can't solve this. My intention is to have a bot preventing round drawns but also indicating some map position (on radar). The prevention part works fine. But I can't change bot's origin.

This is what I do in plugin_init():

PHP Code:
new ptr[128];
        
_anti_rd_bot engfunc(EngFunc_CreateFakeClientANTI_RD_BOT_NAME);
dllfunc(DLLFunc_ClientConnect_anti_rd_botANTI_RD_BOT_NAME"127.0.0.1"ptr);
dllfunc(DLLFunc_ClientPutInServer_anti_rd_bot);
        
cs_set_user_team(_anti_rd_botCS_TEAM_CT);
cs_set_user_vip(_anti_rd_bot); 
... and this is placed in new round event:

PHP Code:
set_pev(_anti_rd_botpev_effects, (pev(_anti_rd_botpev_effects) | 128));
set_pev(_anti_rd_botpev_solid0);
entity_set_origin(_anti_rd_bot_END_ORIGIN); 
I actually was able to set it's origin, but radar indicator stays unchanged whatever I do. And also, indicator is out of map boundaries - so I suppose it's set to null origin. Anyone could help, please?
__________________
alien is offline
Send a message via ICQ to alien
Orangutanz
Veteran Member
Join Date: Apr 2006
Old 10-09-2007 , 13:47   Re: Can't change bot's origin
Reply With Quote #2

Your bot isn't thinking, get it to think once and the engine should update the bot data then.
Code:
engfunc( EngFunc_RunPlayerMove, BOT ID HERE, Float:{ 0.0, 0.0, 0.0 }, 0.0, 0.0, 0.0, 0, 0, 76 )
76 is a good value to kick the bot to do one shot things like in your case or when it connects.
__________________
|<-- Retired from everything Small/Pawn related -->|
You know when you've been Rango'd
Orangutanz is offline
alien
Senior Member
Join Date: Aug 2005
Location: London || Slovakia
Old 10-09-2007 , 17:14   Re: Can't change bot's origin
Reply With Quote #3

So what you say is that I can't teleport bot till it's not thinking? I tried to use call_think but no result. But thank you for reply!
And why am I able to change visibility and/or solidity without thinking?
__________________

Last edited by alien; 10-09-2007 at 19:45.
alien is offline
Send a message via ICQ to alien
Orangutanz
Veteran Member
Join Date: Apr 2006
Old 10-10-2007 , 12:01   Re: Can't change bot's origin
Reply With Quote #4

Teleport your bot as you normally do, then place that code I gave you after it. Should work perfectly then.
__________________
|<-- Retired from everything Small/Pawn related -->|
You know when you've been Rango'd
Orangutanz is offline
alien
Senior Member
Join Date: Aug 2005
Location: London || Slovakia
Old 10-10-2007 , 14:18   Re: Can't change bot's origin
Reply With Quote #5

It works as you said: perfectly. Thank you!
__________________
alien is offline
Send a message via ICQ to alien
Reply


Thread Tools
Display Modes

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 16:05.


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