Aiplayer
by SIMONE NUNES · in Torque Game Engine · 05/02/2010 (6:38 pm) · 2 replies
Hello everybody, my name is Simone, I am Brazilian and I wonder if there's someone who can help me. I'm needing to know how to do a aiplayer follow the player when there is a collision of the player with the aiplayer. Thanks
#2
[It baffles me why there isn't a setMoveObject method... that seems like it'd be pretty useful.]
05/03/2010 (4:42 pm)
Here's a good AI tutorial. Combine that with the onCollision introduction you have in GettingStarted.pdf and you should have some idea. The only tricky thing is getting the AIPlayer to follow you continuously. Look up the schedule function.[It baffles me why there isn't a setMoveObject method... that seems like it'd be pretty useful.]
Torque Owner Infinitum3D
www.garagegames.com/index.php?sec=mg&mod=resource&page=category&qid=...
First thing, as always BACK-UP YOUR FILES!!!
In AIPlayer.cs in the onCollision function you need something like this;
%this.setMoveDestination(%playPos);
%this.move();
Note: That is purely theoretical. I don't know if that exact code will work.
Post #67 here may help:
www.torquepowered.com/community/forums/viewthread/51854