I want to do this on my custom config. The idea is simple in theory....
1. Decide whether to modify your master config.cpp via the decrypted config file from OFP Advanced Editing Forum? to effect all grenades in game, or as addon config to effect only your custom missions thru scripting each time. (If you want to do the first, take a look at the ECP project under the OFPEC Editing page.)
2. If the first method, change the default hand grenade (same class for both east and west, but m203/gp30 are different classes) to an inert dammage model. This is what you actually will throw.
3. After changing default hand greande to inert (no dammage/no expl) inside the handgrenade class under CfgAmmo, add a fired event handler to the Throw class under CfgWeapons. The handgrenade class under CfgWeapons is considered as a magazine used by the Throw weapon. (if this sounds weird, try to get a hold of inquisitor's weapon pack to see how he did it in his config).
class EventHandlers
{
Fired = "_this exec {"\aPBOtoPutAscriptIn\fuze.sqs"}";
};
4. Add a custom explosive grenade class that will be used to replace the inert nade after the fuze expires thru scripting. Since the throw 'weapon' can also throw smoke shells, you need to check inside the script what type of weapon 'i.e. magazine' is being thrown.
5. Script your fuze.sqs, to simulate some kind of fuze (time based, height based (waiting for it to peak first), or distance based. After the fuze expires, get the position and velocity vector of _this, delete the round via setdammage=1 (it's inert) or someother method, and then spawn an explosive round/grenade/missile/etc. at the stored position and then set the velocity vector to the stored value.
6. One thing to note: it's been kind of a while since I was messing around with this idea for use in an artillery piece but some people posted a 10 second rule (~11.?s) for the shotshell simulation (artillery/tank rounds), after that, you need to respawn the round in an ~11s loop. The throw sim used by the grenade class, might be different or might not even work with the get/set velocity commands, but I think it should as you can set the velocity of static tables (as in chairs...) but it requries some one to shoot it or touch it first. Setvelocity of rounds/grenades in motion (due to gravity @ respawn) should have no prob I think.
7. For more info, search some of the older posts on the official forums under setvelocity.
P.S. It might be possible to add an action menu option, like "Pull Pin" if you have any grenades in your inventory, and that will start the timer; but I don't know if their is a command to check what magazine (ammo) the player has selected (like SMK vs frag)