Doesn't drop kit?

Ask questions, discuss ideas, get answers
Post Reply
motoko
Posts: 217
Joined: Sun Nov 21, 2010 8:43 pm
Location: Dante's 6th Pit of Hell

Doesn't drop kit?

Post 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.
freddy
Posts: 1267
Joined: Sun Oct 18, 2009 4:58 pm

Post by freddy »

Code: Select all

objecttemplate.active USArmy_Assault
ObjectTemplate.hasCollisionPhysics 0
User avatar
Apache Thunder
Posts: 1210
Joined: Mon Oct 19, 2009 2:48 am
Location: Levelland Texas, USA
Contact:

Re: Doesn't drop kit?

Post 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
ImageImageImage
I have cameras in your head!
Pepper
Posts: 6
Joined: Thu Jul 01, 2010 7:08 am

Re: Doesn't drop kit?

Post 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?
User avatar
Apache Thunder
Posts: 1210
Joined: Mon Oct 19, 2009 2:48 am
Location: Levelland Texas, USA
Contact:

Re: Doesn't drop kit?

Post 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. ;)
ImageImageImage
I have cameras in your head!
freddy
Posts: 1267
Joined: Sun Oct 18, 2009 4:58 pm

Post 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)
Jeronimo
Posts: 196
Joined: Sun Dec 27, 2009 8:55 pm
Location: Germany
Contact:

Re: Doesn't drop kit?

Post 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...
Image
User avatar
Apache Thunder
Posts: 1210
Joined: Mon Oct 19, 2009 2:48 am
Location: Levelland Texas, USA
Contact:

Re: Doesn't drop kit?

Post by Apache Thunder »

TimeToLive and TimeToLifeAfterDeath don't seem to work on kits.
ImageImageImage
I have cameras in your head!
Coroner47
Posts: 213
Joined: Tue Nov 24, 2009 5:11 am
Location: Canada

Re: Doesn't drop kit?

Post 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:
Image
Pray hard, die fast
Pepper
Posts: 6
Joined: Thu Jul 01, 2010 7:08 am

Re: Doesn't drop kit?

Post by Pepper »

when u mean mod do u mean a completly sepret mod like Xpack1, Xpack2, Homefront, DC, DC_Final?
Post Reply