Jump to content
Sign in to follow this  
Spooner

SPON Rangefinder

Recommended Posts

SPON Rangefinder v0.3.0

rangefindernoaddonsmy5.jpg

Compatible with NWD_scopeFix 2.2:

rangefinderwithnwdscopeeh9.jpg

Automatic fire mission marker placed at position of laser dot if the user of SPON Rangefinder has GPS. It is visible to everyone on your side (Off by default, but can be enabled in mission):

markergu2.jpg

- Released: 2008-09-05

- Install size: 44k (mission scripts) / 104k (addon version)

- (mission version) 100% scripts with no addon dependencies

- (addon version) Requires XEH (1.7 or higher), but this is included in the release.

- Requires ArmA 1.09 (or higher) and SPON Core (v0.5.1 or higher).

- See attached README.html for full details

Download

OFPEC (guaranteed up to date)

ArmAholic

Overview

Adds an overlay to the standard ArmA SOFLAM laser designator. It will show range while the designator is turned on. Azimuth and elevation are also shown, even if the laser is turned off.

Requires that the SPON Core be installed in the mission (v0.5.1 or higher). Both SPON Rangefinder and SPON Core are available in two versions: One is a client-side addon and the other is mission-script-based, which does not require any addons to be installed on client or server. SPON Rangefinder requires ArmA 1.14 or higher.

   * Rangefinder overlay shown when looking through the SOFLAM (a.k.a. Laser marker or laser designator).

   * Shows range to the laser-targetting point and, optionally, azimuth and elevation of the SOFLAM itself.

   * The display is accurate to 1m range or 1 unit (by default milliradians) for azimuth & elevation.

   * If the SOFLAM laser is turned off, then the last range value is shown for reference (only kept until the player stops looking through the SOFLAM).

   * Standard SOFLAM operation as a laser designator is completely unaffected.

   * Player can switch between showing the azimuth and elevation displays with 6000, 6283, 6300, 6400 mils, or in degrees, by pressing the reload button (defaults to 'R'wink_o.gif when looking through the laser designator.

   * Compatible with the NWD optics addon, if it is installed. NOTE: NWD has his own rangefinder addon available. It additionally requires the Extended Init Eventhandler addon be installed and it doesn't look as good without the NWD optics addon being installed.

   * Compatibility: SP/SP teamswitch - OK; MP - OK; MP JIP - see limitations, below.

As used in

   * CO-10 Bleeding Skies by Igor Drukov.

Limitations

   * While looking through a rangefinder, with the laser off, there is a significant hit to frames-per-second. This is in order to ensure that multiple range-finder users don't pick up the wrong laser dot. When the laser is on, or the rangefinder is not being used, then the CPU load is negligible.

   * If you turn the laser on while looking at the sky (or at the ground, beyond the maximum range), then the "laser-on" LED will not light (and the target will not be visible to those that can see laser targets) until you look at the ground within range (BLAME BIS!wink_o.gif.

   * If you turn the laser on at a viable target, then move to look at the sky (or at the ground, beyond your view range), then the "laser-on" LED will stay alight and the range will be shown to the last position the laser-marker pointed at that was viable. As far as the game is concerned, the marker is actually still in this "last position" and it can still be targetted by bombers (BLAME BIS!wink_o.gif.

Known Bugs

   * (Very unlikely, but possible) If two players on the same side turn on their rangefinders within a fraction of a second of each other, while looking at the same target (or at least in a similar direction), then one of them could incorrectly detect the wrong target. If this happens, they would only need to turn the rangefinder off and on again to get the correct reading.

Plans

None.

Credits

   * Thanks to Blanco for pointing out the full range of binocular animations.

   * Testing by The Regiment of Grenadier Guards [RGG] squad (http://www.rggsquad.co.uk). Thanks fellas!

   * Thanks to everyone at BIS and OFPEC forums for testing, feedback and suggestions.

   * Thanks to Solus for allowing me to include the XEH addon in the release (and, of course, for making the great addon in the first place!wink_o.gif

Change Log

v0.3.0 - First version available as an addon.

- Added

   * SPON_RF_targets array, which contains a list of all current laser target objects.

   * Can configure the type of rangefinder class used.

   * Player can switch between showing the azimuth and elevation displays with 6000, 6283, 6300, 6400 mils, or in degrees, by pressing the reload button (defaults to 'R'wink_o.gif when looking through the laser designator..

   * New function, SPON_RF_setMilsPer360Degrees, so that mils displayed can be altered via script if needed.

   * New function, SPON_RF_enableMapMarker, so that you can enable fire mission marker shown on map at laser position [suggested by Sickboy].

- Modified

   * "SPON_laserTargetFound" event renamed as "SPON_RF_targetFound"

   * Variable, "SPON_laserTargetOwner", added to each laser target object, renamed to "SPON_RF_owner".

   * Azimuth and elevation are now always shown, even if laser is not on (and even without batteries).

- Fixed

   * If two players on the same side turn on their rangefinders within a fraction of a second of each other, while looking at the same target (or at least in a similar direction), then one of them could incorrectly detect the wrong target. If this happens, they would only need to turn the rangefinder off and on again to get the correct reading.

   * Battery LED is still lit if the player isn't carrying any laser batteries.

(See readme.html for full details of changes before current version).

<a href="http://www.flashpoint1985.com/cgi-bin/ikonboard311/ikonboard.cgi?act=ST;f=70;t=74601" target="_blank">

spooneroq2.jpg</a>

Share this post


Link to post
Share on other sites

I tried this with the PBO addon version, I have NWD sights and it looks great, although I noticed when in mission editor the overlays and coords show up on boniculars also, is that supposed to happen?

I saved the mission to a SP PBO and then played via missions - load, and although range finder works on init and after a resume I notice on init even though ive - addweapon "binoculars" - I have no binos once I run as SP mission (in editor bino's are avaialble but with this mods overlay)

So

1. Overlays attatch to binos (havent tried without NWD sights)

2. In mission bino's added to player are missing on mission init.

Share this post


Link to post
Share on other sites

Interesting bugs you bring up here. The only time I can imagine that you'd see the overlay on binocs would be if you were carrying both binocs and designator, which you can't do by picking things up naturally, but you can with addWeapon (just as you can carry 400 rifles with addWeapon if you really want to ;P). Actually something I can fix quite easily, but since it can't happen naturally, it isn't something I'm going to rush to work on (though since the method I'd use to fix it would be more elegant than the method I use right now, it think I should fix it anyway).

On the other hand, you can give people access to the azimuth/elevation readings inside the regular binocs if you want (though, of course, you won't be able to use it as a rangefinder or designator). You'd just add to init.sqf:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

["binocular"] call SPON_RF_setLaserDesignatorClass;

You can also just give a player the designator without a battery, to allow azimuth/elevation readings with that device, without the rangefinder or designator functionality being available.

My scripts do nothing more invasive than hasWeapon, so I can't see how they could remove your binocs. That is an odd one...Perhaps double check that and email me a simple test mission that shows this happening if you can't sort that out?

Share this post


Link to post
Share on other sites

Thanks for reply.

Ok I tried it with no laser kit added with addweapon (you were right thats how I had it with Bino's).

So I saved and loaded as SP mission. I used the addon that gives you "dialogue" in your menu (cant remember name but it adds laser/silencer/repair as a conaole menu when selected) si I can add laser marker after mission loaded and init. All ok, binoc's again use same overlay (to be honest mistake or not it looks pretty sweet  tounge2.gif ) and this time my binos are not missing (i do not know what heppened with that so ignore it).

So as you say addweapon way for bino's / laser marker will overlay with your mod. Anyway, its great and works fine in resumes (NWD's didnt it would pause alot on "mark" and not work on resumed missions).

Share this post


Link to post
Share on other sites

It isn't entirely a mistake that you get the angles in binocs, since I knew if you set the laser designator class to binocs you'd just get the angle values overlay on the binocs. I didn't consider that you would get it on both binocs and LD if either of them were set as SPON Rangefinders (but as you can only carry both by addweaponing, this isn't a real bug ;P).

I'd like to make the LD work on the B key, but although I can allow you to change to LD, I can't un-select LD and go back to previous weapon (impossible to know weapon you are using with absolute certainly and can't know or re-select current firing mode anyway - oh for "currentWeapon", "currentFireMode" and "selectFireMode" in ArmA 2 whistle.gif). Not sure whether to allow this switch-to-LD one-way, if I can't take it back again. This would mess up things if you did have both LD and binocs, but that shouldn't happen normally, so I don't think anyone can complain.

Yes, several people have asked me to re-release this old script as an addon, since they weren't happy with NWDs. Sorry that I dragged my feet on that...

Share this post


Link to post
Share on other sites

Sorry mate, not suggesting anything like bad coding or bug issues, i understand using addweapon way isnt the most realistic way, so Im cool with how it is now anyway.

Looks great for both to be honest especialy with NWD's binoc sight  pistols.gif

I wouldnt fix what isnt strictly broken just for addweapon folk, but I would say maybe add to readme's and thread post as a note about this way of working. Unless of course you do find a solution anyway.

One question as it raises a slight OT part of this, what exactly would be the situation with laser designator, is it the case that would be assigned to a certain infantry type only and binos to spotter or team leader = real situation you dont get bionos and laser designator in one kit for a soldier. BTW everything im doing right now is SP only.

Share this post


Link to post
Share on other sites

Well, since an LD is just "special" binocs, I'd doubt that individuals would be issued with both. Since the game model is the SOFLAM, rather than the tripod-mounted GLTD II, it isn't really much more cumbersome than using binocs (well, not enough that I'd want to lug around binocs as well, but that is just a guess, since I know the military isn't always logical).

The in-game model is the SOFLAM, which strictly just has a simple rangefinder display, without the angles displayed, whereas the GTLD 2 does have those values shown (the SPON and NWD displays are laid out based on GTLD 2). Looking at those documents again, I realise that in both devices, the LEDs should all be in red, not green. Hmm, not sure about whether to change that to be correct.

Share this post


Link to post
Share on other sites

When I use this I cannot adjust my sights using GMJ's sightadjustment addon sad_o.gif That is very important for me.

Share this post


Link to post
Share on other sites
When I use this I cannot adjust my sights using GMJ's sightadjustment addon  sad_o.gif  That is very important for me.

download this

http://www.ofpec.com/forum/index.php?topic=31384.0

use the

S_displayEventHandler_KeyUp.pbo

S_displayEventHandler_KeyDown.pbo

S_KeyDown_SightAdjustmentFix.pbo

from it ... should work

Share this post


Link to post
Share on other sites

anyone using that S_NVG nightvision brightness adjustment mod with the SPON rangefinder?

I cant get the two to work together.. The NVG fixes just dont seem to be loaded.. yet they both should be XEH compat. Anyone else having issues?

Share this post


Link to post
Share on other sites
When I use this I cannot adjust my sights using GMJ's sightadjustment addon  sad_o.gif  That is very important for me.

download this

http://www.ofpec.com/forum/index.php?topic=31384.0

use the

S_displayEventHandler_KeyUp.pbo

S_displayEventHandler_KeyDown.pbo

S_KeyDown_SightAdjustmentFix.pbo

from it ... should work

Thanks a ton!

Share this post


Link to post
Share on other sites
@sandzibar: The issue isn't with XEH, but rather with key event handlers, as was the question about SightAdjustment. Have you tried the version that shole fixed for use with his DEH?

ill give that a go. thanks spooner.

edit: yep that latest DEH compat version via that link has fixed all issues. thanks again.

Share this post


Link to post
Share on other sites

Yay for compatibility!

I forgot to post this image in my first release:

Automatic fire mission marker placed at position of laser dot if the user of SPON Rangefinder has GPS. It is visible to everyone on your side (Off by default, but can be enabled in mission):

markergu2.jpg

Share this post


Link to post
Share on other sites

Tried the map marker aspect of this on a MP server last night.. other people however were unable to see my laser des map marker. Does support for this feature have to be coded into the mission itself then?

Doesnt matter hugely though as I just overlay it with a manually placed marker of my own if needs be.

Very handy for calling in accurate arty though. makes it almost too easy smile_o.gif

Share this post


Link to post
Share on other sites
Tried the map marker aspect of this on a MP server last night.. other people however were unable to see my laser des map marker. Does support for this feature have to be coded into the mission itself then?

Doesnt matter hugely though as I just overlay it with a manually placed marker of my own if needs be.

Very handy for calling in accurate arty though. makes it almost too easy smile_o.gif

i was wondering that too, maybe if it's possible to show 'default' ArmA marker+text for these who don't have the SPON RF (incase You using the clientside addon)?

Share this post


Link to post
Share on other sites

Absolutely! The use of the marker makes things very easy, but I included it because I can't see that it wouldn't be realistic and some people might like it. I didn't think that it was a reasonable feature to add to a mission from a client-side addon though, which is why it is off by default, unless manually enabled in the mission.

To use map marker effect, map markers must be enabled in the mission and:

* Everyone that wants to see the laser map markers has to have Core/Rangefinder addon. Anyone without will not have errors; they will just not see the markers on their copy of the map.

OR

* Core/Rangefinder scripts are in the mission itself, which will obviously give everyone access to all the Rangefinder functionality.

If you want to force SPON Rangefinder to be loaded before playing the mission, then add "SPON_Rangefinder" to the list of addons in your mission.sqm. Alternatively, something I keep forgetting to add to the addon is a "Require SPON Rangefinder" gamelogic, so you can just drop that into the mission to force players to have the addon without touching the sqm. I need to update anyway with a few minor fixes and features, so hopefully I'll remember it this time ;P

Share this post


Link to post
Share on other sites

btw what you think about that look around andy addon for binocs and laserfinder ... but SPRF overlay stays in view ...

any solution? like optional global variable to on/off the overlay ?

Share this post


Link to post
Share on other sites

Fixed the issue, but it requires ArmALib being used client-side. This will be optional, so if you don't have ArmAlib but use Andy or SLX laser designators with my script, you'll still get the overlay problems.

Expect an update in the next few days (want to put a few other little things in the new release).

Share this post


Link to post
Share on other sites

D add to list?  :-D

Amazing work, mate & sorry for this late message. I kept overlooking this this thread till I was testing andersson's binoculars...

I love the functions, they should be great especially for larger coops, such as Warfare

Edit: Oh wow, there's a lot more! I didn't know you made an add on version of your freehand-drawing-on-maps-thingie! Thank you, scripting god!

Share this post


Link to post
Share on other sites

Yeah, sure, though it wasn't immediately apparent what list you were referring to! I only really follow the OFPEC forums; just taking advantage of this one for publicity ;P

Ironically, none of my stuff works well with Warfare, since it both uses non-shared key events (could use shole's Display Event Handler

to multiplex key events) and removes any actions you add to player (bad use of removeAction). Can't get around that...

Share this post


Link to post
Share on other sites

Cheers, mate & sorry. I was in a hurry and didn't post a proper link.

I'll add some stuff in that was particularly useful in my opinion - but I suggest everyone check out the ingenious stuff you created ... it's stunning. Thank you for sharing this with the community :-)

Share this post


Link to post
Share on other sites

Sorry I've got this message when I start a mission

0:00:00.130: Assertion failed!: SPON\Core\initCore\n\nAssertion (time == 0) failed!\ntime: 0.13\n0: 0\n\nSPON Core must be run at the very start of the mission

What's the problem ?

Share this post


Link to post
Share on other sites

Sorry, the problem is actually in XEH and/or SPON Core, rather than in the Rangefinder itself. The cause and solution are different depending which version you are using.

Addon version: It is because every soldier in the mission starts out inside a vehicle (not a single player or AI on foot). This isn't a problem any more though, as long as you use XEH 1.9 or higher (the zip includes XEH 1.7).

Mission version: This means you are running initCore.sqf after the mission has started. Run it at the top of your init.sqf rather than after any waituntil/sleep.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×