Usage of onTargetEnterLOS and onTargetExitLOS
by Jinnie Ong · in Torque 3D Professional · 08/17/2009 (1:53 am) · 3 replies
Hi all, I've been trying out the example in the Advanced 3D Programming All in One book; more specifically, the Guard AI. It didn't work out of the box (as expected), so I'm now looking through all the code in an attempt to find out what the problem is.
The code in question can be found here: http://www.garagegames.com/community/forums/viewthread/35203
I've noticed that the DoScan function does not pick up the player character, and on further inspection, I can't find the onTargetEnterLOS implemented from anywhere. So I'm wondering if it is a function that is only implemented in TGEA and below (which seems quite unlikely).
At the moment, the bot is pretty much just standing there, staring into blank space. Anyone can provide any insight as to what is wrong or perhaps with experience implementing the code in T3D? Thank you!
The code in question can be found here: http://www.garagegames.com/community/forums/viewthread/35203
I've noticed that the DoScan function does not pick up the player character, and on further inspection, I can't find the onTargetEnterLOS implemented from anywhere. So I'm wondering if it is a function that is only implemented in TGEA and below (which seems quite unlikely).
At the moment, the bot is pretty much just standing there, staring into blank space. Anyone can provide any insight as to what is wrong or perhaps with experience implementing the code in T3D? Thank you!
Torque 3D Owner Jinnie Ong
However it seems to loop through the motions for half a minute, then stops entire, so I'm currently checking out why that's the case.
Another thing, the bot seems to be aiming at the ground instead of directly at me, one thread recommended the use of aimAt(%player) instead of aimAtObject(%player), however that didn't seem to work out either. There was another resource mentioning how to correct this issue but I didn't bookmark it then, and now I can't find it. Any idea how to change the target location?