missile homing for auto firing turrets?

Started by MileHighGuy, May 18, 2014, 12:23:52 PM

Previous topic - Next topic
so i set up a turret with autofire = 1 and gave it a weapon that has homing missiles. but since the turret fires automatically as soon as it can it has no time to lock on. setting locktime to 0 doesnt work. I know the weapon locks on because i tested it as a unit. what should i do?

May 18, 2014, 12:32:52 PM #1 Last Edit: May 18, 2014, 12:36:01 PM by Snake
I don't know if auto turrets target enemies at all, but I'm not sure, I've never used one.

Try using this:

LockOnRange      = "85.0"
LockOnAngle      = "6.0"
LockOffAngle      = "10.0"
LockTime       = "0.001"

It may be that you need to widen the angle that the gun can lock. Try experimenting with:

LockOnAngle      = "16.0"
LockOffAngle      = "20.0" and higher numbers like that.

Oh, and lowering the missile velocity could help too.
=AaTc= Forever

SALLY....

-Retired Modder

I know it works, and I've tested as a unit (as said before). The angles and range are super generous. It just doesn't home in at all when a turret fires it.

Hmm... The only other things I would check is make sure it says TargetDroid (since I assume you are testing this on the rep side) and I don't know for sure, but I think the weapon odf has to be set as the class of "launcher"
=AaTc= Forever

SALLY....

-Retired Modder


Could you just make a stationary trooper with turret mesh?
Quote from: Abraham Lincoln. on November 04, 1971, 12:34:40 PM
Don't believe everything you read on the internet

I'm afraid not.. autofire does not work with the soldier class. and they have unchangeable collision.

What happens if you set LockTime to zero? It's possible that the rocket is being fired during the same frame as the LockTime timer is started. Depending on the order of things internally in SWBF it could be that due to the auto-firing of it the game never gets a chance to check if the turret has been aiming long enough to be allowed lock-on missiles.

For those of you who don't understand what I'm getting at follow the diagram thingy below.


Game Frame -> Turret's logic executed -> Game Checks timer for lock-on and starts it if it doesn't exsist -> Turret Fires Rocket -> New Game Frame

I don't know how SWBF works internally but that is my guess as to why this may not be working.

all i know is that i tested the weapon with locktime to 0 as a unit and it would not lock on. I need it to lock on before it is able to fire.

You could try setting InitialSalvoDelay to a value higher than your lock-on time. I would try to do some testing myself but I don't actually have BFBuilder installed, not properly at least.


Try using the odf's here with the turret odf. If that doesn't work then I don't know what to do. It might just not be possible.
=AaTc= Forever

SALLY....

-Retired Modder

Quote from: Snake on May 19, 2014, 06:49:40 PM
Try using the odf's here with the turret odf. If that doesn't work then I don't know what to do. It might just not be possible.

thats the first thing I went to. i know the weapon works. its just not possible with a turret i guess.