SWBFGamers

Modding for the Original SWBF1 and SWBF2 => SWBF1 Modding => Topic started by: MileHighGuy on May 18, 2014, 12:23:52 PM

Title: missile homing for auto firing turrets?
Post by: MileHighGuy on May 18, 2014, 12:23:52 PM
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?
Title: Re: missile homing for auto firing turrets?
Post by: Snake on May 18, 2014, 12:32:52 PM
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.
Title: Re: missile homing for auto firing turrets?
Post by: MileHighGuy on May 18, 2014, 12:36:17 PM
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.
Title: Re: missile homing for auto firing turrets?
Post by: Snake on May 18, 2014, 06:16:30 PM
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"
Title: Re: missile homing for auto firing turrets?
Post by: MileHighGuy on May 18, 2014, 06:18:49 PM
I did both. I guess it will never work. shame
Title: Re: missile homing for auto firing turrets?
Post by: Led on May 18, 2014, 06:38:11 PM
Could you just make a stationary trooper with turret mesh?
Title: Re: missile homing for auto firing turrets?
Post by: MileHighGuy on May 18, 2014, 06:51:05 PM
I'm afraid not.. autofire does not work with the soldier class. and they have unchangeable collision.
Title: Re: missile homing for auto firing turrets?
Post by: SleepKiller on May 18, 2014, 09:05:24 PM
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.
Title: Re: missile homing for auto firing turrets?
Post by: MileHighGuy on May 18, 2014, 09:38:23 PM
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.
Title: Re: missile homing for auto firing turrets?
Post by: SleepKiller on May 18, 2014, 10:06:59 PM
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.
Title: Re: missile homing for auto firing turrets?
Post by: MileHighGuy on May 18, 2014, 10:11:02 PM
did it. didn't work.
Title: Re: missile homing for auto firing turrets?
Post by: Snake on May 19, 2014, 06:49:40 PM
Try using the odf's here (http://www.swbfgamers.com/index.php?topic=7770.msg83745#msg83745) with the turret odf. If that doesn't work then I don't know what to do. It might just not be possible.
Title: Re: missile homing for auto firing turrets?
Post by: MileHighGuy on May 19, 2014, 07:12:34 PM
Quote from: Snake on May 19, 2014, 06:49:40 PM
Try using the odf's here (http://www.swbfgamers.com/index.php?topic=7770.msg83745#msg83745) 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.
EhPortal 1.34 © 2024, WebDev