Jump to content
Sign in to follow this  
NonWonderDog

Working GTLD II Rangefinder

Recommended Posts

Then it's doing what I thought it would do.

I've fixed that, though, in:

NWD_Rangefinder v0.8

# Now works no matter how the laser designator is added to your inventory; no longer depends on SF Recon.

# Now recognizes launcher + binoculars animation

The link is in the first post.

I don't know about that divide by zero error, though. I can't recreate it here.

Share this post


Link to post
Share on other sites

v0.51 has fixed the error message and I'am now able to use the sight adjustment with no problem wink_o.gifsmile_o.gif

now the only thing that is not solved is other units being able to use the laser rangefinder!

good job thumbs-up.gif

Share this post


Link to post
Share on other sites

heh... that's funny NonWonderDog. The same time I was typing the review on 0.51 update you were typing about the 0.8 release!

2 seconds smile_o.gif will check out this new version smile_o.gif

Share this post


Link to post
Share on other sites

I just checked out v0.8 and Eureka! I put the laser designator works with more than just the SF Recon guy! I used a sniper and rifleman as test subjects and they both worked using the code

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">this addmagazine "laserbatteries";this addweapon "laserdesignator"

HOWEVER an issue arose...

the "range" button works well... but on both the SF Recon, sniper, and rifleman when I chose the "mark" and "Q/R" options I got this message when I clicked on them

http://s24.photobucket.com/albums....lem.jpg

banghead.gif  smile_o.gif got any ideas what that is about NonWonderDog?

It's no biggie I guess... as long as the "range" button works I'am a happy camper  biggrin_o.gif

Share this post


Link to post
Share on other sites

hmm, sometimes the rangefinder doesnt work and displays anything about 166799 or similar...

i droped it and picked it up again and it worked well.

I was playing the SF Recon unit which has the marker by default.

after the re-pickup the O/R function caused the error mentioned in above post.

Share this post


Link to post
Share on other sites

Using this for AI, can you have them use it as a weapon and fire at the target? Love the work NWD!

notworthy.gif

Share this post


Link to post
Share on other sites

My game freeze when i try to mark target or read range. It hapened on my old rig and it hapens again after changing my hardware and reinstaled arma ( on new HDD ) .

Share this post


Link to post
Share on other sites
Quote[/b] ]Freeze...

This is 'normal'. Meaning, script noob here, i think the scripts needs to load and check and the first time your run it it indeed freezes for a good +10 secs, but after that it runs perfectly...well most of the times as i did noticed on dedicated server i sometimes don't have the range/mark/OR modes, but only the scope and the laser des. becomes useless.

As for the freeze, this is client side only as i checked with teammates and they didn't had the freeze on their side when i turn it on the first time.

Would be great if NonWonderDog could finetune the scripts or principle a bit so it doesn't freeze that much (preload or something?). I can only say even with this 'bug' it is still one of my most used inventory tool i carry aorund the battlefield. This in combo with the sightadjustent mod, perfect tools.

Share this post


Link to post
Share on other sites

Well, I've got a very very fast CPU, so it only freezes for a couple seconds over here -- and only the displays "freeze", in that they go blank until the script loads the new textures. I don't really know how big the problem is on other PCs.

The basic problem is that each number is its own texture file. It would be a lot better if they were combined into a single font texture, but there's no way to UV-map display controls. If I tried to add a custom font I'd run into a million other problems, so I'm going to stay away from that.

The version of this script included with TankFCS runs through and loads (or attempts to load) each number before the display comes up, while the old version loaded the textures as needed and tended to flicker for the first five or six rangings. It takes about 3-5 seconds for it to "warm up" on my PC, but again, I have a Core2 Duo running at 3.2 Ghz.

There may be a way to preload individual textures at loadtime, but I can't find one. (Maybe if I map them all to a dummy model and preload that?)

Share this post


Link to post
Share on other sites

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

