Game Development Community

Multiple bots sharing an AI algorithm

by ZuNdFoLGe · in Technical Issues · 03/19/2007 (6:18 pm) · 2 replies

Hi, I want to make 2 different type bots (obviusly with different models) which share an AI algorithm. Because both will have things on common, except some parameters, but I use different models for each one.
Any idea???

About the author

Recent Threads

  • Suicide...
  • AI on enemy

  • #1
    03/19/2007 (8:59 pm)
    I'm no AI expert but I made a program that had melee bots and casting bots run on the same algorithm. You could have completely different models, speeds, etc. I'm not entirely sure what you want to know...
    This is what I did basically -

    %ai = new AIPlayer() {
    datablock = "Karate";
    position = "513 133 131";
    }
    
    schedule(100,0, aiAlgorithm, %ai);
    
    %ai2 = new AIPlayer() {
    datablock = "Kungfu";
    position = "513 133 131";
    }
    
    schedule(100,0, aiAlgorithm, %ai2);

    function aiAlgorithm(%ai)
    {
    bla bla bla
    }
    #2
    03/21/2007 (11:10 am)
    Ok, I should declare as many instances of AIPlayer as types of bots i want. I'm going to prove this...thx!