Saturday, February 23, 2013

[Script] Javelin/Stinger rocket lock

Started based on Modern Warfare 2 Javelin behavior and modified until reachs an behavior similar to real Javelin launchers, this was an interesting and, at same time, hard to do script. Requested by GoldenDarknezz, this script allows you to lock rockets on vehicles or ground and shoot with TOP attack or DIR (Direct? probably) attack mode, also have nightvision effect :)

Download: GTA 4 Mods

You can change to Stinger mode too (based on MW2 Stinger behavior)

The Nightvision effect its very cool and gives an real impression of nightvision if the objects are away and you are looking from a high position, this idea i used first in AC-130 script, but with an different way to make it work because in AC-130 we always look from high position and this makes it require less tricks to work properly.

The idea is:

-Draw an green rectangle in the entire screen with reduced alpha value
-List peds/vehicles (targets)
-Put Green lights between each target and the camera, for vehicels we need more lights to fill the vehicle surface, for example, an Bus needs four lights, an taxi car needs two
-Move the lights with the objects considering camera position too, the light will be always one or more steps in front of object

Seems to be simple? Yep, but its not hehe.

//propaganda YT float style='display:none;'