Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » Set_Face_Location() and bots
Set_Face_Location() and bots [message #469836] Mon, 25 June 2012 04:06 Go to next message
iRANian is currently offline  iRANian
Messages: 4300
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 Go to previous messageGo to next message
robbyke is currently offline  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 #470071 is a reply to message #469836] Wed, 27 June 2012 12:00 Go to previous messageGo to next message
Ethenal is currently offline  Ethenal
Messages: 2532
Registered: January 2007
Location: US of A
Karma: 0
General (2 Stars)

I don't think he meant it in that context; we were trying to figure out if using that function instead of doing an ActionParamsStruct would cause the bot to turn at the correct speed on the client, instead of the standard turn-very-slowly-while-bot-shoots-at-wall-and-kills-you.

-TLS-DJ-EYE-K wrote on Mon, 18 March 2013 07:29

Instead of showing us that u aren't more inteligent than a Toast, maybe you should start becomming good in renegade Thumbs Up

Re: Set_Face_Location() and bots [message #470134 is a reply to message #469836] Thu, 28 June 2012 03:23 Go to previous messageGo to next message
Troll King is currently offline  Troll King
Messages: 56
Registered: June 2012
Location: Netherlands
Karma: 0
Recruit
I believe I did a while ago it turns as slow as it normally does. Wouldn't work.

Also Known As: Neijwiert
Re: Set_Face_Location() and bots [message #470148 is a reply to message #469836] Thu, 28 June 2012 08:38 Go to previous messageGo to next message
iRANian is currently offline  iRANian
Messages: 4300
Registered: April 2011
Karma: 0
General (4 Stars)
well the idea is that they turn and then shoot

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 #470219 is a reply to message #470148] Fri, 29 June 2012 02:21 Go to previous messageGo to next message
Troll King is currently offline  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 Go to previous messageGo to next message
jonwil is currently offline  jonwil
Messages: 3555
Registered: February 2003
Karma: 0
General (3 Stars)

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 #470391 is a reply to message #469836] Sun, 01 July 2012 03:20 Go to previous messageGo to next message
iRANian is currently offline  iRANian
Messages: 4300
Registered: April 2011
Karma: 0
General (4 Stars)
If I remember it doesn't work on bots, but I'm not sure. I know it doesn't work on human players.

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 #470418 is a reply to message #469836] Sun, 01 July 2012 08:32 Go to previous messageGo to next message
jonwil is currently offline  jonwil
Messages: 3555
Registered: February 2003
Karma: 0
General (3 Stars)

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 #470427 is a reply to message #470418] Sun, 01 July 2012 11:09 Go to previous messageGo to next message
Ethenal is currently offline  Ethenal
Messages: 2532
Registered: January 2007
Location: US of A
Karma: 0
General (2 Stars)

jonwil wrote on Sun, 01 July 2012 10:32

Oh wait now I see, the facing is only sent over the network once on spawn and not sent again.


Oh?! So maybe you could fix it? If you so loved us so much...


-TLS-DJ-EYE-K wrote on Mon, 18 March 2013 07:29

Instead of showing us that u aren't more inteligent than a Toast, maybe you should start becomming good in renegade Thumbs Up

Re: Set_Face_Location() and bots [message #470430 is a reply to message #470427] Sun, 01 July 2012 11:52 Go to previous messageGo to next message
Troll King is currently offline  Troll King
Messages: 56
Registered: June 2012
Location: Netherlands
Karma: 0
Recruit
Would be awesome cool indeed Smile

Also Known As: Neijwiert
Re: Set_Face_Location() and bots [message #470641 is a reply to message #470430] Tue, 03 July 2012 10:30 Go to previous message
Jerad2142 is currently offline  Jerad2142
Messages: 3805
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.


Previous Topic: debug help
Next Topic: crypt
Goto Forum:
  


Current Time: Mon Jun 10 09:49:57 MST 2024

Total time taken to generate the page: 0.00881 seconds