Author Topic: bot respawn  (Read 968 times)

ok so i have a little problem..

i've found that i cant make the bot respawn.
i've been thinking of making it leave the minigame, and then rejoin straight away.

heres the code for this section that im talking about:
Code: [Select]
function AIPlayer::OnDeath(%this)
{
    if(!isobject(%this.minigame)) return;
    %this.dead = true;
    %this.minigame.removemember(%this);
}

if there is a way of doing it without making the bot leave and re-enter the minigame, could you tell me?

edit: i might try making myself say: /createnewbot
« Last Edit: July 11, 2009, 07:33:20 AM by Quintano Man »

Why are you adding a player object to a minigam's client list? That could cause all sorts of horrible errors with mods using minigames.

well, i guess because these bots fight the players, and the only way to kill a player is in a minigame, without the player-kill events (that i know of at least).
this wont be released so it will only cause errors for me, and i dont have any minigame mods.


You should use an AIConnection as a client, not the bot itself.

is that to make the bot respawn? if it isnt, then i'll do it later, right now i just wanna get it respawning.
whats the command to make a player say a / command, but without it being seen? i've forgotten..
i tried using commandtoserver("/texthere");  but it just crashes my blockland.

ohh wait, just figured out what you said, so that would stop some of the errors. k, i will do that later, but till then, i wont.
« Last Edit: July 11, 2009, 09:09:27 AM by Quintano Man »

This is going to be a server sided script, and commandToServer is only going to work client-sided. Use serverCmdNAME(BotClient, arg1, argN);.

oh ok, thanks.

EDIT: so the NAME bit is going to be my name? on my server?
got it
« Last Edit: July 11, 2009, 09:29:15 PM by Quintano Man »

fixed, thanks guys
« Last Edit: July 13, 2009, 07:49:06 AM by Quintano Man »

Whatever your servercmdCreateNewBot accepts?