Bleeding - Why? WHY?

In this forum you will find and post information regarding the modding of Star Wars Battlefront 2. DO NOT POST MOD IDEAS/REQUESTS.

Moderator: Moderators

Post Reply
Wadi

Bleeding - Why? WHY?

Post 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?
Yocki

RE: Bleeding - Why? WHY?

Post by Yocki »

Check out your LUA, maybe you forgot to update it...

BTW, I think you shouldn't mess with the cp settings :D
User avatar
Teancum
Jedi Admin
Jedi Admin
Posts: 11080
Joined: Wed Sep 07, 2005 11:42 pm
Projects :: No Mod project currently.
Games I'm Playing :: Destiny
xbox live or psn: No gamertag set
Location: Indiana

RE: Bleeding - Why? WHY?

Post by Teancum »

Yeah, never mess with CP settings. You might also check to see if one of your spawn points is below the terrain.
Wadi

RE: Bleeding - Why? WHY?

Post 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?
Yocki

RE: Bleeding - Why? WHY?

Post 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.
Tohron

Post 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.
User avatar
[RDH]Zerted
Gametoast Staff
Gametoast Staff
Posts: 2982
Joined: Sun Feb 26, 2006 7:36 am
Projects :: Bos Wars AI - a RTS game
Games I'm Playing :: SWBF2 and Bos Wars
xbox live or psn: No gamertag set
Location: USA
Contact:

Post 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.
Wadi

Post by Wadi »

OK thanks guys, you've been a great help. :D
Post Reply