I recently replaced 1-flag CTF with 2-flag CTF in my map, but I cannot pick up one of the flags. The other one works just fine, it is possible to pick it up and to score points with it, but the other one simply does not work. It only stays bouncing on its location.
I've already looked on every thread I could find about the issue here on GT, but none of them helped.
Here's the section that covers the CTF logic in my lua:
Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\LuaCallbacks_Mission.cpp(635)
Entity "team1_capture" not found
Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\LuaCallbacks_Mission.cpp(635)
Entity "team2_capture" not found
This one is also very contradictory since it is possible to score points with one of the flags.
Re: Unable To Pick up CTF Flag
Posted: Sun Aug 24, 2014 7:45 pm
by Marth8880
Did you set each region's class properties to its name?
Re: Unable To Pick up CTF Flag
Posted: Sun Aug 24, 2014 7:54 pm
by GAB
Yes. And I just found out the problem.
For some very stupid reason, when the flag is on an object, it keeps bouncing and cannot be picked, however, when it is on terrain it is possible to pick it up and score points as usual.
So, the issue now becomes how to fix this bug?
Re: Unable To Pick up CTF Flag
Posted: Sun Aug 24, 2014 7:59 pm
by Marth8880
LOL, that's pretty strange. The flag ODFs haven't been altered, correct?
Couple things you could try:
- Place the flag prop slightly lower in ZE.
- Set the ODFs' Rebound value to 0.0 and Friction to something high like 10.0.
Re: Unable To Pick up CTF Flag
Posted: Sun Aug 24, 2014 8:03 pm
by GAB
The object I'm using is probably the same object used for every flag in the game (com_item_flag), and yes, I didn't modify a byte of it.
What I find weird is that maps like Coruscant and Mygeeto also have flags sitting on objects instead of terrain and they work fine. I opened their luas and didn't find any special function that could be related to this.
Another weird thing is that, when it was 1-flag instead of 2-flag CTF, the only flag that was on the map was over an object and worked just fine.
Re: Unable To Pick up CTF Flag
Posted: Sun Aug 24, 2014 8:08 pm
by Marth8880
Yeah, definitely know what you mean. Freakin' Pandemic...
Did you try what I suggested?
Re: Unable To Pick up CTF Flag
Posted: Sun Aug 24, 2014 8:50 pm
by GAB
I did and it worked! Well, I did lower the flag object in ZE slightly and did remove the following lines from my .wld file:
Just for clarification, the deal with these lines has to do with the random skies stuff. I actually keep adding and removing them all the time. It is so that the random weather/time of day lighting, terrain and sky can load properly.
When I was trying to fix this flag bug I wasn't removing them for the sake of agility (otherwise I'd have to remove them before munging and have to re-add the terrain one if I wanted to open the map in ZE [Zero Editor can't load a world properly without a terrain], and when I save hte world, ZE automatically re-adds the sky and light lines and then I'd have to remove them all again and so on). On my last test, I did actually remove them along with lowering the flag object in ZE. I actually don't know which action made the flag work (probably the lowering one to be honest).
Anyway, long story short, 2-Flag CTF works properly now.
EDIT
Fun fact: the Entity "team1_capture"/"team2_capture" not found error are still there, even though the mode works normally.