Jump to content
Sign in to follow this  
12inchplastictoy

Target locking / tagging script assigned to secondary mouse button / RMB

Recommended Posts

Hi all,

I'm currently designing a scope, which would have a target tagging / locking functionality.

I already figured out the functions I want to apply to that target... but I need help to know how to:

  1. Assign the target lock / laser painting to the RMB (right mouse button);
  2. Return the target object, so that I may pass its visiblePosition/getPosASL to my functions.

So it's pretty much like the target-and-lock system of most rocket/missile launchers in the game (hold RMB on the target until target is locked), but I would like to write it myself in order to customise the UI elements and such (different "lock on" icons, colours, etc...).

But this seems like such a basic question, I assume that I found my answer at some point in my searches but it went completely over my head...

From what I found:

I'm guessing answer #1 has to do with event handlers, and #2... well I'm trying to avoid writing a dirty targeting function since it seems to be already implemented.

Thanks in advance for your help!

As this is my first post ever here, I'll pop out the usual disclaimer:

Aye, I scoured these forums (from A1 to A3), BIKI, and many other websites to find elements of answer before posting. I also went through every A3 and A2OA's PBO's in the hope to find a script from BIS linked to any of their rocket launchers or aircrafts, unbinned config files, downloaded a cakeload of mods to study similarities, and bothered friends more experienced in scripting than I.

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  

×