However, when I do this the vehicle spawns in the air above me. The bike falls and can be ridden, but the mozzie is stuck. One bullet will cause it to fall but then it blows up. I did a little testing last night before I went to bed and it seems like the higher my player is, the higher the vehicle spawns.
My next course of action would be to see if I can come up with a formula for the z axis based on the getPosATL player: create a plot with my pos vs spawn pos and find an equation for the line of best fit for an accurate z coordinate.
Another idea I had would be to make it so the vehicle wouldn't take damage and could be shot down for say 60 seconds after deploying, allowing the player to shoot the vehicle out of the air when it first spawns and it land without blowing up.
Of course, those two are probably just over thinking it.
Question
kelso000
I'm trying to make some edits to a vehicle spawning script to allow players to deploy their mozzie on their landing pad. The vehicle is created by:
However, position player returns the XY coordinates and sets Z to 0, creating the vehicle on the ground.
I figured I could use the createVehicle and set the position to getPosATL player. So my new code looked like:
However, when I do this the vehicle spawns in the air above me. The bike falls and can be ridden, but the mozzie is stuck. One bullet will cause it to fall but then it blows up. I did a little testing last night before I went to bed and it seems like the higher my player is, the higher the vehicle spawns.
My next course of action would be to see if I can come up with a formula for the z axis based on the getPosATL player: create a plot with my pos vs spawn pos and find an equation for the line of best fit for an accurate z coordinate.
Another idea I had would be to make it so the vehicle wouldn't take damage and could be shot down for say 60 seconds after deploying, allowing the player to shoot the vehicle out of the air when it first spawns and it land without blowing up.
Of course, those two are probably just over thinking it.
Link to comment
Share on other sites
3 answers to this question
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now