For some reason, it doesn't work and the critical hit just does nothing (the Critical Damage is set to 0)...
I know with Object Effects on weapons, the weapon must do at least 1 point of damage for the effect to be applied to the target. It's possible that Critical Effects might have a similar requirement. Do some tests with the weapon's
Damage and/or
Critical Damage set to at least 1 to see if your Critical Effect is actually fired. To make sure that possible problems in your effect script are not a factor, make the first line in the ScriptEffectStart block something like:
PrintC "ScriptEffecStart"
By the way, http://fose.silverlock.org/fose_command_doc.html#PrintToConsole (PrintC) is a FOSE function, invaluable for this sort of thing. It's worth running FOSE just for this purpose, even if you plan on making your mod non-FOSE-required - simply remove or comment out the PrintC lines before releasing it. You could even get fancy and do something like:
set rActor to GetSelfPrintC "ScriptEffecStart: affected actor = <%i> <%n>" rActor rActor
Getting an NPC to stop fighting an enemy that it is supposed to be fighting, while really controlling the situation, can be a gigantic pain in the ass. Just changing the aggression will not tend to be enough to get what you want. ...
That's definitely true, as I've learned from experience. When I was playing around with the http://www.youtube.com/watch?v=3En4r2XTb_E, I tried to use methods similar to those in http://www.fallout3nexus.com/downloads/file.php?id=3284, and while it worked, the results weren't really satisfactory as you can see from that video. I didn't exactly copy what was done in the Groovatron though, so maybe take a look in there yourself to see what you can learn.
But like Tarrant suggests, if you'd be happy doing something other than this, you'll likely save yourself a lot of trouble.
Script 2:
I need a script that makes the weapon have 100% (or 95%, anyways the max possible percentage) accuracy in VATS from any distance... Any ideas how to do it?
Use a hidden Perk for that. Look at the Commando, Gunslinger, and Sniper Perks for examples.