Join us at the Oolite Anniversary Party -- London, 7th July 2024, 1pm
More details in this thread.

[WIP]Target Tracker OXP(version 0.2 RELASED)

Discussion and information relevant to creating special missions, new ships, skins etc.

Moderators: another_commander, winston

Zireael
---- E L I T E ----
---- E L I T E ----
Posts: 1396
Joined: Tue Nov 09, 2010 1:44 pm

Re: [WIP]Target Tracker OXP

Post 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.
User avatar
Okti
---- E L I T E ----
---- 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)

Post 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 :evil:
My OXP's
And Latest Mission Coyote's Run
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6557
Joined: Wed Feb 28, 2007 7:54 am

Re: [WIP]Target Tracker OXP(version 0.2 RELASED)

Post 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 :evil:
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.
User avatar
Okti
---- E L I T E ----
---- 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)

Post 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 :evil:
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 :D

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);
		}
		
	}
}
My OXP's
And Latest Mission Coyote's Run
User avatar
Okti
---- E L I T E ----
---- 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)

Post 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.
My OXP's
And Latest Mission Coyote's Run
User avatar
maik
Wiki Wizard
Wiki Wizard
Posts: 2020
Joined: Wed Mar 10, 2010 12:30 pm
Location: Ljubljana, Slovenia (mainly industrial, feudal, TL12)

Re: [WIP]Target Tracker OXP(version 0.2 RELASED)

Post by maik »

Added it to the WIP section of the [wiki]OXP List[/wiki].
Duggan
---- E L I T E ----
---- E L I T E ----
Posts: 496
Joined: Sat Dec 31, 2011 2:58 pm

Re: [WIP]Target Tracker OXP(version 0.2 RELASED)

Post 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!" :)
Flying Python Class Cruiser, Chapter & Verse IV
Bazabaza
Above Average
Above Average
Posts: 20
Joined: Sun Jun 19, 2011 8:26 pm

Re: [WIP]Target Tracker OXP(version 0.2 RELASED)

Post 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?
User avatar
Rese249er
---- E L I T E ----
---- 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)

Post 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.
Got all turned around, lost my nav connection... Where am I now?
User avatar
Tricky
---- E L I T E ----
---- 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)

Post 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 [EliteWiki] Rescue Stations OXP by cim.
User avatar
Rese249er
---- E L I T E ----
---- 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)

Post 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.
Got all turned around, lost my nav connection... Where am I now?
Duggan
---- E L I T E ----
---- E L I T E ----
Posts: 496
Joined: Sat Dec 31, 2011 2:58 pm

Re: [WIP]Target Tracker OXP(version 0.2 RELASED)

Post 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.
Flying Python Class Cruiser, Chapter & Verse IV
Post Reply