Page 1 of 1

Doesn't drop kit?

Posted: Sat Jun 19, 2010 6:20 pm
by motoko
How would I make it, so that when someone dies, the kit they drop doesn't drop or it disappears quicker? Couldn't find anything on the ssm backup, but I didn't look too hard.

Posted: Sat Jun 19, 2010 6:41 pm
by freddy

Code: Select all

objecttemplate.active USArmy_Assault
ObjectTemplate.hasCollisionPhysics 0

Re: Doesn't drop kit?

Posted: Sat Jun 19, 2010 8:16 pm
by Apache Thunder
Or this works too:

Code: Select all

ObjectTemplate.active ExampleKit
ObjectTemplate.setHasMobilePhysics 1
Then the kit just falls through the terrain and becomes unreachable. It also means it never really appears to the player. It drops fast enough to where you will never see it.:P

Re: Doesn't drop kit?

Posted: Thu Jul 01, 2010 7:37 am
by Pepper
I tried out both codes Client side and

Code: Select all

ObjectTemplate.active ExampleKit
ObjectTemplate.setHasMobilePhysics 0
has a difference to

Code: Select all

objecttemplate.active USArmy_Assault
ObjectTemplate.hasCollisionPhysics 0
the mobilephysics seems to affect the game less, at least for starting a game in singleplayer.
when using the first code the kit just drops threw the ground like apache said. and the code freddy put out casuses white square boxes to appear over
all the items in the kit and when u die the kit seems to stay ontop of the ground but u are unable to get it.

why would this happen? being able to see the kit but not get it with white squar boxes around the kit (knife) Pistol (Mainwepond) nades (ect)----have white boxes around them
comparing that to the one with no evident prblems?

Re: Doesn't drop kit?

Posted: Thu Jul 01, 2010 8:08 am
by Apache Thunder
Yes I forgot about that. Turning off collision physics for kits appears to be a big no no. It causes HUD glitches (client side only?). Go with the mobile physics route. At this point it's the only way to rid the kit from the map.

My BFheroes mod has most of the kits disappear in this manner. It works fine in multiplayer. The geometry used on the kits (the mesh you see when the kit is on the ground) normally has no collision mesh, so making it mobile makes it just fall through the ground. If in the unlikely event your kit does have a mesh that has a collision mesh, then you'll need to remove it.

Perhaps the collision physics method works best on clients connected to a server that turned off collision physics for the kit. (The clients would not have this setting turned off so perhaps they won't get the hud glitch) So use the collision physics method if your running a dedicated server and this is a server mod. Use the mobile physics if you intend to use this in a client side mod. Though mobile physics method works best in both cases anyway. ;)

Posted: Thu Jul 01, 2010 10:30 am
by freddy
ah yes i use that code as SSM where it works fine, one other thing i have used it for is when i need a marker for something, like if you have a jump-pad placed in the map (witch is invisible SSM)

Re: Doesn't drop kit?

Posted: Thu Jul 01, 2010 12:09 pm
by Jeronimo
Isn't there a simple timeToLive property for the backpacks somewhere? Set to around 30 by default? :?
If so, that would be much easier to accomplish...

Re: Doesn't drop kit?

Posted: Thu Jul 01, 2010 5:45 pm
by Apache Thunder
TimeToLive and TimeToLifeAfterDeath don't seem to work on kits.

Re: Doesn't drop kit?

Posted: Sat Jul 03, 2010 4:59 am
by Coroner47
Kinda funny... i'm trying to figure out how to get the kits to drop & stay. I put the code into my mod somewhere! I've looked 3 times & can't find it... very frustrating. I wanna have a kit that you can pick up & drop that has the geometry of a human body as a backpack for hostage rescues. :twisted:

Re: Doesn't drop kit?

Posted: Sun Jul 04, 2010 12:11 am
by Pepper
when u mean mod do u mean a completly sepret mod like Xpack1, Xpack2, Homefront, DC, DC_Final?