Results 1 to 6 of 6

Thread: always open rotatingdoor

  1. #1

    Default always open rotatingdoor

    Hello guys,
    I just got back to moh after more then 10 years with some friends. I'm trying to recreate all of the mods I was running back then but I'm struggling as I almost forgot everything about mod scripting.
    I remember having a mod to force all of the rotatingdoors in Malta to stay open but I really have no clue on how I did it back then.
    Any of you have some suggestions?

    EDIT: sadly it was done via hex editing the bsp...I give up on that it takes too much effort..I can live with that XD
    Last edited by Frexy; December 7th, 2021 at 09:51 AM.

  2. #2

    Default

    It's trivially done in BT, but assuming you want compatibility with SH (and you don't want a dependency like Nightfall), and if you don't mind removing the doors instead of opening them, I way to do it is:


    removeRotatingDoors:

    removeclass RotatingDoor

    local.door_locations[0] = ( 448 -704 -1346 )
    local.door_locations[1] = ( 1718 2680 -996 )
    //add locations of other doors here, make sure the origin is inside the door

    local.scriptslave = spawn script_object
    local.scriptslave setsize ( -16 -16 0 ) ( 16 16 92 )

    for (local.i = 0; local.i < local.door_locations.size; local.i++){
    local.scriptslave origin local.door_locations[local.i]
    local.scriptslave openportal //opens the areaportal if one exists inside the door
    }

    local.scriptslave delete

    end


    This is very specific to this map obviously because of the origins, but it does the trick. You just need to find each rotating door in the map and place the origin in that array.

    The openportal command is required because many doors in the game are pathways to area portals, and when they close those portals close with them. This is why removing the doors on their own won't work well as you'll see nothing behind them is rendered.
    The engine opens and closes the portals for you as you open and close the doors. This naturally means there will be more polys on screen so something else to bear in mind.

  3. #3

    Default

    Awesome I'll give it a try asap. Thak you man! Tbh I didn't know about Nightfall..that's gonna simplify my life by miles!!
    Last edited by Frexy; December 9th, 2021 at 07:50 AM.

  4. #4

    Default

    Yep, http://www.x-null.net/wiki/index.php...ands#getentity

    That script command is what you can use if you want to use Nightfall functionality (well, in this case it's Reborn but Nightfall has incorporated all of that, plus some extras). You'll be able to loop over all entities (max of 1024), and find those that are doors by checking their classname

    Though the comment that is provided with that command isn't strictly true. $player[0] doesn't exist as it starts with index of 1, and it could have an entnum more than 0 e.g. if client 0 leaves and the $player array resizes.
    Last edited by 1337Smithy; December 9th, 2021 at 10:43 AM.

  5. #5

    Default

    Dude, I'm loving these new commands..expecially getentity. Has been a joke to keep doors open knowing their entnum. Thanks alot!
    Last edited by Frexy; December 9th, 2021 at 12:49 PM.

  6. #6

    Default

    Yep, it's criminal that this wasn't added natively to AA, especially when so many entities do not have a targetname.

Posting Permissions

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