DAZZLE'S UPGRADE PACK

If you haven't already done so, upgrade your game by downloading Dazzle's all-in-one upgrade pack. It comes with everything you need for today's servers. Does your blue bar freeze when joining servers? Do you lag in games? Do you get an annoying siren in Phobik's Servers? This is what you need. CLICK HERE TO DOWNLOAD.

Suggestion for ACAS

Modding questions, answers, help.....

Moderators: Warfare, Moderator, Admin

DJ Wings
Need Major Repair
Need Major Repair
Posts: 895
Joined: Thu Dec 28, 2006 9:01 am
Location: Places... Places.

Suggestion for ACAS

Post by DJ Wings »

Add a command to put a player's tank on cruise control via an AI while they're AFK, and another to disable it when they return.
Here's the code, for anyone who wants to use it:

Code: Select all

function afk(%sender)
{
   %sender.player.setAI(GoldLightAI);
}
function back(%sender)
{
   %sender.player.setAI(none);
}
Last edited by DJ Wings on Sun Apr 27, 2008 4:28 am, edited 1 time in total.
Never really gone, never really part of the game.
fresh_305
New Brainjar
New Brainjar
Posts: 11
Joined: Wed Feb 20, 2008 10:04 pm

Re: Suggestion for ACAS

Post by fresh_305 »

Ahh, Cool. Thnx :)
User avatar
MusickTMG
Veteran Light
Veteran Light
Posts: 1903
Joined: Mon Jun 25, 2007 8:59 pm
Location: San Diego, California

Re: Suggestion for ACAS

Post by MusickTMG »

isnt this the same as the possess code, its puts your tank on a ai, and it drives and shoots its self.
Musick-TMG-

:duckie: "I got a idea"
DJ Wings
Need Major Repair
Need Major Repair
Posts: 895
Joined: Thu Dec 28, 2006 9:01 am
Location: Places... Places.

Re: Suggestion for ACAS

Post by DJ Wings »

Musick: Sort of. The possession code can't be controlled, whereas for this one, it's intended as a tool rather than a gameplay element.
Fresh_305: Don't get your hopes up. You can't just add the code and run it, you have to edit NormalCodes.cs to call it.
Never really gone, never really part of the game.
User avatar
MusickTMG
Veteran Light
Veteran Light
Posts: 1903
Joined: Mon Jun 25, 2007 8:59 pm
Location: San Diego, California

Re: Suggestion for ACAS

Post by MusickTMG »

I see what you mean, i will have to give it a try when i have some free time
Musick-TMG-

:duckie: "I got a idea"
DJ Wings
Need Major Repair
Need Major Repair
Posts: 895
Joined: Thu Dec 28, 2006 9:01 am
Location: Places... Places.

Re: Suggestion for ACAS

Post by DJ Wings »

Edited; the old approach wouldn't work.
Never really gone, never really part of the game.
ArtCrazy
Veteran Member
Veteran Member
Posts: 290
Joined: Fri Dec 29, 2006 10:14 am

Re: Suggestion for ACAS

Post by ArtCrazy »

In case you didn't notice, the possess code does exactly what you wrote:
$ACAS::CodesFolder::Function[10] = "possess";
$ACAS::CodesFolder::Shortcut[10] = "/possess";
$ACAS::CodesFolder::Description[10] = "Possess Player";
$ACAS::CodesFolder::GuiArgs[10] = "SelectedPlayer";

$ACAS::CodesFolder::Function[11] = "unpossess";
$ACAS::CodesFolder::Shortcut[11] = "/unpossess";
$ACAS::CodesFolder::Description[11] = "Unpossess Player";
$ACAS::CodesFolder::GuiArgs[11] = "SelectedPlayer";

function possess(%sender,%msg)
{
%match = matchClientName(%msg);
%client = firstword(%match);
%status_msg = restWords(%match);
if(%client == -1)
{
commandToClient(%sender,'CenterPrint', %status_msg,4,4);
return;
}

%client.player.setai(GoldLightAI);
centerprintall(%client.namebase SPC "has been possessed!",4,4);
}

function unpossess(%sender,%msg)
{
%match = matchClientName(%msg);
%client = firstword(%match);
%status_msg = restWords(%match);
if(%client == -1)
{
commandToClient(%sender,'CenterPrint', %status_msg,4,4);
return;
}

%client.player.setai("");
%client.setControlObject(%client.player);
centerprintall(%client.namebase SPC "has been unpossessed!",4,4);
}
And it's reverseable using /unpossess
DJ Wings
Need Major Repair
Need Major Repair
Posts: 895
Joined: Thu Dec 28, 2006 9:01 am
Location: Places... Places.

Re: Suggestion for ACAS

Post by DJ Wings »

*coughcoughadminonlycoughcough*
Never really gone, never really part of the game.
ArtCrazy
Veteran Member
Veteran Member
Posts: 290
Joined: Fri Dec 29, 2006 10:14 am

Re: Suggestion for ACAS

Post by ArtCrazy »

You can configure it to be non-admins too... You can even let non-admins ban people if you feel like it.

Who is online

Users browsing this forum: ClaudeBot [Bot] and 20 guests