Page 1 of 1

Bleeding - Why? WHY?

Posted: Sun Jun 18, 2006 6:41 am
by Wadi
Whenever I start my map in progress, the rebel side immediately begins bleeding, and continues to do so until they have captured a CP. They and the IMP's both start with two CPs, and there is one neutral one in the center. I have set the 'valuebleed' on all CPs to 0, so why is there still bleeding? And when the teams have equal numbers of CPs?

RE: Bleeding - Why? WHY?

Posted: Sun Jun 18, 2006 10:43 am
by Yocki
Check out your LUA, maybe you forgot to update it...

BTW, I think you shouldn't mess with the cp settings :D

RE: Bleeding - Why? WHY?

Posted: Sun Jun 18, 2006 11:24 am
by Teancum
Yeah, never mess with CP settings. You might also check to see if one of your spawn points is below the terrain.

RE: Bleeding - Why? WHY?

Posted: Sun Jun 18, 2006 11:38 am
by Wadi
hmmm...I've reset the Cp settings, and that stops this bleeding problem, but obviously bleeding is still present when one team captures the majority of the CPs. How do I stop this altogether?

RE: Bleeding - Why? WHY?

Posted: Sun Jun 18, 2006 2:19 pm
by Yocki
read the getting started guide, go for the lua/cps part, and do what they tell to, that should fix the problem.

If the problem still persist, i would delete all the cps, make new ones, and add them into the LUA.

Don't rename the cps cause then the LUA won't recognize 'em.

Posted: Sun Jun 18, 2006 4:49 pm
by Tohron
You should probably delete all the cp's from your second cp-related line (the one where the cp's are added to the mission script) in all your game mode LUA's, as I think other people have been saying. I've actually gotten this to work in one of my mods - the cp I did this with can act as a spawn point but doesn't cause any bleeding.

Posted: Sun Jun 18, 2006 6:00 pm
by [RDH]Zerted
Yes, the game knows how CPs work. They are not required to be in the Lua at all. If you don't register them in the Lua, they won't have bleed values. I'm not sure what will happen with the countdown timer if all your CPs aren't registered.

One way (out of many) to keep your CPs registered and 'disable' the bleed rate: in ObjectiveConquest.lua, add the section in red
local InitBleedTimer = function(team)
self.bleedTimer[team] = CreateTimer("bleed" .. team)

OnTimerElapse(
function (timer)
if GetReinforcementCount(team) > GetNumTeamMembersAlive(team) then
--tick off a reinforcement when the timer elapses, and start it up again
if GetReinforcementCount(team) > 0 then
--AddReinforcements(team, -1)
end
SetTimerValue(timer, GetTimerValue(timer) + 1.0)
StartTimer(timer)
else
--disallow bleeding when a team gets really low on reinforcements (so the team
--doesn't run entirely out of units due to bleedrate, as per designer request)
SetBleedRate(team, 0.0)
StopTimer(timer)
end
end,
self.bleedTimer[team]
)
end
I haven't tested this exact way, but it should work.

Posted: Mon Jun 19, 2006 12:32 pm
by Wadi
OK thanks guys, you've been a great help. :D