Fixing the CTF flag object so it doesn't fall through meshes
-
- Posts: 601
- Joined: Mon Oct 01, 2012 3:13 pm
- Location: Canada
- Contact:
Fixing the CTF flag object so it doesn't fall through meshes
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.
Re: Fixing the CTF flag object so it doesn't fall through me
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.
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
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
as another fix, bundle something small to the flag properties that has a known collision and physical properties, and see what happens
-
- Posts: 601
- Joined: Mon Oct 01, 2012 3:13 pm
- Location: Canada
- Contact:
Re: Fixing the CTF flag object so it doesn't fall through me
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.
Re: Fixing the CTF flag object so it doesn't fall through me
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?
-
- Posts: 601
- Joined: Mon Oct 01, 2012 3:13 pm
- Location: Canada
- Contact:
Re: Fixing the CTF flag object so it doesn't fall through me
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.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?
See my Strasbourg map project here.
Re: Fixing the CTF flag object so it doesn't fall through me
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.
-
- Posts: 601
- Joined: Mon Oct 01, 2012 3:13 pm
- Location: Canada
- Contact:
Re: Fixing the CTF flag object so it doesn't fall through me
Yup, this is what I have tried to do, with both of these commands. Nothing works.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.
See my Strasbourg map project here.
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.
-
- Posts: 601
- Joined: Mon Oct 01, 2012 3:13 pm
- Location: Canada
- Contact:
Re:
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.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.
See my Strasbourg map project here.