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

Ask questions, discuss ideas, get answers
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 »

Out of curiosity, what actions did you test?
User avatar
Swaffy
Posts: 1715
Joined: Sun Aug 29, 2010 9:25 pm
Location: Cibolo, Texas

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

Post by Swaffy »

I can't even find the code for the damn thing, hah ...
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
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 »

I don't mean the code, I mean what did you try? Shooting at it? Throwing grenades at it? Pushing it with a jeep? etc.
freddy
Posts: 1267
Joined: Sun Oct 18, 2009 4:58 pm

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

Post by freddy »

I think it atleast needs ObjectTemplate.mass # if its to interact with other objects
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 »

freddy wrote:I think it atleast needs ObjectTemplate.mass # if its to interact with other objects
Not necessarily: http://bfmods.com/viewtopic.php?f=6&t=18076
See my Strasbourg map project here.
User avatar
Swaffy
Posts: 1715
Joined: Sun Aug 29, 2010 9:25 pm
Location: Cibolo, Texas

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

Post by Swaffy »

Classical Modder wrote:
freddy wrote:I think it atleast needs ObjectTemplate.mass # if its to interact with other objects
Not necessarily: http://bfmods.com/viewtopic.php?f=6&t=18076
give the flag a mass just for the sake of testing, you never know...
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
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 »

Swaffy wrote:
Classical Modder wrote:
freddy wrote:I think it atleast needs ObjectTemplate.mass # if its to interact with other objects
Not necessarily: http://bfmods.com/viewtopic.php?f=6&t=18076
give the flag a mass just for the sake of testing, you never know...
Fine lol, but I know it won't work
See my Strasbourg map project here.
User avatar
Swaffy
Posts: 1715
Joined: Sun Aug 29, 2010 9:25 pm
Location: Cibolo, Texas

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

Post by Swaffy »

SPOILER
Image
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
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 »

So today I was looking at the Network.con file for the Flag object and I came across this:

(Taken from Objects/Items/Flag/Network.con):

Code: Select all

NetworkableInfo.createNewInfo FlagBodyInfo
NetworkableInfo.setHasOrientation 1
NetworkableInfo.setBasePriority c_NIGhostAlways
NetworkableInfo.setPredictionMode PMNone
The Flag object has different Network Info compared to a regular PCO. If we take the Jeep for example, this is what we get:

Code: Select all

NetworkableInfo.createNewInfo WillyEngineInfo
NetworkableInfo.setPredictionMode PMLinear
I am not sure, but I think the NetworkableInfo.setBasePriority c_NIGhostAlways line tells the Flag object to essentially be a ghost, i.e., it doesn't interact with the environment (except for the terrain). I will try to remove that line and change the PredictionMode to PMLinear and see if it changes anything. So far I think this is the best clue we have as to why the Flag object doesn't interact with anything.
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 »

Sorry man, it's hardcoded. The position of the flag gets set to the position of the "vehicle" that dropped it, and the height gets set to the height of the terrain at that point (plus 1.5). You might be able to combine it with some other object so it interacts after that, but there's nothing that can be done short of patching the executable that will change the drop position.
Post Reply