Odf functions

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
elfie
Field Commander
Field Commander
Posts: 931
Joined: Fri Jan 25, 2008 8:26 pm
Games I'm Playing :: no games
xbox live or psn: no live
Location: Coruscant, Jedi Temple
Contact:

Odf functions

Post by elfie »

Hey, is there an odf function in the grenade odfs that controls the amount of time until the grenade explodes? Because I want it to explode the second it hits an object or terrain. I tried LifeSpan = "0.5" in the ord file, but that didn't work. Is it even in the odf files or is it hard-coded? Thanks!
bhawkgoalie10
Private Second Class
Posts: 60
Joined: Mon Dec 29, 2008 1:55 pm

Re: Odf functions

Post by bhawkgoalie10 »

Taivyx
2008 Best Games Related Avatar
Posts: 1706
Joined: Thu Jun 07, 2007 3:34 pm
Projects :: Terra Strife - discontinued
Games I'm Playing :: none
xbox live or psn: No gamertag set
Contact:

Re: Odf functions

Post by Taivyx »

I'm looking for this as well, and just a note to anyone who's pulling random solutions out of a hat, I've tried

Code: Select all

LifeSpan = "0.0000001'

Result: After thrown the grenade just stays there in the air, unmoving, and never exploding.
Master_Ben
Lieutenant General
Lieutenant General
Posts: 675
Joined: Wed Nov 12, 2008 9:50 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Watching your PC over your shoulder. No, the other sholder....

Re: Odf functions

Post by Master_Ben »

This I found in the grenade odf:

Code: Select all

ShotDelay           = "1.3"
Dunno if it'll help.
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: Odf functions

Post by Fiodis »

How about you just set the ordance in the weapon's ODF as the mortar launcher's ordance?
bhawkgoalie10
Private Second Class
Posts: 60
Joined: Mon Dec 29, 2008 1:55 pm

Re: Odf functions

Post by bhawkgoalie10 »

Taivyx wrote:I'm looking for this as well, and just a note to anyone who's pulling random solutions out of a hat, I've tried

Code: Select all

LifeSpan = "0.0000001'

Result: After thrown the grenade just stays there in the air, unmoving, and never exploding.
awesome lol
Master_Ben
Lieutenant General
Lieutenant General
Posts: 675
Joined: Wed Nov 12, 2008 9:50 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Watching your PC over your shoulder. No, the other sholder....

Re: Odf functions

Post by Master_Ben »

Fiodis wrote:How about you just set the ordance in the weapon's ODF as the mortar launcher's ordance?
That seems the best Idea. I'd like to know how to do it in an edity way, though.
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: Odf functions

Post by Fiodis »

Take a peek at the mortar's ordance's ODF. See if you can find anything suspicious.
obiboba3po
2008 Most Technically Challenging Avatar
Posts: 2376
Joined: Tue Feb 12, 2008 7:46 pm
Projects :: No Mod project currently.
Games I'm Playing :: League of Legends
xbox live or psn: No gamertag set
Location: NJ, USA

Re: Odf functions

Post by obiboba3po »

Taivyx wrote:I'm looking for this as well, and just a note to anyone who's pulling random solutions out of a hat, I've tried

Code: Select all

LifeSpan = "0.0000001'

Result: After thrown the grenade just stays there in the air, unmoving, and never exploding.
that should be all you need. after messing around with sky's released cluster bomb, that factor became very crucial :yes:
User avatar
Sky_216
Droid Pilot Assassin
Droid Pilot Assassin
Posts: 2086
Joined: Mon Feb 13, 2006 3:28 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

Re: Odf functions

Post by Sky_216 »

Clearing up a few things


Grenades only explode when they stop moving. The timer won't start until they stop moving. There is a simple code around this -
StartTimerOnContact = "0"
This however means they can blow up midair.

If you set the 'stick' functions all to 1, and give the grenade a lifetime of 0.1 or less, it appears to explode as soon as it hits something (stops moving therefore timer starts therefore explodes). Unfortunately, they can't stick to objects, so will bounce of them.

The simplest way to do this is change the ordnance type to 'shell' (type the mortar launcher normal ordnance uses) rather than 'sticky.' Your nade will blow up the second it hits something.

Taivyx wrote:I'm looking for this as well, and just a note to anyone who's pulling random solutions out of a hat, I've tried

Code: Select all

LifeSpan = "0.0000001'

Result: After thrown the grenade just stays there in the air, unmoving, and never exploding.
Thats because it's been rounded down to 0 (pretty sure minimum value is 0.01) Any 'sticky' type ordnance with lifespan 0 does that. They eventually overload the game because they never disappear.
Master_Ben wrote:This I found in the grenade odf:

Code: Select all

ShotDelay = "1.3"
Dunno if it'll help.
That's how long between throws.
User avatar
elfie
Field Commander
Field Commander
Posts: 931
Joined: Fri Jan 25, 2008 8:26 pm
Games I'm Playing :: no games
xbox live or psn: no live
Location: Coruscant, Jedi Temple
Contact:

Re: Odf functions

Post by elfie »

Thanks, sky and all of you guys. I'm pretty sure this will work, but I will let you know if I have any problems.
Post Reply