laxemann 1673 Posted July 15, 2014 Hey guys, I'd like to know if there is any way to execute a script as soon as a specific ammo class is spawned, e.g. "M_Titan_AT". It is critical that the script is executed each time one of these ammo classes appears anywhere on the map and that the script is somehow executed from withing the config.cpp. I've been trying to use an init eventhandler but that doesn't seem to work with ammunition. Any ideas? Thanks in advance, LAxe Share this post Link to post Share on other sites
x39 101 Posted July 15, 2014 further info about what you want to do would be good maybe there is a workaround you did not thought about yet the only way i could imagine would be adding to every unit upon spawn a Fired event handler and take the projectile object from there Share this post Link to post Share on other sites
laxemann 1673 Posted July 16, 2014 further info about what you want to do would be goodmaybe there is a workaround you did not thought about yet the only way i could imagine would be adding to every unit upon spawn a Fired event handler and take the projectile object from there That's the thing, when using a fired eventhandler, I can handle only projectiles that have been fired by units, but not spawned ones... but it is critical that I can run a script for each of these ammo classes as soon as one gets spawned, no matter if it's via script or fired from a unit. For vehicles/units one can just use init eventhandlers but they don't work on cfgAmmo classes. I hope that clears things up a bit. :) Share this post Link to post Share on other sites
lappihuan 178 Posted July 16, 2014 What should this script do then? Share this post Link to post Share on other sites
laxemann 1673 Posted July 16, 2014 It should track the position of the projectile/missile whatever Share this post Link to post Share on other sites
lappihuan 178 Posted July 16, 2014 While it is flying? Then you should be fine with the "Fired" EH. E: sry missed your answer before... Share this post Link to post Share on other sites