oneisdown 16 Posted August 10, 2016 Is there a way i can have the enemy ai fire his weapon at a higher elevation when he fires? I am working on a flare script and all i need is something to make him fire about 20 meters higher than normal. Something maybe connected with do fire? Share this post Link to post Share on other sites
tryteyker 28 Posted August 10, 2016 Creating an invisible or really small object like a cyan pointer which you delete afterwards is probably the best, in conjunction with something like forceWeaponFire to fire the flare muzzle. Share this post Link to post Share on other sites
johnnyboy 2686 Posted August 10, 2016 You can use a fired eventhandler to intercept the projectile and alter its z velocity forcing it higher. Here is an example that worked for forcing a rocket to travel higher: rocketDude addEventHandler ["Fired", { _null = _this spawn { _missile = _this select 6; _vel = velocity _missile; _dir = direction _missile; _speed = speed _missile; _z_modifier = 10; _missile setVelocity [_speed * sin(_dir), _speed * cos(_dir), (_vel select 2)+_z_modifier]; }; }]; The above is untested (I modified from a more complex example that does work), but I believe it is clean. Share this post Link to post Share on other sites