Page 1 of 1

Damage Regions

Posted: Thu May 25, 2006 7:38 pm
by xwingguy
In my map it looks like I've got no choice but to add in a damage region via LUA script. I just have one question:

Damage Regions
Name Prefix : damage
Parameters : key=value, key matched to minimum number of characters
damagerate=<float>
Damage per second applied to objects that enter the region
personscale=<float>
Scales the damage if the object in the region is a person
animalscale=<float>
Scales the damage if the object in the region is an animal
droidscale=<float>
Scales the damage if the object in the region is a droid
vehiclescale=<float>
Scales the damage if the object in the region is a vehicle
buildingscale=<float>
Scales the damage if the object in the region is a building
buildingdeadscale=<float>
Scales the damage if the object in the region is a dead building
buildingunbuiltscale=<float>
Scales the damage if the object in the region is an undamaged building


I dont understand what exactly is the bolded text is asking for.

Posted: Thu May 25, 2006 7:52 pm
by MercuryNoodles
The Parameters line I think is the same as we see in the odfs in that it just says the following lines are the...well...parameters. Key=value is the basic setup for all of the parameters you set. That last bit has me a bit thrown off, though. I'm not exactly sure what it means.

Posted: Thu May 25, 2006 8:49 pm
by Teancum
I don't understand why you can't just put it in via ZeroEdit.

Posted: Thu May 25, 2006 10:35 pm
by xwingguy
Because you don't begin to choke and die until the Life Support system is destroyed. AND DamageRegions don't seem to be affected by RemoveRegion() and DeactivateRegion()

Posted: Fri May 26, 2006 6:02 pm
by Tuskenjedi
are they affected by ActivateRegion("")?
oh and this is some stuff from DS that might help, just maybe, not sure
function TrashStuff()

trash_open = 1
trash_closed = 0

trash_timer = CreateTimer("trash_timer")
SetTimerValue(trash_timer, 7)
StartTimer(trash_timer)
trash_death = OnTimerElapse(
function(timer)
if trash_open == 1 then
AddDeathRegion("deathregion")
SetTimerValue(trash_timer, 5)
StartTimer(trash_timer)
trash_closed = 1
trash_open = 0
print("death region added")

Posted: Fri May 26, 2006 6:34 pm
by xwingguy
DeathRegion and DamageRegion are two completely different things.

Posted: Fri May 26, 2006 10:02 pm
by Tuskenjedi
yeah, but i thought maybe just something would come out of it