Lifesteal Choke

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
User avatar
Kingpin
Jedi
Jedi
Posts: 1096
Joined: Fri Sep 13, 2013 7:09 pm
Projects :: The Sith Wars II
Location: Denver, CO
Contact:

Lifesteal Choke

Post by Kingpin »

Is there any line to add to a default Force Choke ODF that makes it not only take damage from an enemy, but add it to the player's own health?
MileHighGuy
Jedi
Jedi
Posts: 1194
Joined: Fri Dec 19, 2008 7:58 pm

Re: Lifesteal Choke

Post by MileHighGuy »

You have to do it via LUA. I don't know how though.
User avatar
Nedarb7
Lieutenant General
Lieutenant General
Posts: 676
Joined: Sat Sep 22, 2012 3:41 pm

Re: Lifesteal Choke

Post by Nedarb7 »

You could try this:

Code: Select all

OnObjectDamage(
 function(object, damager)
 if GetObjectLastHitWeaponClass(object) == "choke_weapon_name" then
 SetProperty(damager, "AddHealth", *number*)
 end 
end
 )
Obviously *number* would be replaced with the amount of health to add and choke_weapon_name the name of your choke weapon ;)
Post Reply