@Maniac Modeler:
Hmmmm... I suggest you first learn how to script normally before getting into an in-depth script like a vehicle. The code necessary will require a bit of math understanding (possibly 3-dimensional depending on how you want it set up) and lots and lots of basic scripting understanding. It would also be good to know how to debug a script should something go wrong or doesn't work right.
Other than that, you'll also want to know how to perform calculations using the Ply's Mod variables FOR the math.
Here's an example of a simple problem I encountered writing the original Humvee script:
When the player looks left and right, the Humvee should NOT move with the camera... it should rotate toward the camera only when moving. Now, what if the camera is pointing at 359 degrees and the humvee is looking at 2 degrees. The obvious direction for the humvee to turn would be to the negative so that it would loop from 0 to 360 and get to 359 faster, but how would I code the humvee to know that since the only it understands now is "If the target angle is higher, then go up and if the target angle is lower then go down"???
That's the kind of thing you'll encounter. Other problems could include how to implement acceleration/velocity... how to control the turning of the camera... how to provide the illusion that the player actually got INTO the humvee and didn't just teleport... how to reposition the player to the outside of the driver side door when they exit the humvee...
Lots of stuff.
But here's one tip for everyone... to get the original humvee to work, remove the section of code that repositions the player to the humvee's position while driving... This will prevent the humvee from flying away, but enemies will NOT target the humvee since the player isn't actually inside of it.
It constantly surprises me how people can assume that making a vehicle is somehow SIMPLE and expect it to be simple for them or for someone else to do the work for them...
Well, the ability is there, you just gotta make the most of what I give you to work with and I have not yet seen that happen on a larger scale than CG has shown me. (Which, I'm sad to say isn't very large compared to what can be done! Though, he may be keeping some of his more brilliant scripts to himself
)
The one and only,
Those who live in the past, are destined to insanity. Those who live only for the future, will be slaves to their ambitions.
Those who live in the moment... only they, are truly happy.