The S2A module is not supposed to be tattered ;). You can take bits and peaces, but this is only recommended if you have a good grasp of Python. Otherwise you will miss important parts.
The general idea behind S2A is that it uses the connected sensors AND the connected actuators. This means you always need both, even if you think you do not. (this is the reason why it is called S2A= Sensors-to-Actuators)
In your specific case it is like that:
> Near sensor “any filter property you like”
–> Python Module:S2A.closestHitObjectToObject
----> TrackToActuator (the object field will be set by the above python call)
See layer <alt+3> in scene S2A_1.4_test (test together with layer <2>)
What it does:
The sensor senses the enemies (by property)
The controllers picks the closest, sets up the actuator to use this object and activates the actuator
The actuator tracks the object until deactivation or getting a different one
Under system mouse cursor
To place an object at the hitpoint under the system mouse cursor:
> Mouse over any (true pulse)
–> Python Module: S2A.hitPositionToPosition
----> any actuator that is owned by the object to be placed (usually the same object as the owner of the controller)
See layer <alt+4> in scene S2A_1.4_test (you can test together with layer <3>)
This method runs in perspective view as well as in orthogonal view.
what it does:
The sensor senses for faces under system mouse cursor by firing a ray along this line.
The controller reads the detected hitposition and places each owner of the actuators at this position.
The actuator will not do anything (it just provide the object to be placed)