Detecting the controlling object
by Kaj Eijlers · in Torque Game Engine · 06/14/2006 (7:14 am) · 1 replies
Hi, I'd like to implement a module where I can have an AI take over the human player and back at any time in the game.
In order to do this, ll have to detect whether it is my AIPlayer or the human who's currently controlling the game.
If I use the ServerConnection.getControlObject() to get the handle of the controlling object, I get something, but how do I find out if it has anything to do with the camera or the player since both are actually different handles? And if I should not use ServerConnection.getControlObject what should I use?
In order to do this, ll have to detect whether it is my AIPlayer or the human who's currently controlling the game.
If I use the ServerConnection.getControlObject() to get the handle of the controlling object, I get something, but how do I find out if it has anything to do with the camera or the player since both are actually different handles? And if I should not use ServerConnection.getControlObject what should I use?
Torque Owner Stefan Lundmark