Damage Regions

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
xwingguy

Damage Regions

Post 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.
MercuryNoodles
Jedi
Jedi
Posts: 1003
Joined: Sun Mar 12, 2006 7:16 pm
Projects :: Space - Boarding Action
xbox live or psn: No gamertag set

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

Post by Teancum »

I don't understand why you can't just put it in via ZeroEdit.
xwingguy

Post 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()
Tuskenjedi

Post 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")
xwingguy

Post by xwingguy »

DeathRegion and DamageRegion are two completely different things.
Tuskenjedi

Post by Tuskenjedi »

yeah, but i thought maybe just something would come out of it
Post Reply