Hi All
I once had an idea of making melee weapons using an addAction script and the "strokeRifle" action command.
The idea would be that the script would do the animation then check the range to the nearest enemy unit. If it was in a very specific range then the enemy unit would be damaged by a certain amount based on the weapon type and possibly knocked down or back.
For example - a baseball bat might have an effective range of between 1.5m and 2.5m. If you swung the bat at an enemy outside that range then you'd miss, otherwise you'd cause the "baseball bat" level of damage against the target (with a bit of random variation) and maybe even knock him down (playMove "drop to prone").
I'm not sure if this is posible but maybe you could add the addAction to the weapon itself, so that if you picked it up you got the action - baseball bats would have "swingBat.sqs" attached etc.
Another thing you could do is have the script shout out a public variable such as "nowSwinging" every time you swung the weapon. If you weren't swinging then you could have a higher defence value (maybe by reducing the enemy weapons effective range or damage value.
I'm sure that this is do-able in a player vs player match up, but I'm not sure how you could get an AI bruiser to take a shot. I'm also not sure if adding the action to the weapon would work or how you'd make the nowSwinging bit work either.
It'd be a great project though ! ;D
Roni