Author Topic: Homing Projectile  (Read 2041 times)

You could have projectiles that curve towards players by having a player-lock-on function calculate an acceleration vector for that projectile the exact moment before it's fired, but the acceleration would remain constant throughout the projectile's flight once it's fired. It wouldn't be homing in on players constantly.

I'd figure atleast this would be doable since you can assign Gravity to a projectile which curves it's trajectory. Everything absolutely has to be predefined with projectiles though.
I made some kind of event for my server that does this - it fires a projectile according to the target's (activating player, closest player or closest vehicle) current velocity and attempts to get some kind of acceleration so that it can hit you most of the time with perfect accuracy. (if you move in a straight line)

Attempting to fly a plane by the Auto Gravity Rocket Turret was funny, seeing a barrage of missiles coming your way and trying to avoid them.

Is everyone forgetting the Homing Vector?

Just strip the homing code out of that.


Back in January of '08 I had tried Blockland at a friend's house, and I have memories of a guided missle. As in, you shoot it, and it puts your camera in there and you move it around. Was that a scheduled loop, or some feature that has since been removed? (I didn't start scripting until V10 so I never looked at the script.)

Loops, most likely. It was a flying "player type" missile that glitched up if anybody except the host fired it due to lag and scheduled loops.

It was a vehicle I think...

Is everyone forgetting the Homing Vector?

Just strip the homing code out of that.
Did that, hence the need for someone who could write a script so it wouldn't target vehicles behind the player and target the vehicle closest to the player's LOS point and not just the closest vehicle to the player

Once again I ask would anyone be willing to do the script for me?
« Last Edit: August 05, 2009, 05:00:21 PM by Cellman »