Page 1 of 1

Death regions

Posted: Thu Mar 09, 2006 11:43 pm
by Captain_Mazda
Has anyone been able to put in working death regions? If so, mind sharing?

I'm sure there must be some scripting involved once you place it on your map, but where? What must be done?

RE: Death regions

Posted: Thu Mar 09, 2006 11:54 pm
by TAW_pinx
Put this in the level stats portion of the LUA:

AddDeathRegion("DeathRegion")

Create a rectangular region where you want this to be and name it the above.

RE: Death regions

Posted: Thu Mar 09, 2006 11:56 pm
by Captain_Mazda
Many thanks! :D

RE: Death regions

Posted: Fri Mar 10, 2006 2:21 am
by Captain_Mazda
Hmm, they're still not working.

This is what I've put in:

-- Level Stats
-- ClearWalkers()
AddWalkerType(0, 4) -- special -> droidekas
AddWalkerType(1, 16) -- 1x2 (1 pair of legs)
AddWalkerType(2, 0) -- 2x2 (2 pairs of legs)
AddWalkerType(3, 4) -- 3x2 (3 pairs of legs)
AddDeathRegion("Pit")
AddDeathRegion("Ravine")
AddDeathRegion("Wall1")
AddDeathRegion("Wall2")
AddDeathRegion("Wall3")
AddDeathRegion("Wall4")
AddDeathRegion("Corner2")
AddDeathRegion("Corner4")
local weaponCnt = 1024
SetMemoryPoolSize("Aimer", 75)
SetMemoryPoolSize("AmmoCounter", weaponCnt)
SetMemoryPoolSize("BaseHint", 1024)
SetMemoryPoolSize("CommandWalker", 4)
SetMemoryPoolSize("CommandFlyer", 4)
SetMemoryPoolSize("EnergyBar", weaponCnt)
SetMemoryPoolSize("EntityCloth", 32)
SetMemoryPoolSize("EntityFlyer", 32)
SetMemoryPoolSize("EntityHover", 32)
SetMemoryPoolSize("EntityLight", 200)
SetMemoryPoolSize("EntitySoundStream", 4)
SetMemoryPoolSize("EntitySoundStatic", 32)
SetMemoryPoolSize("MountedTurret", 32)
SetMemoryPoolSize("Navigator", 128)
SetMemoryPoolSize("Obstacle", 1024)
SetMemoryPoolSize("PathNode", 1024)
SetMemoryPoolSize("SoundSpaceRegion", 64)
SetMemoryPoolSize("TreeGridStack", 1024)
SetMemoryPoolSize("UnitAgent", 128)
SetMemoryPoolSize("UnitController", 128)
SetMemoryPoolSize("Weapon", weaponCnt)

I've got those 8 deathregions, names match in the editor, they're also in the Conquest layer only. They just don't seem to want to work. Any ideas?

RE: Death regions

Posted: Fri Mar 10, 2006 7:47 am
by Teancum
Change the damageregions instance properties in zeroedit to damageregion and then set damage to 3000. That way you know they die. For some reasons death regions are hard to get to work in BF2.

RE: Death regions

Posted: Fri Mar 10, 2006 10:27 am
by TAW_pinx
Weird, mine worked like a charm the way I had it set. For Citadel, it's in the base layer and works for all modes now. All it took was the name change to DeathRegion and that line in the LUA.

Posted: Fri Mar 10, 2006 10:39 am
by Stager00
CaptainMazda


EDIT-Make sure ALL three properties feilds reflect the same name of the region in Zeroedit.
Mine worked like the above, expect this is the placement on the LUA:

SetSoundEffect("ScopeDisplayZoomIn", "binocularzoomin")
SetSoundEffect("ScopeDisplayZoomOut", "binocularzoomout")
--SetSoundEffect("WeaponUnableSelect", "com_weap_inf_weaponchange_null")
--SetSoundEffect("WeaponModeUnableSelect", "com_weap_inf_modechange_null")
SetSoundEffect("SpawnDisplayUnitChange", "shell_select_unit")
SetSoundEffect("SpawnDisplayUnitAccept", "shell_menu_enter")
SetSoundEffect("SpawnDisplaySpawnPointChange", "shell_select_change")
SetSoundEffect("SpawnDisplaySpawnPointAccept", "shell_menu_enter")
SetSoundEffect("SpawnDisplayBack", "shell_menu_exit")

-- Camera Stats Battle over Felucia
-- Rep ship from behind
AddCameraShot(0.998795, -0.041143, -0.026739, -0.001101, -720.435303, 809.024963, 2779.057129);
-- CIS ship from behind
AddCameraShot(0.028389, -0.001117, -0.998823, -0.039312, -629.853760, 809.024963, -2050.946289);
-- Overall from right side of map
AddCameraShot(-0.335210, 0.057062, -0.927078, -0.157814, 1372.964233, 1940.014038, -2266.423828);
-- Overall from left side of map
AddCameraShot(0.911880, -0.246677, -0.316680, -0.085667, -2183.282471, 1940.014038, 2760.666748);


AddDeathRegion("deathregion3")
AddDeathRegion("deathregion4")
AddLandingRegion("rep-CP1Con")
AddLandingRegion("cis-CP1Con")
AddLandingRegion("rep-cp2_con")
AddLandingRegion("cis-cp2_control")

end