How to make AI player jump or fire?
by Nocera Luciano · in Torque Game Engine · 09/23/2006 (10:52 am) · 2 replies
I created an AI as follows:
$player = aiAddPlayer("Orc");
It creats an object of aiClient. Now I can make him move around or stop with the consolemethods or functions defined in aiClient.cc. However, I did not find functions to make AI jump or fire. How can I code in script to achieve this?
There is a function setAimLocation(%Location) in aiClient.cc. The AI did change the actual Aim location, which I use getAimLocation to know, however, the model did not move but kept the same posture as before. I can not see him "Aiming" at me at all from the screen. How to deal with that?
Also, I tried to creat AI using AIPlayer:
$player2 = AiPlayer::spawn("Orc2","325.202 364.894 220.258");
How can I make this kind of AI to move, jump, fire or aim at something?
Thanks very much for help in advance!
$player = aiAddPlayer("Orc");
It creats an object of aiClient. Now I can make him move around or stop with the consolemethods or functions defined in aiClient.cc. However, I did not find functions to make AI jump or fire. How can I code in script to achieve this?
There is a function setAimLocation(%Location) in aiClient.cc. The AI did change the actual Aim location, which I use getAimLocation to know, however, the model did not move but kept the same posture as before. I can not see him "Aiming" at me at all from the screen. How to deal with that?
Also, I tried to creat AI using AIPlayer:
$player2 = AiPlayer::spawn("Orc2","325.202 364.894 220.258");
How can I make this kind of AI to move, jump, fire or aim at something?
Thanks very much for help in advance!
#2
09/23/2006 (7:50 pm)
I am glad you posted that resource that is an incredible download. I will learn a lot from this :)
Torque Owner David Stewart