Author Topic: Auto Aiming Cannon Turrets  (Read 1402 times)

soo.... I was looking at the bot events source, and i found this:
Code: [Select]
function AIPlayer::lookAtPlayers(%this)
{
if(isObject(%this))
{
%dist = 1000;
for(%i = 0; %i < clientGroup.getCount(); %i++)
{
if(isObject(%player = clientGroup.getObject(%i).player))
{
if((%distB = vectorDist(%this.getPosition(), %player.getPosition())) < %dist)
{
%closestplayer = %player;
%dist = %distB;
}
}
}
if(isObject(%closestplayer))
{
%this.setAimObject(%closestplayer);
}
%this.playerLookLoop = %this.schedule(5000, lookAtPlayers);
}
}

I thought - !!!Auto Aiming HMGs on an Aircraft Carrier!!!
So. Could someone put this into a vehicle's turret and have it work?!
Thank you.
-edit- I would also like "the penetrator" from Saints Row 3 (just for lolz)
« Last Edit: May 14, 2012, 03:46:57 AM by MARBLE MAN »

Forget the Aircraft carrier

BUT I WANT THIS
I WANT
/support

Forget the Aircraft carrier

BUT I WANT THIS
I WANT
/support
you can already do this with bots...
I just wanted it on vehicles


you can already do this with bots...
I just wanted it on vehicles


I never talked about bots
I want something like turrets

I never talked about bots
I want something like turrets

Put a bot in a turret

The turret is a bot, handicaps


Elaborate.
The turret is a mounted AI player that also has a mount position.

The turret is a mounted AI player that also has a mount position.
Therefore, this is already possible?

Therefore, this is already possible?
Just rewrite the script for that AI.

You would need other functions for deciding what players to attack (in order to make the one on the OP useful)

Don't the sentries work like that

Don't the sentries work like that
Yes
This is easy, OP doesn't have a clue

In the sentries zip
Theres a .dsq file
Wtf it do?

In the sentries zip
Theres a .dsq file
Wtf it do?
Animations

In the sentries zip
Theres a .dsq file
Wtf it do?
.dsq stands for Demonstration of Sentry Quarrels.