Deathregion help (FAQ)

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
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Post by Maveritchell »

Err... why don't you make it simple and just add the region in ZE? And besides, I'm pretty sure your AddDeathRegion needs to be in ScriptInit.
User avatar
Snork
Lieutenant General
Lieutenant General
Posts: 669
Joined: Thu Jun 07, 2007 3:34 pm
Games I'm Playing :: SWBF2 and Minecraft
xbox live or psn: No gamertag set
Contact:

Post by Snork »

I did add the deathregion in ZE. the RGN file is the file that ZE writes when you add a region.

All the files in your World1 folder can be edited except for WLD and TER using notepad.

But thanks, I hope your right.

EDIT: I put it under ScriptInit and it didn't work.
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Post by Maveritchell »

Huh. Don't know what to say. Here's an excerpt from my .lua in which the deathregion works. Only difference is that mine's at the end of ScriptInit.
-- Camera Stats
SetAttackingTeam(IMP)
-- Internal Alliance hangar
-- this shot is bad, needs to be fixed
AddCameraShot(-0.049495, 0.003922, -0.995646, -0.078892, 24.992880, -22.995819, -1025.940186);
--Flag shot
AddCameraShot(0.546201, 0.047743, 0.833116, -0.072822, 402.610260, -105.474068, -55.044727);
--Internal Imperial hangar
AddCameraShot(0.988295, -0.091070, 0.121873, 0.011230, 33.932011, 10.868500, 1567.624146);
-- Imperial ship overall
AddCameraShot(-0.380690, 0.021761, -0.922940, -0.052756, 1351.167236, 188.651230, -10.971837);
-- Alliance ship overall
AddCameraShot(0.941014, -0.051715, 0.333887, 0.018349, 1053.546143, 188.651230, -51.276745);

AddDeathRegion("deathregion2")
AddLandingRegion("imp-CP1Con")
AddLandingRegion("plt1con1")
AddLandingRegion("plt1con2")
AddLandingRegion("plt1con3")

end
Last edited by Maveritchell on Wed Jul 04, 2007 12:01 am, edited 1 time in total.
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 »

For some reason, people seem to have problems with death regions. Most people don't have those problems when using damage regions. A high-damage rate damage region works the same as a death region.
User avatar
AceMastermind
Gametoast Staff
Gametoast Staff
Posts: 3285
Joined: Mon Aug 21, 2006 6:23 am
Contact:

Deathregions

Post by AceMastermind »

Deathregions aren't difficult to get working, you just have to load it from the LUA with the correct name.


In ZE go into Region Edit Mode and click on "New Region".

Then place it and scale it to the size you want.

Then click on "Select Region" and click on the region you just placed.

You can leave the "Region ID" name the default name if you want.

The "Class Properties" name is the one that gets loaded from the LUA, you can use whatever name you want, i'll just use "ace" for this example.
Save your wld file and close ZE.

Open your LUA, e.g. ABCc_con.lua and add this line:

Code: Select all

AddDeathRegion("ace")

then save, close, munge and play!



Notes:
In the LUA I always load them from the bottom of function ScriptPostLoad() right before "end" and they always worked, like this:

Code: Select all

    conquest:Start()
    
    EnableSPHeroRules()
    
    AddDeathRegion("ace")
        
 end
but you could load them under function ScriptInit() if you want, i've seen a couple of shipped lua scripts with them added that way too, for example kam1c_con.lua.


You can add as many deathregions as you want and place them in any layer. The important thing is the name that you gave your region in the "Class Properties" input field. You'll need an AddDeathRegion line in your LUA for each deathregion you place in ZE.
Death regions are very efficient, they will kill you instantly when you enter them, even if you drive or fly a vehicle into them.
Last edited by AceMastermind on Thu Jul 05, 2007 5:33 pm, edited 3 times in total.
User avatar
Snork
Lieutenant General
Lieutenant General
Posts: 669
Joined: Thu Jun 07, 2007 3:34 pm
Games I'm Playing :: SWBF2 and Minecraft
xbox live or psn: No gamertag set
Contact:

