Page 3 of 4

Posted: Fri Nov 19, 2010 12:40 pm
by Kaks
Killer Wolf wrote:
could we press Shift N to arm the camera which would then auto shoot when an object is under the crosshairs? actually, combining this would also return the object id, thereby providing a way of confirming you've photo'd the right thing.
ooh - maybe a switchable camera HUD for when you Shift N...?
you could press shift N to prime and then N to toggle a piece of equipment between armed and unarmed (or any number of states, really)

you'd need 2 scripts - one equipment script to switch missionVariable.shinyThingStatus ( eg from 0 - unarmed to 1 - armed & back), and a world script that checks if missionVariable.shinyThingStatus is 1 before doing the deed...

You could then use shipTargetAcquired as a world event to automatically take snapshots whenever the player acquires a new target. At the moment I don't think there's an easy way to determine if the new target was acquired when switching missiles or by ident computer, but I might be wrong - ...or we might be able to add that info to the event handler in the near future...


About switchable HUDs: well, if you can code it, why not! :)
I seem to detect a slight misunderstanding between what shift-N & N actually do.
Just to be perfectly clear: shift-N (prime equipment) says: "I want to use this at some point in the future", N (activate equipment) says : "that thing I wanted to use? Do something with it now!"

By the way, shift-N goes forward through all the usable stuff, ctrl-shift-N goes backwards...

Posted: Fri Nov 19, 2010 12:53 pm
by Eric Walch
Kaks wrote:
In order to make this concept fully workable we also need to make sure that the player is looking forward, as well as having the ship pointing in the right direction...
Only when taking snapshots with his handheld camera through the window. He could also use the fixed camera in the nose of the ship. :wink:

Thinking of it... The angle is measured from the centre of the ship, not from the view position. And that angle should not be fixed but distance dependent. When very close to the target, a wider angle should be allowed. That is also relative easy triangular math: allowed deviation = Tangent(angle) * distance. (Both distance and deviation are in meters)
And for small angles, Tangent(angle) is about the same as angle, we could simplify that to: allowed deviation = angle * distance

Posted: Fri Nov 19, 2010 1:07 pm
by Smivs

Posted: Sat Nov 20, 2010 8:57 pm
by Eric Walch
I played a bit further with A_C's code and came up with:

Code: Select all

this.pictureCount = 10;

this.activated = function()
{
	var self = this.ship;
   var target = self.target;
	
	player.consoleMessage("Photo shot.");
	
	takeSnapShot();
	if (target)
	{
        var range = target.position.distanceTo(self.position) - target.collisionRadius;
        var minDistance = target.collisionRadius * 3; // screen filling
        var maxDistance = target.collisionRadius * 10; // 1/5 of screen filling
        var inRange =  (range < maxDistance && range > minDistance);
        var deviation = self.heading.angleTo(target.position.subtract(self.position)) * range; // deviation in meter. 
        var centered = (deviation < target.collisionRadius);
        if (inRange && centered)
        {
            worldScripts.photoCamera.photoConfirmed();
            player.consoleMessage("Object nicely framed");
        }

	}
    if (this.pictureCount-- < 1)
    {
        self.removeEquipment("EQ_PHOTOCAMERA");
        player.consoleMessage("Film is full");
    }
}
This code has a general value and is independent of object size. You can use it for vipers, as well as stations. Its just a shame you must buy a new camera after 10 shots :roll:

Posted: Sat Nov 20, 2010 9:49 pm
by Killer Wolf
"Its just a shame you must buy a new camera after 10 shots "

as long as we don't have to haul it to the local branch of BOots to get the film developed!

Posted: Sat Nov 20, 2010 11:32 pm
by DaddyHoggy
It's not BOots it's 'Bots

Image

Posted: Sun Nov 21, 2010 1:38 pm
by Thargoid
You realise of course I'm now going to have to fight the evil urge to write Speed Camera.oxp :twisted:

Posted: Sun Nov 21, 2010 7:31 pm
by Eric Walch
Thargoid wrote:
You realise of course I'm now going to have to fight the evil urge to write Speed Camera.oxp :twisted:
And I re-started working on my Achenar.oxp that I wrote about 2 years ago. It needed launch from a interstellar station. That never worked good because the station was transferred to normal space on launch.

