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

Ask questions, discuss ideas, get answers
Diamondback
Posts: 589
Joined: Mon Oct 01, 2012 3:13 pm
Location: Canada
Contact:

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

Post 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?
See my Strasbourg map project here.
russ
Posts: 73
Joined: Sun Oct 29, 2017 8:12 am

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

Post 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.
takiwa
Posts: 134
Joined: Mon Dec 30, 2013 4:29 pm
Location: The Great State of Georgia

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

Post 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
Image
Diamondback
Posts: 589
Joined: Mon Oct 01, 2012 3:13 pm
Location: Canada
Contact:

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

Post 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.
See my Strasbourg map project here.
russ
Posts: 73
Joined: Sun Oct 29, 2017 8:12 am

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

Post 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?
Diamondback
Posts: 589
Joined: Mon Oct 01, 2012 3:13 pm
Location: Canada
Contact:

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

Post 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.
See my Strasbourg map project here.
russ
Posts: 73
Joined: Sun Oct 29, 2017 8:12 am

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

Post 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.
Diamondback
Posts: 589
Joined: Mon Oct 01, 2012 3:13 pm
Location: Canada
Contact:

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

Post 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.
See my Strasbourg map project here.
russ
Posts: 73
Joined: Sun Oct 29, 2017 8:12 am

Post 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.
Diamondback
Posts: 589
Joined: Mon Oct 01, 2012 3:13 pm
Location: Canada
Contact:

Re:

Post 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.
See my Strasbourg map project here.
Post Reply