• Please make sure you are familiar with the forum rules. You can find them here: https://forums.tripwireinteractive.com/index.php?threads/forum-rules.2334636/

Code ROObjTerritory.bRecaptureable

[13th]Malony/93

Active member
Jul 29, 2006
34
0
hello,

just wanted to post that there is a bug with the variable
ROObjTerritory.bRecaptureable
tested on Odessa:
first state Square and Appartments bRecaptureable == true and
HQ / Tower bRecaptureable == false .... so far correct
after app and square are capped this state remains, but it should switch.

SOLUTION:
use ROObjTerritory.bActive instead... that gives the correct data, at least for odessa

greetings,
Sgt.Malony
 
i have used this variable in my current project.
a timer calls every n milliseconds the state of the objective.
if I use the ROObjTerritory.bRecaptureable variable it doesn't reflect the correct state for me.
on odessa when app and square are capped, it still shows
"Appartments".bRecaptureable == true
"square ".bRecaptureable == true
but
"HQ".bRecaptureable == false
"Twoer".bRecaptureable == false

instead when i used ROObjTerritory.bActive everything works fine....

the code i used it this one (used in a loop i=0 i<16)

if(WatcherServerMutator.gameType.Objectives.IsA('ROObjTerritory'))
{
objTerr = ROObjTerritory( WatcherServerMutator.gameType.Objectives );
obj.canRecap = objTerr.bActive;
//obj.canRecap = objTerr.bRecaptureable;


as far as Wotgreal search works, bRecaptureable is only used one time in the whole source code
in the File ROObjTerritory.uc(349:7): "if (!bRecaptureable)"


i only wanted to post this, if someone else runs into the same troubles, so he can find a solution here :)
 
Last edited:
Upvote 0
ok, then rename the thread :)
The problem is that this variable is never mentioned in the docu (or I am wrong now?!?!)
for me as a simple coder, this variable sounds like a state, and the comment in the source "// True if it can be taken back" can't tell the one reading it, that it is not a state. I know it is hard to make good comments in sourcecode :)

Don't missunderstand me, I am not blaming you.... only want to share my knowledge so other poeple don't run into the same problems like me, because it is REALLY hard to determin how RO scripting works.
It is not the language, i learned it in 2 days, it is the "there is no documentation, check this variable with a log output with trial and error"
 
Upvote 0