Set_Face_Location() and bots [message #469836] |
Mon, 25 June 2012 04:06 |
iRANian
Messages: 4308 Registered: April 2011
Karma: 0
|
General (4 Stars) |
|
|
Has anyone ever tried using this command before having a bot attack to prevent a bot from lagging over the place or shooting you when they're not even facing you?
Long time and well respected Renegade community member, programmer, modder and tester.
Scripts 4.0 private beta tester since May 2011.
My Renegade server plugins releases
|
|
|
Re: Set_Face_Location() and bots [message #470062 is a reply to message #469836] |
Wed, 27 June 2012 10:10 |
robbyke
Messages: 348 Registered: September 2010 Location: Belgium
Karma: 0
|
Recruit |
|
|
wouldnt it just make bots insta turn around?
i think it would make it pretty harsh if the bot has a sniper as it faces to the correct position instantly and thus the first shot would always be a hit
Owner of kambot TT server
kambot.freeforums.org
|
|
|
|
|
|
Re: Set_Face_Location() and bots [message #470219 is a reply to message #470148] |
Fri, 29 June 2012 02:21 |
Troll King
Messages: 56 Registered: June 2012 Location: Netherlands
Karma: 0
|
Recruit |
|
|
The time it takes for that bot to turn would take too long for it to shoot/move after it. The actual instant movement is done by a conversation I found out. If conversations would work you would need to do something like this:
int Conversation = Commands->Create_Conversation("", 100, 99999, false);
Commands->Join_Conversation_Facing(obj, Conversation, objtoface);
Commands->Start_Conversation(Conversation, 0);
EDIT: something like this is happening in MX0_Engineer1 when you poke it.
Also Known As: Neijwiert
[Updated on: Fri, 29 June 2012 02:22] Report message to a moderator
|
|
|
Re: Set_Face_Location() and bots [message #470390 is a reply to message #469836] |
Sun, 01 July 2012 03:09 |
|
Commands->Set_Facing should be near instant (i.e. its as fast as it takes for the netcode to sync up)
Jonathan Wilson aka Jonwil
Creator and Lead Coder of the Custom scripts.dll
Renegade Engine Guru
Creator and Lead Coder of TT.DLL
Official member of Tiberian Technologies
|
|
|
|
Re: Set_Face_Location() and bots [message #470418 is a reply to message #469836] |
Sun, 01 July 2012 08:32 |
|
Oh wait now I see, the facing is only sent over the network once on spawn and not sent again.
Jonathan Wilson aka Jonwil
Creator and Lead Coder of the Custom scripts.dll
Renegade Engine Guru
Creator and Lead Coder of TT.DLL
Official member of Tiberian Technologies
|
|
|
|
|
Re: Set_Face_Location() and bots [message #470641 is a reply to message #470430] |
Tue, 03 July 2012 10:30 |
|
Jerad2142
Messages: 3812 Registered: July 2006 Location: USA
Karma: 6
|
General (3 Stars) |
|
|
It does indeed make them face the spot, this allows you to make them strafe without attacking targets, or just look at the spot. However, it wouldn't fix the turn bug unless you plan on making them face the spot first, then shoot, if you gave it adequate time it could work for that I suppose, but it'll make your AI move less fluid.
I would have to assume the real root cause of the rotation bug is that the client is never truly synced with the server on the AI.
*Server sends the message to the client that the bot is going to face this direction, at the same time the server starts rotating the bot.
*Client gets the message and starts rotating the bot, this is of course delayed due to latency etc.
*Server a generic update to the client that updates the bots current rotation to the server's current rotation.
*Client gets the message, of course it's been delayed so that rotation is now old and behind where the server's rotation is. However, client snaps the bots rotation to it anyways and resumes rotating.
*Last Two steps repeat until the sever finished rotating the bot its side.
That is what I imagine is going on anyways.
Visit Jerad's deer sweat shop
|
|
|