Damage Help! [Solved]

In this forum you will find and post information regarding the modding of Star Wars Battlefront 2. DO NOT POST MOD IDEAS/REQUESTS.

Moderator: Moderators

Post Reply
DeathTrooperLeader
Private Recruit
Posts: 20
Joined: Mon Sep 18, 2017 4:33 am
Projects :: No Mod project currently.
Games I'm Playing :: SWB2
xbox live or psn: No gamertag set

Damage Help! [Solved]

Post by DeathTrooperLeader »

Is there a way for a weapon to do no damage to allies no matter what settings you have (friendly fire or no friendly fire)

Does anyone know the chunk of code to do this?
Last edited by DeathTrooperLeader on Mon Oct 16, 2017 4:40 pm, edited 1 time in total.
Marth8880
Resistance Leader
Posts: 5042
Joined: Tue Feb 09, 2010 8:43 pm
Projects :: DI2 + Psychosis
Games I'm Playing :: Silent Hill 2
xbox live or psn: Marth8880
Location: Edinburgh, UK
Contact:

Re: Damage Help!

Post by Marth8880 »

You could probably write a quick and dirty little OnObjectDamage event handler that checks whenever a unit is hit, then cross-references the damager's and object's team and gives the object the amount of health that was lost. Potential problems would be switching this off when friendly fire is off, as well as getting the amount of damage dealt in the first place.
thelegend
Sith
Sith
Posts: 1433
Joined: Thu Jan 23, 2014 6:01 am
Projects :: Star Wars - Battlefront III Legacy
Games I'm Playing :: Swbf GTA CoD LoL KH
xbox live or psn: El_Fabricio#
Location: Right behind you :)

Re: Damage Help! [Solved]

Post by thelegend »

Maybe it's: AffectFriends = "1"
Not sure if it works for damage though; it's from force push _ord.
Marth8880
Resistance Leader
Posts: 5042
Joined: Tue Feb 09, 2010 8:43 pm
Projects :: DI2 + Psychosis
Games I'm Playing :: Silent Hill 2
xbox live or psn: Marth8880
Location: Edinburgh, UK
Contact:

Re: Damage Help! [Solved]

Post by Marth8880 »

thelegend wrote:Maybe it's: AffectFriends = "1"
Not sure if it works for damage though; it's from force push _ord.
Unfortunately that parameter only works with the EmitterOrdnance ordnance class.

Resources:
http://www.secretsociety.com/forum/down ... meters.txt
Post Reply