Winter said:Kayne said:you could do something in mission templates.py...
Like use mouse_clicked, then check the id of the weapon, and then play sound if its a lightsaber
This is your best bet. ti_on_weapon_attack won't work, and there's no other way to single out lightsabres. If it doesn't work then you're out of luck.
Of course, if it does work, you'll have to remove all sword-swinging sounds and add them in to the trigger for non-lightsabre weapons. Otherwise the normal sword-swinging sound will still play over the lightsabre swing.
hmmm... So this method might work but it has some limitations:
1) the key_clicked lightsaber sound will only work for the player, not all the other troops with lightsabers
2) as winter said, unless we remove\modify all normal sword-swinging sounds then the player would hear both
3) however, if we do number 2 then will there be no sounds for all the other troops with swords?
4) there are other sounds, sword_clash, etc, that we may also want to think about changing.....
I think it may be worth it to do #1 and just deal with hearing both sounds (this currently happens when you throw a lightsaber) but I'm not sure its worth trying to remove\modify non-lightsaber weapons, etc. Eventually this may be modified with new troops and we just give everybody lightsabers or vibro-weapons and then we could just modify the global sword_swing, sword_clash, etc, to be a lightsaber type of noise. I think it would be kinda cool to have a Jedi vs. Sith type of war where we have a few competing factions with lots of jedi/sith recruits and a few masters on the battlefield with lightsabers. I'm too busy tho, so only have time for minor changes, not a larger scale mod. I'm planning on playing with this for another week or so and then may send the source to anybody who is interested in looking at it further. However, I'm hoping to hear from somebody from the original star wars team before I distribute the source to mine because technically I have not gotten permission to use their models.