Explosive Push [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
Glitch25
Sergeant Major
Sergeant Major
Posts: 222
Joined: Mon May 07, 2012 1:01 pm
Projects :: [ISM] [BFU]
Games I'm Playing :: [SWBFII] [SWBFI]
Location: Baktoid Combat Automata
Contact:

Explosive Push [Solved]

Post by Glitch25 »

I loved that you could survive grenades in the first battlefront and every time you did you went flying. :lol: The game itself still uses this IF you are killed by an explosive. My question is, does anyone know how to create an explosive push when grenades go off while allowing the player to survive?

Code: Select all

Damage = "450.0" <------------------how much damage is done when hit by explosion
DamageRadiusInner = "4.5"
DamageRadiusOuter = "6.5"

Push = "10.0" <----------------The higher the further you get pushed back
PushRadiusInner = "6.5"
PushRadiusOuter = "6.5"

Shake = "0.5" <------------------how long the screen shakes when experiencing an explosion
ShakeLength = "0.75"
ShakeRadiusInner = "8.0"
ShakeRadiusOuter = "15.0"
Last edited by Glitch25 on Sat Dec 08, 2012 1:32 pm, edited 1 time in total.
kinetosimpetus
Imperial Systems Expert
Imperial Systems Expert
Posts: 2381
Joined: Wed Mar 25, 2009 4:15 pm
Projects :: A secret project
Games I'm Playing :: Warframe STO

Re: Explosive Push

Post by kinetosimpetus »

The code is used in the Wampa jump attack explosion, it's something like PushDeadOnly = 0
Noobasaurus
Droid Pilot Assassin
Droid Pilot Assassin
Posts: 2006
Joined: Tue Aug 17, 2010 5:56 pm

Re: Explosive Push

Post by Noobasaurus »

Glitch25 wrote:My question is, does anyone know how to create an explosive push when grenades go off while allowing the player to survive?
Yep. Go check out some of SBF_Dann_boeing's maps. They have things exactly like what you're talking about. He has also released assets for some of his stuff, so you can go in there too and find the files you are looking for.

There are two parts to what you are talking about. There is just flying up when the grenade goes off and actually being able to control yourself when flying and tumbling through the air. Here are some values for com_jedi_default or something like that. Stick these in to the soldier one of that file and you'll be able to control yourself.
Hidden/Spoiler:
ControlSpeed = "stand 1.00 1.00 1.00"
ControlSpeed = "crouch 0.70 0.60 1.00"
ControlSpeed = "prone 0.30 0.20 0.50"
ControlSpeed = "sprint 2.50 0.50 0.50"
ControlSpeed = "jet 1.50 1.25 1.25"
ControlSpeed = "jump 0.10 0.10 0.60"
ControlSpeed = "roll 0.02 0.02 0.35"
ControlSpeed = "tumble 0.00 0.00 0.10"
And for the weapon explosion odf all you really need to do is set the damage to zero and the push to a nice amount. But the reason why you don't go flying when you take damage(I think) is because the damage radius is smaller than the push radius.

So basically turn up the push radius and see what happens.
User avatar
Glitch25
Sergeant Major
Sergeant Major
Posts: 222
Joined: Mon May 07, 2012 1:01 pm
Projects :: [ISM] [BFU]
Games I'm Playing :: [SWBFII] [SWBFI]
Location: Baktoid Combat Automata
Contact:

Re: Explosive Push

Post by Glitch25 »

I set my grenade exp up this way, munged and tried in game.
Hidden/Spoiler:
[code][ExplosionClass]
ClassLabel = "explosion"

[Properties]
Damage = "450.0"
DamageRadiusInner = "4.5"
DamageRadiusOuter = "6.5"

Push = "10.0"
PushRadiusInner = "15.0"
PushRadiusOuter = "15.0"

Shake = "0.5"
ShakeLength = "0.75"
ShakeRadiusInner = "8.0"
ShakeRadiusOuter = "15.0"

Effect = "com_sfx_explosion_lg"
WaterEffect = "com_sfx_watersplash_lg"
Decal = "decal_explosion"
LightColor = "255 220 100 255"
LightRadius = "4.0"
LightDuration = "1.0"

VehicleScale = "2.0"
PersonScale = "0.2"
DroidScale = "0.2"
BuildingScale = "2.0"
AnimalScale = "0.2"

SoundProperty = "com_weap_thermaldetonator_exp"
//WaterExplosion = "com_weap_obj_med_water_exp"[/code]
Same result as before, loss of health no toss back. (I also tried standing farther away, same effect)
Hidden/Spoiler:
Image
I'll take a look at SBF_Dann_boeing's assets and look at that wampa odf. Thanks guys. :)

Edit: You were right kinetosimpetus! The wampa asset contained the line I needed! :D
Added the ControlSpeed to the default class, works great!
User avatar
Fiodis
Master of the Force
Master of the Force
Posts: 4145
Joined: Wed Nov 12, 2008 9:27 pm
Projects :: Rannoch + Tientia + Tools Programming

Re: Explosive Push

Post by Fiodis »

The ControlSpeed only dictates how well you're able to control your trajectory mid-air.
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: Explosive Push

Post by Marth8880 »

You can also modify the Land "time" values in the globals script to dictate how long it takes for units to fall. ;)
User avatar
Glitch25
Sergeant Major
Sergeant Major
Posts: 222
Joined: Mon May 07, 2012 1:01 pm
Projects :: [ISM] [BFU]
Games I'm Playing :: [SWBFII] [SWBFI]
Location: Baktoid Combat Automata
Contact:

Re: Explosive Push

Post by Glitch25 »

Fiodis wrote:The ControlSpeed only dictates how well you're able to control your trajectory mid-air.
I understand that. :) It's a nice little touch to the mod.
Marth8880 wrote:You can also modify the Land "time" values in the globals script to dictate how long it takes for units to fall. ;)
:o I gotta try that!
Post Reply