Page 1 of 1

Odf functions

Posted: Wed Feb 04, 2009 8:10 pm
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!

Re: Odf functions

Posted: Wed Feb 04, 2009 8:13 pm
by bhawkgoalie10

Re: Odf functions

Posted: Wed Feb 04, 2009 8:20 pm
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.

Re: Odf functions

Posted: Wed Feb 04, 2009 8:21 pm
by Master_Ben
This I found in the grenade odf:

Code: Select all

ShotDelay           = "1.3"
Dunno if it'll help.

Re: Odf functions

Posted: Wed Feb 04, 2009 8:21 pm
by Fiodis
How about you just set the ordance in the weapon's ODF as the mortar launcher's ordance?

Re: Odf functions

Posted: Wed Feb 04, 2009 8:25 pm
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

Re: Odf functions

Posted: Wed Feb 04, 2009 8:30 pm
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.

Re: Odf functions

Posted: Wed Feb 04, 2009 8:37 pm
by Fiodis
Take a peek at the mortar's ordance's ODF. See if you can find anything suspicious.

Re: Odf functions

Posted: Wed Feb 04, 2009 8:45 pm
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:

Re: Odf functions

Posted: Wed Feb 04, 2009 9:33 pm
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.

Re: Odf functions

Posted: Fri Feb 06, 2009 5:10 pm
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.