Disable the item kit
Disable the item kit
When the soldier dies, lets his kit in place for a few seconds, giving opportunity to other soldiers (players) take the kit.
Is it possible to disable or reduce the time?
It is possible to change this property?
Is it possible to disable or reduce the time?
It is possible to change this property?
- Apache Thunder
- Posts: 1213
- Joined: Mon Oct 19, 2009 2:48 am
- Location: Levelland Texas, USA
- Contact:
Re: Disable the item kit
My BFH mod features this.
Simply add this code line exactly as it appears to your kit(s):
You can also use an invisible geometry for the kit since it will immediately sink under the terrain anyway. This code won't disable the kit, it merely allows it to fall through the terrain. Most normal kits in most mods don't have a collision mesh on the main geometry. (the one you see when the kit is on the ground). Hence the sinking through terrain and becoming unavailable for players to pick up. In the unlikely event your kit(s) do have a collision mesh, do NOT disable collision physics! It will result in client side bugs like kit weapon icons not working. Just remove the collision meshes and your good to go. 
Don't expect the timeToLive or the timeToLiveAfterDeath codes to work on kits. They have no effect. However in BF2, the timeToLiveAfterDeath command does work and adding mobile physics is therefor unnecessary.
Simply add this code line exactly as it appears to your kit(s):
Code: Select all
ObjectTemplate.setHasMobilePhysics 1

Don't expect the timeToLive or the timeToLiveAfterDeath codes to work on kits. They have no effect. However in BF2, the timeToLiveAfterDeath command does work and adding mobile physics is therefor unnecessary.



I have cameras in your head!
Re: Disable the item kit
Isn't there a line of code that tells the game how long the weapon kit can sit on the ground brfore disappearing?
If there is, you can set that to 0.01 and it should disappear.
If there is, you can set that to 0.01 and it should disappear.
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
Re: Disable the item kit
I observed it to be exactly 30 seconds. I had looked through kits and soldiers code, but found nothing. Could it be hard-coded?
dzn.battlefield.pl - my Bf1942 modding website
- Apache Thunder
- Posts: 1213
- Joined: Mon Oct 19, 2009 2:48 am
- Location: Levelland Texas, USA
- Contact:
Re: Disable the item kit
In BF1942/BFV, it's hardcoded. You can either make them disappear with mobile physics or have them last 30 seconds. Nothing in between unfortunately.



I have cameras in your head!
Re: Disable the item kit
Hmm... use GravityModifier to make it sink slower?
dzn.battlefield.pl - my Bf1942 modding website
- Apache Thunder
- Posts: 1213
- Joined: Mon Oct 19, 2009 2:48 am
- Location: Levelland Texas, USA
- Contact:
Re: Disable the item kit
GravityModifier is only known to work on Sprites/Particles and Projectiles. I have not seen it work on anything else. Sorry.



I have cameras in your head!
Re: Disable the item kit
I made it work on my shoes, it's fun. I jump over my house, sneak over barbed wire fences, jump over
the moon ... float past my neighbors as they sit and watch the grass grow.
the moon ... float past my neighbors as they sit and watch the grass grow.
Re: Disable the item kit
Ok, I'll try it.
Thanks
Thanks