Jump to content
Sign in to follow this  
laxemann

Execute script as soon as ammo class spawns?

Recommended Posts

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

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
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

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

It should track the position of the projectile/missile whatever

Share this post


Link to post
Share on other sites

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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×