Author Topic: AI Connections  (Read 1140 times)

I have a couple questions about AI Connections. Are they completely functional? How do you give one a name to be called for .getPlayerName()? Can you make them move their player? I've tried a couple things out, but it seems like only a few functions actually work for them. It seems like neither AI.setMove() nor AI.setMoveDestination() make his player move. Any feedback is appreciated.

The movement functions run on the AIplayers themselves.

We can no longer package AIconnection::getPlayerName() to return our own value, so no, AIconnections can't get names for .getplayername() (as that would allow their players to have shapenames and as we all know even the merest potential for any sort of harmless abuse in a sandbox game is forbidden)

It is pretty stupid that badspot blocked us from putting names on the bots.

The movement functions run on the AIplayers themselves.
Really? I dumped the methods of the AI Connection and those two I tried were dumped. So call it on the AI's control object?
It is pretty stupid that badspot blocked us from putting names on the bots.
I can see why he did that, but I think it'd be nice to at least have some other alternative for shapenames to identify a bot.
« Last Edit: July 03, 2010, 10:48:18 PM by lilboarder32 »

I need to bump this as I never really received any help. I cannot seem to get an AI Connection to move their player around. I create the AI Connection successfully, call .createPlayer() on it, then try both of those move methods, but absolutely nothing is happening. Help?

AI Connections are not fully developed. As I read on Garage Games, it's just meant to clean up code for AI Players and such, but you need to set everything up, yourself.

Make sure that the class that createPlayer created was an AIPlayer and not a normal Player? If not, package the method to spawn an AIPlayer
Also make sure that you gave the function arguments?

Make sure that the class that createPlayer created was an AIPlayer and not a normal Player? If not, package the method to spawn an AIPlayer
Ah, that might have been my issue. I did not know there was an AIPlayer class. I did know that, just didn't put 2 and 2 together.
Also make sure that you gave the function arguments?
Are you talking about .createPlayer()?

I definitely gave the move functions arguments.

Edit: Alright, so I am using an AIPlayer now as the objects player, and I can just call movement methods through the AIPlayer. The move methods on the AIConnection don't seem to be finished or whatever as M stated.
« Last Edit: August 21, 2010, 04:10:48 PM by lilboarder32 »

Yeah I created an AIConnection and called createPlayer on it, it was a player instead of an AIplayer

You'll  have to manually create the AIPlayer yourself

Code: [Select]
new AIPlayer()
{
datablock = PlayerStandardArmor;
};