Author Topic: Adding AI's to minigames.  (Read 1596 times)

Hmm.  First, make sure your minigame == $RPGMini.  Then, make sure the bot's minigame == $RPGMini.  You don't even need to do the addMember().  As long as the bot's minigame is equal to the one you're in and damage is turned on, the bot should take damage and experience other minigame effects just as you would.


Ok.  Try this:

Code: [Select]
if(isObject($RPGMini))
{
     %minigame = $RPGMini;
}
else
{
     %minigame = 0;
}

%botclient = new ScriptObject()
{
     minigame = %minigame;
}

//And when you add your AIPlayer (%bot)

%bot.client = %botclient;
%bot.Player = %bot;

My bad, It does work, the weapon wasn't working ><

Thanks guys

Heh.  No problem.  Give this topic a lock then?


Ok well I've unlocked this because I need help again.

I can kill the bots but they can't damage me:

Code: [Select]
%bot.client = new scriptObject(){
class = "AiClient";
player = %bot;
minigame = $RPG_Mini;
};

That's how I'm adding them to the minigame.

After the bot client and player objects are defined, try using the addMember() method.