View Full Version : Predictablilty, Rbots, and vectors.....
Hell Raiser
01-09-2001, 07:53 PM
Ok, trying to figure something out here. Everyone here knows how to "predict" where their opponent will be in MP during a gun fight. (That is, if you're good in a MP gun fight http://forums.massassi.net/html/wink.gif )
For example, you're up in that spot in Canyon Oasis with the Conn Rifle. You see someone running on the metal platform with the bacta, towards the switch for the lighting trap. Say you have the repeater, you'd "lead" your shots (taking his speed and direction into consideration) so that in effect, the guy on the metal platform runs into the little blobs of energy.
Anyways, I know there's some kinda formula, and a way to get the Rbots to do this, I just haven't figured it out yet. http://forums.massassi.net/html/smile.gif
The vectors really confuse me when using GetThingPos(Thing) and VectorAdd(Vector,Vector) combining all sorts of stuff into it.
Any help,(and maybe some enlightment) will be appreciated. =)
------------------
-Hell Raiser
"I am not defeated so easily!"
Co-staffer of Rbots
Hideki
01-10-2001, 12:50 AM
I thought of doing such aiming prediction feature in my sniper arena, but then the next second I thought the bullets just travel fast enough that it hits whenever you have aimied directly to the opponent.
I have seen such feature done in UT, though forgot what it was called, at planetUT.
That mod creates a crosshair near the opponent so if the player shoots at that crosshair, it will eventually hit him. So, if you can find that mod then just open it up with text editor and learn the vector.
------------------
http://millennium.massassi.net/ - Millennium
Aglar
01-10-2001, 05:26 AM
Perhapes you could attach a ghost just in front of the other players and have the bots fire at that?
------------------
Together we stand.
Divided we fall.
Hell Raiser
01-10-2001, 12:13 PM
Hey Hideki, can you tell me the name, or provide a link? I'm having trouble finding it.
Also, maybe some JK Cog insperation? http://forums.massassi.net/html/smile.gif
Aglar, although a good suggestion, it wouldn't be as precise as I'd like it to be. If the person is walking backwards, or strafing, or standing still even, it wouldn't quite work.
------------------
-Hell Raiser
"I am not defeated so easily!"
Co-staffer of Rbots (http://rbots.massassi.net/)
[This message has been edited by Hell Raiser (edited January 10, 2001).]
Raynar
01-10-2001, 01:41 PM
I was looking for something like this some time ago and found a small snippet from the sync-ai cogs. Credit of course should go to Nightmare who created sync-ai.
firepos = VectorAdd(GetThingPos(target), VectorScale(GetThingVel(target), lead));
firevec = VectorNorm(VectorSub(firepos, GetThingPos(rbot)));
SetThingLook(rbot, firevec);
firepos & firevec are vectors, while lead is a flex showing how much in front of the target you want the attacker to aim.
Raynar
------------------
... the Jedi I admire the most, met up with Darth Maul, now he's toast ...
Rbots (http://rbots.massassi.net) - a project to develop a working Bot for Jedi Knight... download the latest development version here (http://rbots.massassi.net/downloads.php3)
Hell Raiser
01-10-2001, 03:51 PM
I'll get ICQ fixed one of these days. http://forums.massassi.net/html/wink.gif
Thanks man.
------------------
-Hell Raiser
"I am not defeated so easily!"
Co-staffer of Rbots (http://rbots.massassi.net/)
Hideki
01-10-2001, 06:52 PM
That ai won't predict where the bot is heading to, you have to guess it with "lead" var or calculate the vector at somewhere else.
Don't know where the mutator is, it was a long time ago. Maybe tackle Mod Central or ask around at the forum.
Let me see what I can do here.
symbols
message startup
message timer
thing Hideki local
end
code
startup:
Hideki = startHideki();
openEditPlus();
startThinking(Hideki);
SetTimer(aFewHours);
return;
timer:
postTheResults(massassiForum, Hideki);
return;
end
------------------
http://millennium.massassi.net/ - Millennium
Powered by vBulletin® Version 4.1.5 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.