Missile Lock

In this forum you will find and post information regarding the modding of Star Wars Battlefront 2. DO NOT POST MOD IDEAS/REQUESTS.

Moderator: Moderators

Post Reply
kinetosimpetus
Imperial Systems Expert
Imperial Systems Expert
Posts: 2381
Joined: Wed Mar 25, 2009 4:15 pm
Projects :: A secret project
Games I'm Playing :: Warframe STO

Missile Lock

Post 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]
Post Reply