Post by Snork »

Yayyy!!

*Gives Ace a very large donut*
User avatar
anakinfang
Second Lance Corporal
Second Lance Corporal
Posts: 106
Joined: Sun Jun 12, 2011 8:22 pm
Games I'm Playing :: all star wars batman
xbox live or psn: not setting
Location: ca

Re: Deathregion help (FAQ)

Post by anakinfang »

How do you scale a region.
User avatar
lucasfart
Sith
Sith
Posts: 1440
Joined: Tue Feb 24, 2009 5:32 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Australia

Re: Deathregion help (FAQ)

Post by lucasfart »

Have you even tried scaling the region yourself before posting this question? You scale a region exactly the same way you scale anything else in ZE. :roll:
Marth8880
Resistance Leader
Posts: 5042
Joined: Tue Feb 09, 2010 8:43 pm
Projects :: DI2 + Psychosis
Games I'm Playing :: Silent Hill 2
xbox live or psn: Marth8880
Location: Edinburgh, UK
Contact:

Re: Deathregion help (FAQ)

Post by Marth8880 »

You change the X, Y, and Z height settings with the region selected. ;)

Image

Lucasfart: What else, other than sectors and boundaries, does one even scale in Zero Editor? :?
User avatar
lucasfart
Sith
Sith
Posts: 1440
Joined: Tue Feb 24, 2009 5:32 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Australia

Re: Deathregion help (FAQ)

Post by lucasfart »

Sorry. I remember it being decidedly easy when I had a working copy of ZE (which was a long time ago :( ). If it's not as easy as i remember it being, I apologise for being so abrupt with you. Now that I think about it, there's not much else you scale in ZE, but I just remember doing it so often I assumed there was a whole lot of stuff you used it for. :oops:

Besides:
Zeroeditor_guide in the Documentation wrote: When in REGION or BARRIER mode
C + L/R/M Mouse Button Scale Object in the X axis
X + L/R/M Mouse Button Scale Object in the Y axis
Z + L/R/M Mouse Button Scale Object in the Y axis
If you bother looking at the docs, you should find everything you need for maneuvring/manipulating in ZE without asking more questions here.
User avatar
AceMastermind
Gametoast Staff
Gametoast Staff
Posts: 3285
Joined: Mon Aug 21, 2006 6:23 am
Contact:

Re: Deathregion help (FAQ)

Post by AceMastermind »

Select the region then hold Z + L/R/M Mouse Button to scale the region in the X, Y, Z axis respectively or use the numerical input fields for precision as shown in Marth's image. You can also scale in multiple axis at the same time by pressing more than one mouse button. Be sure to read through the ZeroEditor_guide.doc for more information, but it isn't accurate regarding moving/scaling/rotating regions and barriers, likely a typo. It should look something like this:
[color=#FF8040]ZeroEditor_guide.doc[/color] wrote:When in REGION mode

C + L/R/M Mouse Button -Move region in the X, Y, Z axis

X + L/R/M Mouse Button -Rotate region in the X, Y, Z axis

Z + L/R/M Mouse Button -Scale region in the X, Y, Z axis

Press more than one mouse button simultaneously to move, rotate or scale in more than one axis at the same time.



When in BARRIER mode

C + L/R Mouse Button -Constrain movement in X or Z axis

X + L/R/M Mouse Button -left or middle click to cycle through and define a pivot then right click to rotate

Z + L Mouse Button -Move freely in X and Z axis simultaneously
User avatar
anakinfang
Second Lance Corporal
Second Lance Corporal
Posts: 106
Joined: Sun Jun 12, 2011 8:22 pm
Games I'm Playing :: all star wars batman
xbox live or psn: not setting
Location: ca

Re: Deathregion help (FAQ)

Post by anakinfang »

thanks for help guys , I was confused where the scale control where. but scaling a region is easy. :)
Post Reply