{

// any texture corresponding to the entry below is preloaded

// and kept in the memory permanently

// actual texture file is looked up in the corresponding config entry

// lookup values:

// "*" - the class including all subclasses is made permanent

// "." - only this class is made permanent

// "fastFind" - optimize searching in this class

---

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

{

// any texture corresponding to the entry below is preloaded

// and kept in the memory permanently

// actual texture file is looked up in the corresponding config entry

// lookup values:

// "*" - path is relative to Data unless it starts with a backslash

// "\*" - path is always absolute

// "@*" - model name (rel. to data3d) is given in the config - load all textures for itreferenced by it

// "\@*" - model name (abs) is given in the config - load all textures for itreferenced by it

// in future other values or combinations may be possible,

// like for textures which need to be loaded, but not all mipmaps are needed

Maybe this helps. smile_o.gif

Share this post


Link to post
Share on other sites

Did some quick test today..this time with the updated rangefinder scripts (the ones of TankFCS v0.1).

Well it looks, and probebly was before, the very first time you use the range/mark/OC you get the big loadtime. Approximatly 25secs here. I have the E6600 core with 2Gb DDR2 and 8800GTX...After the first load it works instandly even if you restart mission or go back to opening menu of gale and take an other mission. So once loaded, fine.

What i do noticed and might be what caused the designated rangefind not to work in the past if you select an unit that has by default the laser designater, is it never works when it comes by default. Meaning, i need to drop it and repick it. Even if it is in the gear menu only. I suppose the script only activate once they detect the laser is picked up during gameplay and not if it was placed before gameplay = scripts started :s. Maybe something others would like to check aswell if this happens with them aswell. In the end can life with it and now know what was the problem...

Share this post


Link to post
Share on other sites

The problem is the "put" and "throw" weapons. I have to find the number of the laser designator in order to use it, but it's impossible to find exactly because "weapons player" doesn't return "put" and "throw".

So, what I do is assume that the laser designator is after the "put" and "throw" weapons in the list. This works in all cases except one--units that have a laser designator by default. The default SF Recon soldier has the laser designator before the "put" and "throw" weapons.

So, what I've done is add an init event handler to each SF Recon soldier that reorders the weapons by taking the laser designator away and immediately giving it back. This usually works, but not always. If you drop it and pick it up manually it will always work.

Share this post


Link to post
Share on other sites
Using this for AI, can you have them use it as a weapon and fire at the target? Love the work NWD!

notworthy.gif

I'd also like to know if there's a way to get AI to lase targets for other players with this thing...

Share this post


Link to post
Share on other sites

I don't know AI scripting, so I won't be able to give you spotters that call out range.

_

But, since I got a few requests, this is now a separate mod again. This is also the first mod I've signed, so hopefully this works out.

Version 1.01 is available in the first post. It will probably not work in conjunction with version 0.2 of my TankFCS mod, and it will probably be a while before that mod is updated.

Share this post


Link to post
Share on other sites

Still having error for SF Reco unit

Can't raise neither display in my LaserDesignator nor options in any menu.

Share this post


Link to post
Share on other sites

Whoops, I'd forgotten to add this to the original post:

This mod requires the extended init eventhandlers mod! If you use GMJ_SightAdjustment, make sure to use the compatibility patch in the "examples" folder of the extended init eventhandlers mod. Just put it in your @GMJ_SightAdjusment/addons folder.

That's your most likely problem.

Share this post


Link to post
Share on other sites

I've been gone for a while--I looked around, but didn't see an update before I posted.

It will almost certainly work with the new version, thanks. I'll update my links.

Share this post


Link to post
Share on other sites

Hmm doesn't work for me with tanks and as SF Recon (+with new XEH 1.7)

Quote[/b] ]Warning: no idc entry inside class RscDisplayStart/controls/Progress2

Suspending not allowed in this context

Error in expression <hisunit removeWeapon "LaserDesignator"; sleep 0.001; _thisunit addWeapon "LaserD>

Error position: <sleep 0.001; _thisunit addWeapon "LaserD>

Error Generic error in expression

Share this post


Link to post
Share on other sites

Still don't work for me, I had added Extended Init eventhandlers because I got an error message calling it.

Share this post


Link to post
Share on other sites

banghead.gif sorry for the double post, no way to delete my mistake huh.gif

Share this post


Link to post
Share on other sites

@NoWonderDog

Nice update, im a fan of your work. However, can you make your NWD ballistics, Scopefix & Tank FCS XEH compatible and also sign all of them? I know for example Scopefix can give some problems with missions and addons. As i understand it, making it XEH is a very easy operation and makes it compatible with all other XEH addons.

Again, thanks for the update.

Regards

Alex

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  

×