Author Topic: When simulating a real client too much, AIPlayer's cannot be controlled.  (Read 836 times)

Code: [Select]
%cl = new AIConnection()
{
    name = "AI Test";
    bl_id = -1;
};
%pl = new AIPlayer()
{
    position = %pos;
    datablock = PlayerStandardArmor;
};
%cl.player = %pl;
%pl.client = %cl;

I have also created a AIConnection::onDeath - everything works, and even the name of the bot in CI's works when it kills you (not when you kill it, though).

But the problem is, .setMoveDestination, .setMoveDestination, .setMoveObject, .setAimObject, .setAimLocation, .getAimLocation, .getAimObject, .getMoveDestination, .getMoveObject, etc. have no effect whatsoever.

Don't make the AiConnection have control of the AiPlayer. Just mave them reference each other in .player and .client

An AIConnection will override the automatic bot functions if it's controlling the AIPlayer instead. Either remove control or use AIConnection::setTrigger and AIConnection::setMove to get it to do things. (These set directly "is moving forwards", "turn left at 3 units per second") rather than "walk to this point")

An AIConnection will override the automatic bot functions if it's controlling the AIPlayer instead. Either remove control or use AIConnection::setTrigger and AIConnection::setMove to get it to do things. (These set directly "is moving forwards", "turn left at 3 units per second") rather than "walk to this point")

What triggers are there then? :u

EDIT: TGE documentation says that there are 7 triggers, just tested it.
0: left mouse button
1: unknown
2: jump
3: crouch
4: jet
5: none
6: none

:/
« Last Edit: December 11, 2010, 04:52:40 AM by Bauklotz »

Also, a little problem.
When adding a AIConnection to the ClientGroup, and send player list update, it doesn't appear.
But here's the real problem:
Then when leaving a server which has a AIConnection in client group, and attempting to join again:
It still shows the 'Connecting' window even after long time, with only one 'Sending challenge request...' line. When looking in console, it shows 'Connection established.' and success and yay and everything, but it never really does anything.
Then, when doing canvas.setContent(LoadingGui);, it's just stuck at "WAITING FOR SERVER". Also, after a while, it says "The server dropped the connection: ~Æ!;".


You cannot add things to the player list ever since Truce started making fake "Badspot joined the server" plus bots and chat messages.

You cannot add things to the player list ever since Truce started making fake "Badspot joined the server" plus bots and chat messages.
ever since Truce
Truce
This is what my view suddenly concentrated on in simple steps.
And for some reason i wasn't surprised it was him who messed up our chances. ;P