In 1.75 there will be a station key to keep it in interstellar space. Its now a mission to write an article for the Tionisla chronicle. It needs an interview with an acherian on the station and a picture of that station. I scripted it up yesterday as a novice mission in G1. Now I must test-fly it, and than work on the content of the mission screens.

There will be 4 screens. Anybody better in english than me, that is volunteering to write them for me?

Posted: Sun Nov 21, 2010 7:38 pm
by Cody
Eric Walch wrote:
There will be 4 screens. Anybody better in english than me, that is volunteering to write them for me?
Tell me roughly what you want the screens to say, Eric, and I'll happily 'englishify' it.

Posted: Sun Nov 21, 2010 8:51 pm
by DaddyHoggy
El Viejo wrote:
Eric Walch wrote:
There will be 4 screens. Anybody better in english than me, that is volunteering to write them for me?
Tell me roughly what you want the screens to say, Eric, and I'll happily 'englishify' it.
Ditto what EV says - having written over 100+ News flashes for Snoopers and LH2 - I'm getting quite good at it - but EV gets first dibs as he offered first.

Posted: Sun Nov 21, 2010 11:05 pm
by Cody
You’re spoilt for choice, Eric… but seeing as how it’s to do with the Tionisla Chronicle, I'm sure that DH, the ferocious newshound from ‘Snoopers’, will have a much better idea of what you want.

Posted: Sun Nov 21, 2010 11:13 pm
by DaddyHoggy
El Viejo wrote:
You’re spoilt for choice, Eric… but seeing as how it’s to do with the Tionisla Chronicle, I'm sure that DH, the ferocious newshound from ‘Snoopers’, will have a much better idea of what you want.
Except it was Drew who wrote all the TC articles - Drew, where are you? :wink:

Posted: Mon Nov 22, 2010 9:34 am
by Eric Walch
DaddyHoggy wrote:
El Viejo wrote:
Eric Walch wrote:
There will be 4 screens. Anybody better in english than me, that is volunteering to write them for me?
Tell me roughly what you want the screens to say, Eric, and I'll happily 'englishify' it.
Ditto what EV says - having written over 100+ News flashes for Snoopers and LH2 - I'm getting quite good at it - but EV gets first dibs as he offered first.
Thanks both for the offer. A fully working wip-version is here. I enclosed two save games. One at the start and one at the destination. The scripting is fully working, only the "missiontext.plist" now needs working on. It currently holds one-line space holders for the mission pages.

I had no real texts in mind but the 5 pages I had in mind are roughly:

at Tionisla
1: On docking at Tionisla there must be a text to offer a job to write an article about "achenar" the hidden planet that according to rumours is found nearby Biorle.
2: when accepted the next screen gives some further details and installs the camera. Probably should it also explain how to activate the camera as this is a new 1.75 key. And the camera has only room for 10 pictures.

at achenar (misjump between Usle and Biorle)
3: On docking at the station you get some info about the planet. (there can't be a sun in interstellar space, so maybe something about living below the surface of the planet etc.)

at Tionisla
4: Success report and reward

at Biorle
5: becouse novices have no idea how to misjump I added a facultative page to hint how one must misjump. When jumping (and docking at main station) from Biorle->Usle->Biorle you get a page about traders often entering wormholes with pitch full up and never arriving at Usle.

(Or should I force a misjump here by script?)

Posted: Mon Nov 22, 2010 10:29 am
by Commander McLane
DaddyHoggy wrote:
El Viejo wrote:
You’re spoilt for choice, Eric… but seeing as how it’s to do with the Tionisla Chronicle, I'm sure that DH, the ferocious newshound from ‘Snoopers’, will have a much better idea of what you want.
Except it was Drew who wrote all the TC articles - Drew, where are you? :wink:
But it's you who is the award-winning author. :D

Posted: Mon Nov 22, 2010 11:57 am
by DaddyHoggy
Commander McLane wrote:
DaddyHoggy wrote:
El Viejo wrote:
You’re spoilt for choice, Eric… but seeing as how it’s to do with the Tionisla Chronicle, I'm sure that DH, the ferocious newshound from ‘Snoopers’, will have a much better idea of what you want.
Except it was Drew who wrote all the TC articles - Drew, where are you? :wink:
But it's you who is the award-winning author. :D
But Drew's the only one of us who has finished a novel (several times over), but that's for the thought! :wink: