Page 1 of 1

Missile Lock

Posted: Mon Apr 02, 2012 7:29 pm
by kinetosimpetus
I've been working on my flyers' missiles lately, and it was all going pretty well, until I started trying to limit the lock on range for a particular type. I'm trying to make them only lock on when the target is nearer than 500 distance units without limiting the range of the 'radar' like target lock.

This image shows what I'm talking about.
Hidden/Spoiler:
Image
Right now, I can only get targeting lock from within 50 units, but then I can fade back quite a bit and still fire locked missiles.

Relevant code from my current ODF for the missile weapon. The stock scoutlasers had a some code that seemed to trump the code for the missiles, so that has been commented out.
Hidden/Spoiler:
[code]
LockOnRange = "500.0" //400
LockOnAngle = "20.0" //6
LockOffAngle = "25.0" //15
LockTime = "1" //2
MinSpread = "0.0"
MaxSpread = "0.5"

TargetLockMaxDistance = "500" //20000
TargetLockMaxDistanceLose = "550" //25000
[/code]