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

Ask questions, discuss ideas, get answers

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

Postby Classical Modder » Fri Feb 23, 2018 2:40 am

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?
{SoH} Clan Leader // http://sohclan.forumotion.com/
See my Strasbourg map project here.
GSC: diamondback67
Steam: diamondback67
Classical Modder
 
Posts: 417
Joined: Mon Oct 01, 2012 3:13 pm
Location: Canada

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

Postby russ » Fri Feb 23, 2018 7:02 am

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?

mdt/scripting/ObjectTemplate/Properties/HasCollisionPhysics.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.
russ
 
Posts: 43
Joined: Sun Oct 29, 2017 8:12 am

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

Postby takiwa » Fri Feb 23, 2018 6:49 pm

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
takiwa
 
Posts: 121
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

Postby Classical Modder » Sat Feb 24, 2018 1:41 am

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.
{SoH} Clan Leader // http://sohclan.forumotion.com/
See my Strasbourg map project here.
GSC: diamondback67
Steam: diamondback67
Classical Modder
 
Posts: 417
Joined: Mon Oct 01, 2012 3:13 pm
Location: Canada

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

Postby russ » Sat Feb 24, 2018 8:34 am

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?
russ
 
Posts: 43
Joined: Sun Oct 29, 2017 8:12 am

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

Postby Classical Modder » Sat Feb 24, 2018 9:18 pm

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.
{SoH} Clan Leader // http://sohclan.forumotion.com/
See my Strasbourg map project here.
GSC: diamondback67
Steam: diamondback67
Classical Modder
 
Posts: 417
Joined: Mon Oct 01, 2012 3:13 pm
Location: Canada

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

Postby russ » Sat Feb 24, 2018 11:30 pm

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.
russ
 
Posts: 43
Joined: Sun Oct 29, 2017 8:12 am

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

Postby Classical Modder » Sat Feb 24, 2018 11:50 pm

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.
{SoH} Clan Leader // http://sohclan.forumotion.com/
See my Strasbourg map project here.
GSC: diamondback67
Steam: diamondback67
Classical Modder
 
Posts: 417
Joined: Mon Oct 01, 2012 3:13 pm
Location: Canada

Postby russ » Sun Feb 25, 2018 1:50 am

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.
russ
 
Posts: 43
Joined: Sun Oct 29, 2017 8:12 am

Re:

Postby Classical Modder » Sun Feb 25, 2018 6:35 am

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.
{SoH} Clan Leader // http://sohclan.forumotion.com/
See my Strasbourg map project here.
GSC: diamondback67
Steam: diamondback67
Classical Modder
 
Posts: 417
Joined: Mon Oct 01, 2012 3:13 pm
Location: Canada

Next

Return to 1942 Modding Discussion

Who is online

Users browsing this forum: No registered users and 14 guests