PDA

View Full Version : How to make a compass that points towards the NEAREST enemy?


ash844677
11-27-2013, 11:50 PM
The title says it all. I know how to make a regular compass and make it point at a pre defined object. but how to make it point towards the nearest enemy?

GameKid
12-01-2013, 09:09 PM
Under functions you should find a "Spatial relations" tab, which contains functions that return depending on how close the selected object is to something, how far to the left, etc.

sfunk
12-04-2013, 06:11 PM
This can be pretty glitchy if you want it to be a constantly updated function,

Here is a tutorial world for it.