I have a game I am currently making, and I want to make enemies that will face my character then shoot. I was able to do this easily without even needing Python scripts, but I have one problem; My enemy will only face my character after passing the enemy's y-axis (That's what the track axis is set to.) I have a ray sensor to track the same axis as the Track To actuator's track axis (once again, Y). I would like to make the Track To actuator start tracking the moment the enemy is created (as of now it's when the game starts) rather than when the player passes in front of the enemy. Anyone got a non-complicated way of fixing this issue? Anyone got ANY resolve for this?
1 Answer
$\begingroup$
$\endgroup$
1
You want to start tracking when the object is created -> activate the TrackToActuator with an AlwaysSensor.
Be aware the ray sensor measures along local axis. This means it turns with the object. The Sensor will only evaluate positive when detecting an object (= must block the ray). In other words tracking starts after seeing an enemy.
-
$\begingroup$ Thanks! I think I know a little more about sensors, and this was a big help! $\endgroup$ Commented Apr 6, 2018 at 17:46