Ok first off I have no idea where that PCO code bit goes.
Second. Addtemplating a CP to a PCO will not work. That leaves the only option of making a PCO that looks like a flag (or looks like nothing and has one addtemplated to it).
Problem:
I can make a stripped down copy of the humvee and call it US_CTF_Flag and addtemplate either a flag or CP to it (the both have the same result, a humvee hull that you can abosultely nothing with). It is however a PCO, so that means that it can be spawned and should be movable via python.
Now for some odd reason I cannot change the geomety and collision mesh of it. Every time I try it CTD without an error. I have no idea why this is. I have tried making a new PCO from scrath and got the same results. There has to be somthing I am doing wrong, but I cannot figure out what.
Basically the goal is PCO with nothing (no seats, entry points, armor, etc. Nothing.) I needs to either look like an animated flag or have the flag_us addtemplated to it (flag_us is an animated flag, so would take care of that). It must be a PCO so that python can move it.
I have no idea why I cannot seem to make such a simple object. It works and looks right both in the code and in the editor, but the game keeps CTDing me.
Anyway if we have that object, we should then be able to modify the py script to move said PCO around with the player. We could set the US_CTF_Flag_Spawner at the top of the flag pole and when ever some one entered said CP range, the US_CTF_Flag could then be moved along with the player. The only other issue is how to remove the animated flag from the one main CTF CP only (you can remove the flag templates in the ini.con, but that would remove them for all CP in the map).
Anyway that is my train of though. Not sure if will work, but it seems like it would. The only possible issue I can forsee at the moment is dealing with all sides for the flag (MEC and CH) as the CTF flag(s) would be hardcoded to thier side.
Any thoughts, suggestions, cretiques, or PCOs?
UPDATE:
Ok I got the PCO to work. It seemed to be an issue with collision meshes. Not sure, either way it works now (at leaste the flag PCO). I was also able addtemplate a CP to it, so it dynamically detects the proper flag. The new object names are T1_CTF_Flag and T2_CTF_Flag. All that is left to be done is adjust the py script so that it moves the PCO with those names. I havent the slightes idea how to do so, so until then I can do no more. (I'll see if I can figure out a way to remove flags from the polls, or a leaste find a work around. I am fairly confident that new object will work.
Here is the CTF Flag PCO objects:
http://www.serversidemodding.com/users/ ... zz/CTF.zip
I have found a few bugs in the ctf script that we may want to look into if this works. Some of what I have found so far (note: this is done with only one player and gameplay started (ie numplayerneed was set to 1):
1) When flag carrier dies and respawns the flag folled me. Even across teams. Maybe a bug with only one player?
2) Vehicles (I havent had a chance to test the above fix)
3) Scoring. 10 points were awarded when capped (thats correct), but instead of adding 1 to the total flags capped (like in 42) it added 100 tickets to the total remaining. I assume that the game will end like a normal CQ round since tickes still seem to work normal? That needs to be fixed if possible.