Edit: To nip these pointless "But THIS is a SAM launcher!" comments in the bud, I've changed the title of the thread and the project to something else, which in this instance is an acronym for "Anti Aircraft And Armor" which SHOULD cover me. This is BLOCKLAND. Not some damned mil sim. I'll name my projects whatever the hell I wanna thank you very much.
ANYWAY.
I figured it's high time we had one o' these mothers at our disposal, so I whipped up this model:
and this rocket:
And now I'm tryin' to write a script for it, but I want to know a few things planning-wise before I start out. This is my plan for the weapon so far:
I know that when a vehicle is spawned, it gets assigned a specific number by the game engine. What I want the weapon to do is when the player mouses over a vehicle, wait three seconds, then get the specific ID of the vehicle and tell the rocket to hunt down that specific vehicle. If the player does not fire within five seconds of lock-on, discard the number and wait to point at the next vehicle. On firing, the rocket will chase down the target at high speed. The turn radius for the rocket is going to be poor, thus it CAN be outmaneuvered if the target notices it soon enough. Also, it's going to intentionally be indiscriminate as to what team it's firing at. This is specifically a vehicle-killing device, and will not lock onto players. It's going to be a one-shot weapon that you have to get another of if you want to keep killing tanks n' stuff.
What I want to know is what exactly that specific ID is called and how I can incorporate it into the script. If I'm mistaken, what other option do I have tracking-wise?