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???
Any idea???
#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!
Torque Owner Christian
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 }