Let's say you have a fighter jet in S2. When you get in the fighter jet, you attack with your hands. Would it be possible to script so that the player fires the figter jet's weapons instead of attacking with his hands?
yes, all you have to do is write a script into the game.inf file that starts on:attack1 and checks whether the player is in the jet (use riding) and then use projectile or something to shoot.
Edit: oh, I forgot, you might want to use type to check what type the unit with the ID is which you receive from the riding command. because with this you can compare the type of the unit you're riding with the type-number of the jet in the definition script. if it matches, use the projectile command.