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

Attaching an effect to a unit [Solved]

Post by Kingpin »

Is there any way that I can make a unit just have an effect on him without having to make a new weapon?

Example: Making a unit always have the Rage buff effect, but no actual buff
Last edited by Kingpin on Tue Jul 08, 2014 7:31 pm, edited 2 times 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: Attaching an effect to a unit

Post by Marth8880 »

In the unit's ODF:

Code: Select all

DamageStartPercent	= 100.0
DamageStopPercent	= 0.0
DamageEffect		= "col_sfx_inf_harbinger_molten"
DamageAttachPoint	= "bone_ribcage"
Change the DamageEffect value to the name of the effect that you wish to attach.
User avatar
Kingpin
Jedi
Jedi
Posts: 1096
Joined: Fri Sep 13, 2013 7:09 pm
Projects :: The Sith Wars II
Location: Denver, CO
Contact:

Effect's position [Solved]

Post by Kingpin »

Thanks!
Edit: The effect is not attached to the unit, as seen here:

I have added an effect to a unit, but it is not attached to him, and just floats ahead of him.
Code in ODF
DamageStartPercent = 100.0
DamageStopPercent = 0.0
DamageEffect = "com_sfx_buffed_defense"
DamageAttachPoint = "bone_ribcage"
Image
Last edited by Kingpin on Wed Jul 09, 2014 4:56 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: Effect's position

Post by Marth8880 »

Open up com_sfx_buffed_defense.fx and change all instances of this:

Code: Select all

Offset()
		{
			PositionX(0.0000,0.0000);
			PositionY(0.2500,0.2500);
			PositionZ(0.0000,0.0000);
		}
to this:

Code: Select all

Offset()
		{
			PositionX(0.0000,0.0000);
			PositionY(0.0000,0.0000);
			PositionZ(0.0000,0.0000);
		}
User avatar
Kingpin
Jedi
Jedi
Posts: 1096
Joined: Fri Sep 13, 2013 7:09 pm
Projects :: The Sith Wars II
Location: Denver, CO
Contact:

Re: Effect's position

Post by Kingpin »

Thanks mate!
Post Reply