Page 1 of 4

Fixing the CTF flag object so it doesn't fall through meshes

Posted: Fri Feb 23, 2018 2:40 am
by Diamondback
Hi, as the title implies, I'm trying to make a CTF flag object that doesn't fall through objects when the player drops the flag. I have replaced the animated flag object from vanilla by an ammobox, but the ammobox still has no collision. Any ideas on how to proceed to make a solid flag object that doesn't fall through meshes?

Re: Fixing the CTF flag object so it doesn't fall through me

Posted: Fri Feb 23, 2018 7:02 am
by russ
The Flag is an Item, which is a Bundle, which is a SimpleObject, which is an Object. A Kit is also an Item, so really whatever a Kit can do, a Flag should be able to do. Have you tried HasCollisionPhysics?

http://bfmods.com/mdt/scripting/ObjectT ... ysics.html

BTW, found something while I was searching for thing on this. Looks like any item (Kit, Flag) can spin if you apply a yawSpeed.

Re: Fixing the CTF flag object so it doesn't fall through me

Posted: Fri Feb 23, 2018 6:49 pm
by takiwa
yeah, you should be able to set the HasCollisionPhysics property to 1, and stop this problem...

as another fix, bundle something small to the flag properties that has a known collision and physical properties, and see what happens

Re: Fixing the CTF flag object so it doesn't fall through me

Posted: Sat Feb 24, 2018 1:41 am
by Diamondback
None of these methods work. The flag object is a different type of object which has a geometry that doesn't respond to surrounding meshes. It only interacts with the terrain and nothing else. I tried adding the ObjectTemplate.HasCollisionPhysics 1 command but that didn't work. Also tried to change the geometry of the flag to that of an ammobox, but it still has no collision. Nothing seems to work unfortunately.

Re: Fixing the CTF flag object so it doesn't fall through me

Posted: Sat Feb 24, 2018 8:34 am
by russ
Ok, I'm looking at the code. Can you test something for me? When someone is in a plane and they lose the flag, does the flag fall, or does it just appear on the ground?

Re: Fixing the CTF flag object so it doesn't fall through me

Posted: Sat Feb 24, 2018 9:18 pm
by Diamondback
russ wrote:Ok, I'm looking at the code. Can you test something for me? When someone is in a plane and they lose the flag, does the flag fall, or does it just appear on the ground?
The flag will just appear on the ground, it doesn't fall like a normal object, because it is a "Flag" object. These objects respond differently than PCOs or statics.

Re: Fixing the CTF flag object so it doesn't fall through me

Posted: Sat Feb 24, 2018 11:30 pm
by russ
OK, this is what I was afraid of. You can make the flag respond like normal objects. However, when it is dropped by a player it "spawns" on the surface of the elevation mesh. You could try to prove this by adding HasCollisionPhysics and HasResponsePhysics, making sure it has a geometry with a collision mesh, and then pushing it around with a jeep.

Re: Fixing the CTF flag object so it doesn't fall through me

Posted: Sat Feb 24, 2018 11:50 pm
by Diamondback
russ wrote:OK, this is what I was afraid of. You can make the flag respond like normal objects. However, when it is dropped by a player it "spawns" on the surface of the elevation mesh. You could try to prove this by adding HasCollisionPhysics and HasResponsePhysics, making sure it has a geometry with a collision mesh, and then pushing it around with a jeep.
Yup, this is what I have tried to do, with both of these commands. Nothing works.

Posted: Sun Feb 25, 2018 1:50 am
by russ
What do you mean by "nothing works". It still falls through meshes, or jeeps can't push it around when it's out on the ground? From what I can see, you can fix the flag object so it won't fall through meshes, but it doesn't help because it spawns directly on the elevation mesh, so it doesn't have a chance to collide with anything anyway.

Re:

Posted: Sun Feb 25, 2018 6:35 am
by Diamondback
russ wrote:What do you mean by "nothing works". It still falls through meshes, or jeeps can't push it around when it's out on the ground? From what I can see, you can fix the flag object so it won't fall through meshes, but it doesn't help because it spawns directly on the elevation mesh, so it doesn't have a chance to collide with anything anyway.
No you can't make it interact with other meshes.The CTF flag will fall through meshes, the only thing that it doesn't fall through is the terrain. There is no fix to this unless you edit the EXE I imagine. I hate BF1942's engine limitations. So frustrating.