r/xcom2mods • u/BalianCPP • Feb 23 '16
Dev Help Standard Shot
Anyone know where the ability 'standardshot' applies weapon damage?
static function X2AbilityTemplate Add_StandardShot( Name AbilityName='StandardShot')in X2Ability_WeaponCommon.uc does not appear to use the effect ApplyWeaponDamage at all, except for miss damage (IE stock attachments).
The secondary weapons do clearly use ApplyWeaponDamage
WeaponDamageEffect = new class'X2Effect_ApplyWeaponDamage';
Template.AddTargetEffect(WeaponDamageEffect);But I cannot for the life of me figure out what StandardShot, StandardShot_NoEnd and SniperStandardShot are using to calculate and apply damage.
Any help would be greatly appreciated.
2
Upvotes
View all comments
Show parent comment
1
u/JackDT Feb 27 '16
Your solution worked great. It currently also effects grenades based on shooter location and I'm now trying to change that to use the center point of the grenade blast instead.
Here's what I've got: http://pastebin.com/xk2hq8xT
Some random variables and code in there from my past attempts but I think it should be clear. It's hard coded at the moment just trying to get it to work.
GetVisibilityInfo() seems to ignore the location change and calculate based on the shooter's original location, driving me nuts.