DeAcceleration bullet in bf2?

Until this forum becomes busy just include BF2, 2142 or BFV in the title
Post Reply
velosong
Posts: 2
Joined: Mon Apr 04, 2011 4:33 am

DeAcceleration bullet in bf2?

Post by velosong »

Hi,everyone,i`m new here.
Recently i try to modify the bullet in bf2 which is simple and unreal. First of all i want add de-Acceleration factor to projectiles but get trouble.
I can make the bullet reduce speed by setting an engine, but just imagine how slow it could be, the cpu probablely die for that. So , i have to look for other code that can de-accelerate the projectile.

So, i have tested the DeAcceleration code, Unfortunately it dosent work.

Code: Select all

ObjectTemplate.UseDeAcceleration 1
ObjectTemplate.DeAcceleration 50
or

Code: Select all

ObjectTemplate.setUseDeAcceleration 1
ObjectTemplate.setDeAcceleration 50/50/50
they failed to reduce the bullet speed. For experiment,i set Acceleration instead, it works fine. Just DeAcceleration can not work.

i dont kown what is wrong with that, here s my experimental bullet tweak, please have a look. Any help will be appreciated.

by the way, the projectlie velocity defined in rifle tweak is

Code: Select all

ObjectTemplate.velocity 10
projectile live time is 20, if there is no deacceleration it should end at 200m.

Code: Select all

ObjectTemplate.create GenericProjectile Projectile_DeAcceleration_Tester

rem-----------------------------
ObjectTemplate.material 9999
ObjectTemplate.damage 50
rem-----------------------------

ObjectTemplate.gravityModifier 0

rem didnt work** ObjectTemplate.setUseDeAcceleration 1
rem didnt work** ObjectTemplate.setDeAcceleration 50/50/50

ObjectTemplate.UseDeAcceleration 1
ObjectTemplate.DeAcceleration 50

ObjectTemplate.createNotInGrid 1
rem ---BeginComp:DefaultCollisionComp ---
ObjectTemplate.createComponent DefaultCollisionComp
rem ---EndComp ---
rem ---BeginComp:DefaultDetonationComp ---
ObjectTemplate.createComponent DefaultDetonationComp
ObjectTemplate.detonation.explosionMaterial 9998
ObjectTemplate.detonation.explosionRadius 3
ObjectTemplate.detonation.explosionForce 0
ObjectTemplate.detonation.explosionDamage 25
ObjectTemplate.detonation.detectionRadius 1
ObjectTemplate.detonation.maxDepthForExplosion 2
ObjectTemplate.detonation.detonateOnWaterCollision 0
ObjectTemplate.detonation.timeUntilCanDetonate 0.08
rem ---EndComp ---
rem ---BeginComp:DefaultProjSoundComp ---
ObjectTemplate.createComponent DefaultProjSoundComp
rem ---EndComp ---
rem ---BeginComp:DefaultRicochetComp ---
ObjectTemplate.createComponent DefaultRicochetComp
rem ---EndComp ---
rem ---BeginComp:DefaultPenetrateComp ---
ObjectTemplate.createComponent DefaultPenetrateComp
ObjectTemplate.penetrate.allowSolidPenetration 1
ObjectTemplate.penetrate.allowLiquidPenetration 0
rem ---EndComp ---
ObjectTemplate.floaterMod 0
ObjectTemplate.hasMobilePhysics 1
ObjectTemplate.hasCollisionPhysics 1
ObjectTemplate.physicsType Point
ObjectTemplate.collisionGroups 8
ObjectTemplate.hasOnTimeEffect 1
ObjectTemplate.timeToLive CRD_NONE/20/0/0

User avatar
Dennis|8749236
Posts: 239
Joined: Sun Nov 29, 2009 6:02 am
Location: Earth
Contact:

Re: DeAcceleration bullet in bf2?

Post by Dennis|8749236 »

deacceleration code don't work in projectile i think..
What is the meaning of Life?? (Don't think about it!)
User avatar
Apache Thunder
Posts: 1205
Joined: Mon Oct 19, 2009 2:48 am
Location: Levelland Texas, USA
Contact:

Re: DeAcceleration bullet in bf2?

Post by Apache Thunder »

Does adding drag to the bullet help? You may need to remove point physics from the bullet as well. But my understanding on how BF2 projectiles work is a bit limited. They don't behave quite the same as BF1942. Case in point, I can't get koopa shells to behave the same in BF2 as they did in my BF1942 Mario Kart mod. :(
ImageImageImage
I have cameras in your head!
freddy
Posts: 1247
Joined: Sun Oct 18, 2009 4:58 pm

Re: DeAcceleration bullet in bf2?

Post by freddy »

velosong wrote: For experiment,i set Acceleration instead, it works fine.
try a negative value for acceleration, with any luck it work
velosong
Posts: 2
Joined: Mon Apr 04, 2011 4:33 am

Re: DeAcceleration bullet in bf2?

Post by velosong »

Apache Thunder wrote:Does adding drag to the bullet help? You may need to remove point physics from the bullet as well. But my understanding on how BF2 projectiles work is a bit limited. They don't behave quite the same as BF1942. Case in point, I can't get koopa shells to behave the same in BF2 as they did in my BF1942 Mario Kart mod. :(
freddy wrote:
velosong wrote: For experiment,i set Acceleration instead, it works fine.
try a negative value for acceleration, with any luck it work
yes, i have tested it with drag before. The problem is that drag effects the velocity in total, which means in the moment of projectile leave rifle barrel, it is slowed by the drag already, it is a constant value rather than reduce speed meter by meter. Once it is added, the speed of projectile shold be change from "10--10--10--10" to "5--5--5--5", but what i want is "10-8-6-4".

to,Freddy. no, negative value dosent work at all. I have tested that many times, i think it is illegel in BF2. Only positive value works fine)
see my code

Code: Select all

ObjectTemplate.Acceleration -100
User avatar
Apache Thunder
Posts: 1205
Joined: Mon Oct 19, 2009 2:48 am
Location: Levelland Texas, USA
Contact:

Re: DeAcceleration bullet in bf2?

Post by Apache Thunder »

Did you try adding a force object that applies thrust in the opposite direction the bullet is going? If done correctly it could have the same effect. ForceObjects are something new starting in BF2. They aren't as complex as engine coding thus it shouldn't lag too much if bullets have them.
ImageImageImage
I have cameras in your head!
User avatar
Dennis|8749236
Posts: 239
Joined: Sun Nov 29, 2009 6:02 am
Location: Earth
Contact:

Re: DeAcceleration bullet in bf2?

Post by Dennis|8749236 »

add a wing to deaccelerate?
i use wings to make my AirDrop tank in BF1942 to fall slower, so it can land safely..
What is the meaning of Life?? (Don't think about it!)
Post Reply