Author Topic: LevelExitArea  (Read 10839 times)

nickolaslr

  • Posts: 2
  • Maggot Crusher.
    • View Profile
LevelExitArea
« on: November 29, 2013, 04:05:04 AM »
I need help using the LevelExitArea.

I've made three dungeons maps side by side in the same level, but I cannot connect them using the stairs.

It crashes everytime I enter the rectangule directing me to the startID 1.

Heretic

  • Moderator
  • Posts: 305
  • Castle Runner
    • View Profile
Re: LevelExitArea
« Reply #1 on: November 29, 2013, 11:43:52 AM »
You can try to take a look at the official level 1 of the hammerwatch campaign for an example, but essentially each exit is going to have 2 numbers, 1 is the number of the level its going to (in your case its the same level) and the second/startID is the ID of the 'level start' script that you place as their spawn point.

On top of this you have to edit your levels.xml to include all the levels in your campaign/act.


So lets assume your level is level 1. Then for your LevelExitArea it should be new level: 1 and then since the default LevelStart id is 0, you place another 'levelstart' script at the point you want them to appear when they use that exit. Change the ID of that levlestart to 1,2,3,4, whatever. And on the level exit area you would change the LevelStart to the # of the LevelStart you want them to appear to.

Every time I write this out it seems more complicated than it is, but try to use the Level 1 and 2 from the HW campaign as examples it may help. Let me know if you need any help, and if you want to send me your xml I can fiddle with it for you.

nickolaslr

  • Posts: 2
  • Maggot Crusher.
    • View Profile
Re: LevelExitArea
« Reply #2 on: November 30, 2013, 12:18:18 AM »
You can try to take a look at the official level 1 of the hammerwatch campaign for an example, but essentially each exit is going to have 2 numbers, 1 is the number of the level its going to (in your case its the same level) and the second/startID is the ID of the 'level start' script that you place as their spawn point.

On top of this you have to edit your levels.xml to include all the levels in your campaign/act.


So lets assume your level is level 1. Then for your LevelExitArea it should be new level: 1 and then since the default LevelStart id is 0, you place another 'levelstart' script at the point you want them to appear when they use that exit. Change the ID of that levlestart to 1,2,3,4, whatever. And on the level exit area you would change the LevelStart to the # of the LevelStart you want them to appear to.

Every time I write this out it seems more complicated than it is, but try to use the Level 1 and 2 from the HW campaign as examples it may help. Let me know if you need any help, and if you want to send me your xml I can fiddle with it for you.

Thank you very much for the quick reply.

Right no my levels.xml is like this:

<levels start="1">
   <act name="lvl.act1">
      <level id="1" res="levels/tristam.xml" name="lvl.floor?floor=1" />
   </act>
</levels>

I've copied it from the example level.

Is there anything to change?

I couldn't send the level cause it's too large.

I've realized something while messing around the campaign files, none of the stairs connect to a start point on the same level.xml

In my case I'm trying to do that, like a teleport on the same level, is this wrong?
« Last Edit: November 30, 2013, 12:41:13 AM by nickolaslr »

Heretic

  • Moderator
  • Posts: 305
  • Castle Runner
    • View Profile
Re: LevelExitArea
« Reply #3 on: November 30, 2013, 12:08:06 PM »
It should still work, as long as you are pointing to the same level, and the LevelStart ID that you want them to "exit" at.

So your initial levelstart script should be ID:0

Then when you make an exit to another place on the same level, have it point to level 1 with ID 1 and then set the LevelStart script at the stairs 'exit' as ID:1.

If you want to show me your actual level I can try fixing your areaexit and such for you as an example that you can follow?

Flopjack

  • Posts: 19
  • Maggot Crusher.
    • View Profile
Re: LevelExitArea
« Reply #4 on: December 10, 2013, 09:41:50 PM »
Hey everyone. I'm new and I'm having trouble getting this same thing to work. I've attached the scripts every-which-way I can think of, but no dice. Here is my xml file with some items commented out to help me see clearly:

<act name="lvl.act1">
   <level id="1" res="JailBreak/1Hero'sDemise.xml" name="lvl.floor?floor=1" />
   <level id="2" res="JailBreak/2TheDecayingHall.xml" name="lvl.floor?floor=2" />
 <!--<level id="3" res="JailBreak/level_3.xml" name="lvl.floor?floor=3" />
   <level id="boss_1" res="JailBreak/level_boss_1.xml" name="lvl.boss1" />-->

</act>

I have all the spawn points numbered correctly. I've tried throwing the player in the same map and in different maps at a door. I have a folder named "Custom Campaign" with a folder inside called "JailBreak" (the name of the first act) and the "levels" file. Inside JailBreak are 2 levels I've worked on.

I tried LevelExit with an area trigger and LevelExitArea. Any help?

Hipshot

  • Developer
  • Posts: 455
  • Level Designer
    • View Profile
Re: LevelExitArea
« Reply #5 on: December 11, 2013, 04:29:38 PM »
Could you post the level?

Flopjack

  • Posts: 19
  • Maggot Crusher.
    • View Profile
Re: LevelExitArea
« Reply #6 on: December 12, 2013, 10:44:50 PM »
The file limit is only 192 kb, so hopefully a screenshot is OK. The top picture is from the level file called: "1Hero'sDemise" Its ID is 1. The bottom one is from a level file called "2DecayingHall" with an ID of 2. Anytime I try to use an exitLevel I crash.

I notice if I put the exit door from 1Hero'sDemise to 1/0, t throws me to a bonus stage. I don't know where it's pulling that from. Also, where should we be putting saved files for the editor? I'm working from within a folder on my desktop.

Hipshot

  • Developer
  • Posts: 455
  • Level Designer
    • View Profile
Re: LevelExitArea
« Reply #7 on: December 12, 2013, 11:25:18 PM »
You did create a mod folder and a info.xml and a levels.xml right, like in this one:

http://www.youtube.com/watch?v=TUx9jSEE58E

Hipshot

  • Developer
  • Posts: 455
  • Level Designer
    • View Profile
Re: LevelExitArea
« Reply #8 on: December 12, 2013, 11:27:04 PM »
I did also change the upload size possible (I think) so see about uploading that level if you can =)

Flopjack

  • Posts: 19
  • Maggot Crusher.
    • View Profile
Re: LevelExitArea
« Reply #9 on: December 13, 2013, 12:49:22 AM »
Ooo, I missed the info document. Where can I get that from?

Heretic

  • Moderator
  • Posts: 305
  • Castle Runner
    • View Profile
Re: LevelExitArea
« Reply #10 on: December 13, 2013, 02:10:49 AM »
There should be an info.xml in the Example folder in the editor directory. HammerWatch/editor/example

Flopjack

  • Posts: 19
  • Maggot Crusher.
    • View Profile
Re: LevelExitArea
« Reply #11 on: December 13, 2013, 02:39:40 AM »
Thank you! That works. What does that file do?

Hipshot

  • Developer
  • Posts: 455
  • Level Designer
    • View Profile
Re: LevelExitArea
« Reply #12 on: December 14, 2013, 12:48:07 PM »
This file tells the game that you have your own level/mod =)