From The Depths - Forum

Full Version: APS problem firing from script
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have been working on a simple anti-missile cannon controller, and have run into an issue when trying to fire the cannon from the script. I am using I:FireWeaponOnSubConstruct() in Update, and the cannon does something odd. It seems to fire, making the sound, particle effect, and even uses shells in the mouse hover info, but does not spawn projectiles. If I disable the script and take manual control, it fires normally, but with script control it looks like it's firing blanks.

Edit: Fixed it. Normalized the vector used to aim the weapon and it works. The help section for I:FireWeaponOnSubConstruct() says you dont have to normalize it, but I think it was causing it to fail some check or something. Dont know, I'm still new to this.
why not just using the ingame anti missle controller for guns?
(just asking)

ps. : with ur lua probs i cant help, sry
(2019-01-09, 10:26 PM)khkpck Wrote: [ -> ]why not just using the ingame anti missle controller for guns?
(just asking)

Because it isn't very good against missiles making any kind of maneuvers, I want to wright one that is a little more predictive Smile
okay that sounds interisting

if u are done i would like to test it for my kinetik kill ciw
it works good with the standart controller