By manually aim, do you mean you really need to specify a vector? It would be better just to tell the turret which ship you want it to target by changing its .Target. Not only would that be much easier, but it wouldn't be "out of date" as soon as the target ship moved and you wouldn't have to worry about manually firing the turret either. The only use I can think of for specifying the vectors manually is if you want to aim at a specific part of a large ship, but it would be a nightmare to work out the orientations, distances and model features. Maybe your situation is one I haven't considered though, so here's a rapid rundown of how those functions should work:
Assuming you've loaded a subsystem (which is a turret) handle into a variable called t and a ship handle into a variable called s:
pos = s.LastPosition --Loads the last position of the ship into the variable pos (now a vector object)
t:rotateTurret(pos, false) --Rotates the turret to face pos
Here's a sample script: create a mission with a ship called "ship" (an Orion or something is a good choice). Every time you press the 1 key all of its turrets will rotate to face you. Here the ship handle is hv.Player, and the turret handle(s) are stored in s.
#Conditional Hooks
$Application: FS2_Open
$State: GS_STATE_GAME_PLAY
$On Key Pressed:
[
if hv.Key == "1" then
local pos = hv.Player.LastPosition
local s = mn.Ships['ship']
for i=1,#s do
if s[i]:isTurret() then
s[i]:rotateTurret(pos, false)
end
end
end
]
#End
Edit: Localising variables for the sake of good practice.