ItsMods

Full Version: Simple flyable helicopter script port, could use help!
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
An old friend of mine who made the famous WaffleMod for Call of Duty 4 also happened to have a flyable heli script. It's pretty cool, I'm trying to see if I can port it over to MW2. I've had a LITTLE progress, but could use some help.

Dumbed down, I think it's very simply scripted. It spawns a 'Heli' 2000 units above the players origin, links him to it (In the pilot-seat-area), and enables third person. So the user itself, just sees a chopper in front of them.

The script follows where the player's looking, so when the player moves his mouse, the choppers rotational angle follows with almost no delay. The movement is pretty self-explanatory if you look at heli_fly() in the script.

I managed to get it to spawn, link the player to the heli, and go into third person, but it just won't move at all. Wether it be rotational or it's actual position, it's just, still.

Note the different hard-coded functions, such as the PlayerLinkTo(), spawnHelicopter, and a few others.

Here's what I managed to get to work:

http://pastebin.com/zwTDrMkk

Here's the original:

http://pastebin.com/y7SuuPG5

EDIT: After toying around with it a bit more, I managed to get the heli to move up and down (Vertically) on command, by changing Vehicle_SetSpeed function, from its cod4 equivalent. It seems to position itself pointing @ 0 degrees once its moved vertically in any direction. Once it points in that direction, it stays there and moves vertically normally upon command. (Pastebin link updated with new code aswell)