@DanAK47: I took your advice and screwed around with the optic instead of the config. Works sort of fine now, if not very realistic. You can even approximate the distance of a tank using the stadiametric rangefinder up to around 500 meters, though accuracy may vary depending on the size of the tank (used a T72 as a guide.) I can hit tanks often on the first shot, and if I miss, the second always hits.
Problem now. I don't know why, but the AI now fires too high unlike before. Might be I screwed something up while fixing the optics.
@Zulu1: Great! This is just what I needed! Much thanks. I'll have to try it out tonight.
By the way, would I be able to call the script from the weapon's config? or from the AT Rifleman?
Edit: Just tried it out in a mission. Worked, but the blast came out from the soldier's arse. Still, a big step ahead, no?
Last edited by sevensixtytwo; Jul 3 2012 at 13:14.
"New? You must be joking! Future Force Warrior has been around since OFP; it's called Cadet mode."
I'm assuming you already understand what Zulu mentioned and wanted to "embed" the effect.
Rather than enter it into a unit's init field.
You could run the script off a fired eventhandler in a unit's Cfg,with a check for your custom weapon.
To ensure it only executes with that in particular.
Code:
class EventHandlers
{
fired="if ((_this select 1) == ""YourWeaponClassName"") Then {[_this select 0] exec {\Blah\Blah\Whatever.sqs}}";
};
};
Someone may come up with a more elegant solution.But in the meantime that should work.
@Macser: Ah, so if I put the "fired" into my SolBase unit (which all my units inherit) any of them could pick up an M67 RR and have backblast? I'll test it right now.
EDIT: It works perfectly, though it gives a Error Zero Divisor note on top of the screen everytime someone fires. Much thanks!
Oh and the reason for the backblast coming out of the trooper ass was the WW4 mod since the default stance of the soldier is now standing instead of kneeling.
Might do an anim tweak for that.
Last edited by sevensixtytwo; Jul 3 2012 at 13:30.