I posted this in reply to a thread in the discussion forum, but it is probably better suited here. This has nothing to do with writing cog; it's just for entering the correct values in the existing ctf cogs.
Tips for cogging CTF
1. Follow the ctf tutorial in terms of numbering items. You don't need to start at 0, just make sure they're in that order.
2. When in doubt, open up the Duel, look at the ctfmain cog and what items are used. You can also press F12 to bring up the 3D preview, and while on the grid view press F5 and the 3D preview will go to the item highlighted. (You probably already knew that, but I only found out about that item view shortcut a little while ago.)
3. For the red_start & gold_start values (spawn points for red & gold teams), use ghosts. A walkplayer should be placed at the same position. Keep in the mind the order from the ctf tutorial at the ctf_respawn cog sorts this way.
4. Players_red1, players_red2 are the numbers that indicate in the lobby how many players have joined the red team. Surface flags must be 80000004 (texture flipped) or else you'll need a mirror to read them.
5. The ctf_displayscore cog is used for scoreboards. You don't necessarily need them, as pressing ~ will bring up the score. If you do want them, the scoreboard contains 3 surfaces for each team. For red, rlo, rmo, & rr0 would have the surface numbers for the first scoreboard. Think r[ denotes team,Red] l[denotes Left, Middle, or Right mat] 0[scoreboard #]. To really spell it out, if the score was 124, the digit 1 would be the mat rl0, the digit 2 would be the mat rm0, and the digit 4 would be the mat rl0.
6. Use the thingflags as noted in the tutorial. If your thing does not have a thingflags entry, press Add Value at the bottom of the thing properties editor. Type in Thingflags if it does not have it already.
7. Limit1, limit2, & limit3 of course refer to the score limit, which can be set in the lobby. Again, make sure the surface is texture flipped. Limit1 is the left mat, limit 2 the middle, and limit3 is the right.
8. Add the ctf_iconsclient, ctf_keyred, and ctf_keygold cogs to your cog list even though they have no values for you to add. If you are using locked doors as in Nar, the ctf keys are different items apart from normal keys.
9. This part is a little hard to explain due to 2 different values using the same name. The variables mark_red & mark_gold are used in 3 cogs; however, in ctf_safeentry the values are not the same. The mark_red & mark_gold values in ctf_main and ctf_safentry must be the same. LEC really should have named them diffently to avoid confusion, but that's the way it is.
The mark_red & mark_gold values in ctf_respawn and ctf_main both refer to the sector the player enters to join a team. Upon entering this sector, the server designates the appropriate team colour and then allows the player to spawn on that team's side.
In ctf_safeentry, mark_red & mark_gold refer to the sector that catches a laggy player that slides right throw the first mark_red sector before making contact with the server. So... you want to make your sectors long enough that a player will rarely be teleported back to the lobby. Imo, the mark_red & mark_gold sectors in the Duel are far too short.
The ghost_red & ghost_gold values in ctf_safeentry is the position that a laggy player is teleported to... usually just outside of the join sector.
Ok so I made a pic. Hopefully this should clear it up.
As you can see, I've given a lot of room for the player to slide before they are forced to teleport to the top in cases of heavy lag.
10. When play testing your level, join both sides and repeatedly use the console command "kill" (press t, tab, type "kill") to check all the respawn points. If you end up back in the lobby, ensure that you used ghost things as the values for red_start etc, that your things are in the correct order, and that you have added thingflags properly. Keep in mind that if you add the thingflags to your first walkplayer, for example, press insert to copy the walkplayer so you don't have to add thingflags manually for each instance.
11. The value ctf_displayscore (cog) in ctf_main is just the number of the ctf_displayscore in your placed cogs list. If it says 6 next that cog, put a 6 in the box.
Email me if you have any trouble and you've gone through the tutorial and read this and are still stuck. It is a bit tricky, so don't feel bad.
Tips for cogging CTF
1. Follow the ctf tutorial in terms of numbering items. You don't need to start at 0, just make sure they're in that order.
2. When in doubt, open up the Duel, look at the ctfmain cog and what items are used. You can also press F12 to bring up the 3D preview, and while on the grid view press F5 and the 3D preview will go to the item highlighted. (You probably already knew that, but I only found out about that item view shortcut a little while ago.)
3. For the red_start & gold_start values (spawn points for red & gold teams), use ghosts. A walkplayer should be placed at the same position. Keep in the mind the order from the ctf tutorial at the ctf_respawn cog sorts this way.
4. Players_red1, players_red2 are the numbers that indicate in the lobby how many players have joined the red team. Surface flags must be 80000004 (texture flipped) or else you'll need a mirror to read them.
5. The ctf_displayscore cog is used for scoreboards. You don't necessarily need them, as pressing ~ will bring up the score. If you do want them, the scoreboard contains 3 surfaces for each team. For red, rlo, rmo, & rr0 would have the surface numbers for the first scoreboard. Think r[ denotes team,Red] l[denotes Left, Middle, or Right mat] 0[scoreboard #]. To really spell it out, if the score was 124, the digit 1 would be the mat rl0, the digit 2 would be the mat rm0, and the digit 4 would be the mat rl0.
6. Use the thingflags as noted in the tutorial. If your thing does not have a thingflags entry, press Add Value at the bottom of the thing properties editor. Type in Thingflags if it does not have it already.
7. Limit1, limit2, & limit3 of course refer to the score limit, which can be set in the lobby. Again, make sure the surface is texture flipped. Limit1 is the left mat, limit 2 the middle, and limit3 is the right.
8. Add the ctf_iconsclient, ctf_keyred, and ctf_keygold cogs to your cog list even though they have no values for you to add. If you are using locked doors as in Nar, the ctf keys are different items apart from normal keys.
9. This part is a little hard to explain due to 2 different values using the same name. The variables mark_red & mark_gold are used in 3 cogs; however, in ctf_safeentry the values are not the same. The mark_red & mark_gold values in ctf_main and ctf_safentry must be the same. LEC really should have named them diffently to avoid confusion, but that's the way it is.
The mark_red & mark_gold values in ctf_respawn and ctf_main both refer to the sector the player enters to join a team. Upon entering this sector, the server designates the appropriate team colour and then allows the player to spawn on that team's side.
In ctf_safeentry, mark_red & mark_gold refer to the sector that catches a laggy player that slides right throw the first mark_red sector before making contact with the server. So... you want to make your sectors long enough that a player will rarely be teleported back to the lobby. Imo, the mark_red & mark_gold sectors in the Duel are far too short.
The ghost_red & ghost_gold values in ctf_safeentry is the position that a laggy player is teleported to... usually just outside of the join sector.
Ok so I made a pic. Hopefully this should clear it up.
As you can see, I've given a lot of room for the player to slide before they are forced to teleport to the top in cases of heavy lag.
10. When play testing your level, join both sides and repeatedly use the console command "kill" (press t, tab, type "kill") to check all the respawn points. If you end up back in the lobby, ensure that you used ghost things as the values for red_start etc, that your things are in the correct order, and that you have added thingflags properly. Keep in mind that if you add the thingflags to your first walkplayer, for example, press insert to copy the walkplayer so you don't have to add thingflags manually for each instance.
11. The value ctf_displayscore (cog) in ctf_main is just the number of the ctf_displayscore in your placed cogs list. If it says 6 next that cog, put a 6 in the box.
Email me if you have any trouble and you've gone through the tutorial and read this and are still stuck. It is a bit tricky, so don't feel bad.