From The Depths - Forum
APS problem firing from script - Printable Version

+- From The Depths - Forum (https://forum.fromthedepthsgame.com)
+-- Forum: Alpha (https://forum.fromthedepthsgame.com/forumdisplay.php?fid=9)
+--- Forum: LUA Scripting (https://forum.fromthedepthsgame.com/forumdisplay.php?fid=129)
+--- Thread: APS problem firing from script (/showthread.php?tid=38535)



APS problem firing from script - SgtToothpaste - 2019-01-09

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.


RE: APS problem firing from script - khkpck - 2019-01-09

why not just using the ingame anti missle controller for guns?
(just asking)

ps. : with ur lua probs i cant help, sry


RE: APS problem firing from script - SgtToothpaste - 2019-01-10

(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


RE: APS problem firing from script - khkpck - 2019-01-10

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