Changing the bullet decal time

Making or wanting help making your own asset? Check in here
Post Reply
Fragmentality
Posts: 8
Joined: 2015-07-08 20:10

Changing the bullet decal time

Post by Fragmentality »

I'm looking for a way to change the time bullet holes stay in the environment, primarily for some testing purposes. Is this hardcoded, or is there a line of code in the files which can be used to change this timer? I'd appreciate help on this a lot. :)
Image
User avatar
Mats391
PR:BF2 Lead Developer
Posts: 7643
Joined: 2010-08-06 18:06

Re: Changing the bullet decal time

Post by Mats391 »

try decalManager.timeToLive float -> float
Image

Mineral: TIL that Wire-guided missiles actually use wire
Fragmentality
Posts: 8
Joined: 2015-07-08 20:10

Re: Changing the bullet decal time

Post by Fragmentality »

Works perfectly, thank you very much.
Image
Cavazos
Posts: 454
Joined: 2007-06-20 05:01

Re: Changing the bullet decal time

Post by Cavazos »

I enter this into the console for a local server and it gives me the message that the variable after "->" must start with "v_". How do I modify the value?
User avatar
Mats391
PR:BF2 Lead Developer
Posts: 7643
Joined: 2010-08-06 18:06

Re: Changing the bullet decal time

Post by Mats391 »

'[TP wrote:Cavazos;2090399']I enter this into the console for a local server and it gives me the message that the variable after "->" must start with "v_". How do I modify the value?
Just use the first part and replace "float" with the number you want: decalManager.timeToLive float
the -> is just return type of the function, so if it works it should print the same number you entered on the console.
Image

Mineral: TIL that Wire-guided missiles actually use wire
Fragmentality
Posts: 8
Joined: 2015-07-08 20:10

Re: Changing the bullet decal time

Post by Fragmentality »

I simply edited the gamelogicinit.con file, adding the extra line. Though it's probably not useful for all purposes since you can't edit it on the fly.
Image
Avenged_Fate
Posts: 40
Joined: 2015-03-29 02:06

Re: Changing the bullet decal time

Post by Avenged_Fate »

[R-DEV]Mats391 wrote:try decalManager.timeToLive float -> float
Bumping this thread because of few questions:
-can this be inputted into some kind of file inside of PR's directory or it is only inputted in the server's console?

-does this 'code' work for public servers or is it only applicable to local servers?

-is there a similar code to increase corpse count and, if so, how would the answers to the questions above be?
Post Reply

Return to “PR:BF2 Community Modding”