I played Modern Warfare 2 multiplayer a lot, so i knew something about the AC-130 features (at least in MW2 game), so i started the development trying to recreate MW2's AC-130 features.
First i made an custom camera and made it fly over city, just going always in same direction, when press A or D the direction change, and after some tests i figured out that the cars and peds are only loaded by the game in an region close to player position, so i did a litle trick: move the player with the camera hehe.
Download: GTA 4 Mods (GTA Garage, MOD Db)
First weapon was the .105mm:
Very powerfull, i used one rocket model (cj_rpg_rocket) that is launched from an position close to camera position, applied the same rocket particle effect used by the game, and used the native function
SET_OBJECT_RECORDS_COLLISIONS and HAS_OBJECT_COLLIDED_WITH_ANYTHING to identify when the rocket collided with anything, and when it happens i detect peds and cars surround rocket position and push them away, also use an explosion particle effect with increased size
Second weapon as .40mm, this one was composed by ten objects, i throw then one by one and do the same that i did with .105 to detect collision, then add an litle explosion in the collision position, also i move the camera in the direction of ground to simulate an zoom in
Third was the .20mm, just using FIRE_SINGLE_BULLET to shoot bullets against the ground and used graphics draw event to draw an fake bullet trace, i did this because the particle effect for bullet trace dont work well sometimes
One of the most interesting ideas that i had in this script was the train derail, when the .105 collision detects an train (that is an object of type gta.vehicle) i get info about the train position, rotation and speed, then delete the original and create an fake train, put in same place, same rotation and same speed, then apply force to it pushing away :)
0 comments:
Post a Comment