Results 1 to 10 of 10

Thread: Remove Doors - How to open all the doors?

  1. #1

    Default Remove Doors - How to open all the doors?

    You can remove all the doors in a map like this -

    Code:
    removeclass rotatingdoor
    but if the map has vis divisions the doorways have a wierd infinity effect if the doors are removed.

    I recall the trick to get around this was to open all the doors at spawn then remove them.

    How to open all the doors?

  2. #2

    Default

    You can edit the maps bsp and add a targetname to the doors and then you open them by script.

  3. #3

    Default

    If you are using reborn, you can use the getentity command to get all the doors in a map.
    and doors have to be opened by another entity before being removed. You can use $world for that

    here is a script I made some time ago to remove all the doors in a map


    nodoors:
    level waittill spawn;

    local.min = int (getcvar "sv_maxclients");
    local.max[0] = NIL;
    local.doors[0] = NIL;

    for (local.i = 0; local.i < 10; local.i++) {
    local.max[local.max.size] = spawn "ScriptSlave";
    }

    for (local.i = local.min; local.i <= local.max[local.max.size - 1].entnum; local.i++) {
    local.ent = getentity local.i;

    if (local.ent && (local.ent.classname == "Door" || local.ent.classname == "RotatingDoor" || local.ent.classname == "SlidingDoor")) {
    local.doors[local.doors.size] = local.ent;
    }

    if (local.i % 10 == 0) {
    waitframe;
    }
    }

    for (local.i = 0; local.i < local.doors.size; local.i++) {
    local.doors[local.i] open $world;
    local.doors[local.i] remove;
    }

    for (local.i = 0; local.i < local.max.size; local.i++) {
    local.max[local.i] remove;
    }
    end;



  4. #4
    Member
    Join Date
    Aug 2020
    Location
    Argentina
    Posts
    83

    Default

    Quote Originally Posted by ViPER View Post
    but if the map has vis divisions the doorways have a wierd infinity effect if the doors are removed.
    I wouldn't recommend to do that, but it depends on how the map is build. Rarely custom maps use manvis, so you wont have that visibility glitch BUT it may cause a fps drop given that the engine is rendering all the map all the time.

    In maps like V2, if you remove doors you'll also open portals so the whole map is going to be rendered all the time. You can test it using cvar r_showtris 2.

    Here's an example.
    MoH Reborn | MoH:AA Guide | Mapping tutorials | zzzzzMy_Maps.pk3 | YouTUBE
    __________________________________
    xNULL Discord
    __________________________________

    +set thereisnomonkey 1

  5. #5

    Default

    FYI, if you do go down the route mentioned above. You can also open area portals via $door openportal instead of opening the door itself. The game just does this internally when a door is opened by something anyways so doesn't matter either way, but thought it was worth mentioning. To close the portal again you can use closeportal.

  6. #6

    Default

    looks like I will need to see the bsp. I perfer to script rather than editing the bsp, but Im thinking i can remove all the doors - respawn the doors then open them and remove them again.

    I'm thinking I only need to open 1 door to each portal before removing them all? Does that sound right?

    what is recommended to view bsp? i see some choices - are these all editors?

    GtkRadiant

    GCFScape

    Q3Map2

    QuArK

    Irrlicht

    BSP
    Last edited by ViPER; March 6th, 2023 at 02:44 PM.

  7. #7
    Member
    Join Date
    Aug 2020
    Location
    Argentina
    Posts
    83

    Default

    I think none of them will do the job you want. You can try this and see if it works for your needs.

    Let me be curious, what are you planning to do? Maybe there's another way to do it.
    MoH Reborn | MoH:AA Guide | Mapping tutorials | zzzzzMy_Maps.pk3 | YouTUBE
    __________________________________
    xNULL Discord
    __________________________________

    +set thereisnomonkey 1

  8. #8

    Default

    Thanks,

    it's been about 12 years and I forgot about BSP View. any other tools I should know about? Posting finished script -

  9. #9
    Member
    Join Date
    Aug 2020
    Location
    Argentina
    Posts
    83

    Default

    I don't know any other tool to view bsp without decompiling it into map. You can try this decompiler to convert bsp into maps so you can load them in mohradiant.
    MoH Reborn | MoH:AA Guide | Mapping tutorials | zzzzzMy_Maps.pk3 | YouTUBE
    __________________________________
    xNULL Discord
    __________________________________

    +set thereisnomonkey 1

  10. #10

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •