hook FM_cmdstart and FM_cmdend, check if primary attack command is started and create task to increace a global variable until the FM_cmdend is triggered, create the nade in FM_cmdend forward and calculate its velocity some way using the global variable you increaced with task