Page 2 of 2
Re: [WIP]Target Tracker OXP
Posted: Sun Mar 27, 2011 5:18 pm
by Zireael
JJP wrote:Okti wrote:To make it more clear,
This OXP, when activated changes the ships orientation so that it always follows the target all the way. [...]
I have to admit I like the idea of this piece of equipment. But, to make it more realistic you should take the ship's manoeuvrability capabilities into account. The instant realignment of the ship's orientation is highly unrealistic.
Furthermore, it would be nice if the equipment worked more like an autopilot. At the moment the
Target Tracker overrides your ship's steering completely. I'd like to see a version which lets you operate your ship as usual, but keeps realigning your ship on target when you're not steering yourself.
Seconded.
Re: [WIP]Target Tracker OXP(version 0.2 RELASED)
Posted: Sun Mar 27, 2011 8:10 pm
by Okti
Zireael wrote:JJP wrote:Okti wrote:To make it more clear,
This OXP, when activated changes the ships orientation so that it always follows the target all the way. [...]
I have to admit I like the idea of this piece of equipment. But, to make it more realistic you should take the ship's manoeuvrability capabilities into account. The instant realignment of the ship's orientation is highly unrealistic.
Furthermore, it would be nice if the equipment worked more like an autopilot. At the moment the
Target Tracker overrides your ship's steering completely. I'd like to see a version which lets you operate your ship as usual, but keeps realigning your ship on target when you're not steering yourself.
Seconded.
Thanks guys, but it will require a bit of clever thinking to achieve that. I will give a try when I have more time. Actually its purpose was completely different. I was working on an OXP which ment to have good visual show, and I didn't want the player to miss that show. Tried timers first but u can fire a timer only 4 times a sec. So it is like dynamite, invented to be used for construction not destruction
Re: [WIP]Target Tracker OXP(version 0.2 RELASED)
Posted: Sun Mar 27, 2011 8:33 pm
by another_commander
Okti wrote:Tried timers first but u can fire a timer only 4 times a sec. So it is like dynamite, invented to be used for construction not destruction
I believe what you are looking for here is
frame callbacks, introduced in 1.75. It's probably not going to be exactly simple, but it should be possible to re-orient the ship smoothly.
Re: [WIP]Target Tracker OXP(version 0.2 RELASED)
Posted: Sun Mar 27, 2011 8:37 pm
by Okti
another_commander wrote:Okti wrote:Tried timers first but u can fire a timer only 4 times a sec. So it is like dynamite, invented to be used for construction not destruction
I believe what you are looking for here is
frame callbacks, introduced in 1.75. It's probably not going to be exactly simple, but it should be possible to re-orient the ship smoothly.
Thanks another_commander, that is how I've done this
Code: Select all
this.activateTracking = function()
{
this.trackId = addFrameCallback(this.trackTarget);
player.commsMessage("Target tracking activated.",6);
}
this.deactivateTracking = function()
{
if(isValidFrameCallback(this.trackId))
{
removeFrameCallback(this.trackId);
player.commsMessage("Target tracking deactivated.",6);
}
}
this.trackTarget = function()
{
if (!player.ship.target)
{
// this.deactivateTracking();
}
else
{
if (player.ship.viewDirection == "VIEW_FORWARD")
{
var targetVector = player.ship.target.position.subtract(player.ship.position).direction();
var angle = player.ship.heading.angleTo(targetVector);
var cross = player.ship.heading.cross(targetVector).direction();
player.ship.orientation = player.ship.orientation.rotate(cross,-angle);
}
else if(player.ship.viewDirection == "VIEW_AFT")
{
var targetVector = player.ship.target.position.subtract(player.ship.position).direction();
var angle = player.ship.heading.multiply(-1).angleTo(targetVector);
var cross = player.ship.heading.multiply(-1).cross(targetVector).direction();
player.ship.orientation = player.ship.orientation.rotate(cross,-angle);
}
}
}
Re: [WIP]Target Tracker OXP(version 0.2 RELASED)
Posted: Sun Mar 27, 2011 8:52 pm
by Okti
And also I appreciate developers to download the code, and comment on what we can use instead of the ones we used.
Being new to javascripting, I may not know which blocks of the code will run more efficiently. I think which we need is a good javascripting do'es and donts to guide us all.
Re: [WIP]Target Tracker OXP(version 0.2 RELASED)
Posted: Fri May 13, 2011 10:10 am
by maik
Added it to the WIP section of the [wiki]OXP List[/wiki].
Re: [WIP]Target Tracker OXP(version 0.2 RELASED)
Posted: Fri May 04, 2012 9:58 am
by Duggan
I really love this , It is particularly useful for keyboard pilots where manouverability is significantly less than joystick . It is a great way of locking onto the more zippier foes..Ferdis,Asps and Thargoids in particular. I find myself sadisitically amused that when the Asps or Ferdies decide to flee its already way too late for them. Another aspect is the ability to interupt Pirates who are busily Pirating and I could almost swear that when such Pirates are surprised in this manner , they demonstrate something in the way of shocked surprise akin to "What the Hell!"
Re: [WIP]Target Tracker OXP(version 0.2 RELASED)
Posted: Wed May 09, 2012 9:05 pm
by Bazabaza
What would be more useful, and kick me if this already exists and I've missed it - is a way that the ship can match speed, but not direction with another ship. Useful when escorting?
Re: [WIP]Target Tracker OXP(version 0.2 RELASED)
Posted: Sat Jun 09, 2012 7:26 am
by Rese249er
I agree with bazabaza. In fact, I'd go as far as to say that to make this functionality more balanced, the speed and orientation are kept on track, but the weapons are forced off-line. You could automatically stay on their tail, but you'd have to offline the tracker to fire. Perhaps an entirely new OXP, Escort Tracker.
Re: [WIP]Target Tracker OXP(version 0.2 RELASED)
Posted: Sat Jun 09, 2012 2:10 pm
by Tricky
Rese249er wrote:I agree with bazabaza. In fact, I'd go as far as to say that to make this functionality more balanced, the speed and orientation are kept on track, but the weapons are forced off-line. You could automatically stay on their tail, but you'd have to offline the tracker to fire. Perhaps an entirely new OXP, Escort Tracker.
Something like the Flight Formation Autopilot equipment in the
Rescue Stations OXP by cim.
Re: [WIP]Target Tracker OXP(version 0.2 RELASED)
Posted: Sat Jun 09, 2012 2:14 pm
by Rese249er
Yes, except without making it exclusively lock-on to certain ships. That way, if you wanted to, say, follow a liner on its tour of the chart, you could.
Re: [WIP]Target Tracker OXP(version 0.2 RELASED)
Posted: Wed Jan 09, 2013 1:20 pm
by Duggan
I'm not sure if it is this oxp but in thargoid infested interstellar space in 1.77 this oxp malfunctions somewhat. It works fine in planetary systems though.
edit scrub that, it works fine now. it was another fx oxp conflicting with it.