Author Topic: AIConnection names?  (Read 1004 times)

Before v13, I was package AIConnection::getPlayerName() and return the value I wanted - now I can't. This makes it really hard to have a client for the AI bots I've been making, where I'd like to have maximum compatibility with other mods - if I try and use it with anything right now I get "has taken the flag!" "left the mini-game." messages in the chat. I can hack it to work with the individual functions I want (e.g. deaths are replaced with a special message) but it really isn't useful for other mods.

Is there a way I can create an AIConnection with a set name or (better) a variable I can choose for it? Setting the "name" variable on creation works for older mods but not default Blockland messages or updated ones.

Not anymore, Badspot put full protection over *::getPlayerName().

Which makes no sense at all. Really he should just be protecting it for the GameConnection class, since it's the only one OTHER than AIconnections that will ever use it, and restricting it on AIconnections is more or less pointless.

Not anymore, Badspot put full protection over *::getPlayerName().

Which makes no sense at all. Really he should just be protecting it for the GameConnection class, since it's the only one OTHER than AIconnections that will ever use it, and restricting it on AIconnections is more or less pointless.
He did it because people were setShapeName'ing bots and putting them in the list of players, and then setControlObject'ing them

putting them in the list of players
Nope.

SetShapeName still doesn't work on bots. All that was done was spawning bots with shapenames. The names couldn't be edited.

Hurpaforgetindurp. I used to have the mod bro.

Hurpaforgetindurp. I used to have the mod bro.
I haven't seen any scripts that made use of aiconnection::getplayername other than ones I have written.

Well aren't you mister loving special.
« Last Edit: October 30, 2009, 11:09:07 PM by Jimmg »


Well aren't you mister loving special.
Well excuse me, I was only stating a fact. I've never seen it used before.

You also decided to whore out "other then the one's I've written"

You also decided to whore out "other then the one's I've written"
That sentence would no longer be true without that statement. I wasn't trying to imply it was a hard thing to do.