Seconded.JJP wrote: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.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. [...]
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.
[WIP]Target Tracker OXP(version 0.2 RELASED)
Moderators: winston, another_commander
Re: [WIP]Target Tracker OXP
- Okti
- ---- E L I T E ----
- Posts: 700
- Joined: Sun Sep 26, 2010 1:51 pm
- Location: A GH shop, near witchpoint to Oresrati in Galaxy 8
Re: [WIP]Target Tracker OXP(version 0.2 RELASED)
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 destructionZireael wrote:Seconded.JJP wrote: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.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. [...]
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.
-
- Quite Grand Sub-Admiral
- Posts: 6682
- Joined: Wed Feb 28, 2007 7:54 am
Re: [WIP]Target Tracker OXP(version 0.2 RELASED)
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.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
- Okti
- ---- E L I T E ----
- Posts: 700
- Joined: Sun Sep 26, 2010 1:51 pm
- Location: A GH shop, near witchpoint to Oresrati in Galaxy 8
Re: [WIP]Target Tracker OXP(version 0.2 RELASED)
Thanks another_commander, that is how I've done thisanother_commander wrote: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.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
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);
}
}
}
- Okti
- ---- E L I T E ----
- Posts: 700
- Joined: Sun Sep 26, 2010 1:51 pm
- Location: A GH shop, near witchpoint to Oresrati in Galaxy 8
Re: [WIP]Target Tracker OXP(version 0.2 RELASED)
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.
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.
- maik
- Wiki Wizard
- Posts: 2028
- Joined: Wed Mar 10, 2010 12:30 pm
- Location: Ljubljana, Slovenia (mainly industrial, feudal, TL12)
Re: [WIP]Target Tracker OXP(version 0.2 RELASED)
Added it to the WIP section of the [wiki]OXP List[/wiki].
Re: [WIP]Target Tracker OXP(version 0.2 RELASED)
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!"
Flying Python Class Cruiser, Chapter & Verse IV
Re: [WIP]Target Tracker OXP(version 0.2 RELASED)
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?
- Rese249er
- ---- E L I T E ----
- Posts: 647
- Joined: Thu Jun 07, 2012 2:19 pm
- Location: Well, I WAS in G3...
Re: [WIP]Target Tracker OXP(version 0.2 RELASED)
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.
Got all turned around, lost my nav connection... Where am I now?
- Tricky
- ---- E L I T E ----
- Posts: 821
- Joined: Sun May 13, 2012 11:12 pm
- Location: Bradford, UK. (Anarchic)
Re: [WIP]Target Tracker OXP(version 0.2 RELASED)
Something like the Flight Formation Autopilot equipment in the Rescue Stations OXP by cim.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.
- Rese249er
- ---- E L I T E ----
- Posts: 647
- Joined: Thu Jun 07, 2012 2:19 pm
- Location: Well, I WAS in G3...
Re: [WIP]Target Tracker OXP(version 0.2 RELASED)
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.
Got all turned around, lost my nav connection... Where am I now?
Re: [WIP]Target Tracker OXP(version 0.2 RELASED)
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.
edit scrub that, it works fine now. it was another fx oxp conflicting with it.
Flying Python Class Cruiser, Chapter & Verse IV