• Shoutbox
    Active Users: 0
  • Notice: N/A
  • Active Users
  • There are currently no users chatting.
Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1

    Is there a Tutorial for exploder script to blow up door.

    Hi All,
    Wandering if there was a Tutorial on making a locked door explode to allow access beyond the door?
    any info would be great.

  2. #2
    Sure, the SH SDK comes with an exploder tutorial.


  3. #3
    ShadowTwl:I replied to your email with a simple solution.
    I don't know how much it differs from the tutorial Smithy mentioned but it's possibly an easier alternative.

    Whoa, I've just checked that tutorial and although a bit more complex than my suggestion, it has flying debris. Sweet. lol
    Plus the tutorial is actually focused on a door, exactly what you're after.

  4. #4
    Cool thanks guys.

    So I followed the steps in the link you sent me but I donít know if I missed something.
    Right now when I load the map the door explodes even before I spawn in.
    I canít figure it out lol.

  5. #5
    Administrator Major_A's Avatar
    Join Date
    Jul 2016
    Huntington, IN USA
    Blog Entries
    @ Acca,
    I'd like to see your solution too :P

    If it helps anyone in the future, for a stock map you can remove or hide/duplicate things if you know the entnumber.

    I got a brief explanation of that when I saw testing of door breaching explosives using a remote detonate mod...I wish I had that remote det mod lol, I think he might have modded the sticky bombs mod to do that.

  6. #6
    Map Script:

    exec global/detonator.scr "0 0 0" 1 // put 1 if you whant the detonator to get removed when you trigger him

    main local.detonator_place local.detonator_remove:
    local.detonator = spawn script_object targetname "detonator"
    local.detonator model "miscobj/detonator.tik"
    local.detonator.origin = ( local.detonator_place )
    local.detonator.to_remove = local.detonator_remove
    local.detonator anim idle
    local.detonator_trig = spawn trigger_use
    local.detonator_trig.origin = ( local.detonator.origin )
    local.detonator_trig setsize ( -10 -10 -10 ) ( 10 10 50 )
    local.detonator_trig setthread detonate
    	$detonator  anim "fire"
    	self playsound plunger
    	self nottriggerable
    	if($detonator.to_remove == 1)
    	$detonator remove
            self remove
    Last edited by DoubleKill; 05-08-2019 at 01:55 PM.

  7. #7
    Administrator Major_A's Avatar
    Join Date
    Jul 2016
    Huntington, IN USA
    Blog Entries
    I did ask Lamron how he was doing his door breaching explosives and he did have this to say for the help of anyone interested...

    I don't have any of the old videos, but I can tell you in a general way how the door breaching worked, if you want to try to script it.

    You can't just hide + notsolid the door. The MOH engine doesn't draw anything behind closed doors to save processing. So, first you have to open the door. Do this by spawning a dummy A.I. at the location of the door. The dummy A.I. will open the door, but not do anything else. Hide and make notsolid the dummy and the door. Now you have a clear opening. Spawn a crate explosion at the location at the same time to hide the sound of the door opening and so it doesn't just disappear. I would recommend putting a time limit on it, and restore the door later. Having it missing (open) is a greater load on the engine and you don't want all the doors on the map gone at the same time.

    Its a tricky thing to script, but a nice addition to the game if you can get it all working.

    That is a really nice addition Doublekill...Thanks a bunch!!!!!!....that will come in handy at some point!!!!
    I think that has..if I read it correctly what I was just told.
    Last edited by Major_A; 05-09-2019 at 04:25 AM.

  8. #8
    I assumed ShadowTwl was specifically talking about a custom map, and as such the door won't be an actual door, just a brush, so it shouldn't be an issue. Have you got it working yet, ShadowTwl? You can always post your script here so we can look.

    And yes, *some* working doors in stock maps have portal brushes placed inside them, so when they are closed any BSP leafs behind it are flagged for culling (assuming all other doors around it are also closed).

    This is only applicable for actual working doors with portal brushes inside them, so brushes that are just textured as doors won't be an issue. Some working doors aren't portalled because the space behind it isn't sealed, so they too won't be a problem (e.g. houses with transparent windows or destroyed walls).

    Also, as per that description, if you are able to reference the door, you don't need to spawn AI to open it. You can open it with a script via several ways.

    You can trigger them using another already existing entity (no spawning needed). For example:

    	$player trigger $supplyroomdoor
    This will automatically open the door and the portal up.

    You can also open the portal manually via functions:

    	$storageroomdoor openportal
    Then do whatever you want with it, be that hiding it, removing it, or whatever.

    You can also open it with functions too:

    	$storageroomdoor doopen
    	$storageroomdoor openportal
    Or, if it's your own map, maybe it's not worth putting a portal brush in your door if you're going to blow it up anyway, so no portal control is needed.

    Oh, and you can change the noises the doors make when they open, so no spawning sounds to mask it are needed either. But if you can reference the door, my suggestion would be to just open the portal with a single line, and then hide/remove it. No door sounds will be played then, and no extra entities need to be spawned.

    But this is probably irrelevant to what ShadowTwl requires so best let him reply with his script and/or scenario.
    Last edited by 1337Smithy; 05-09-2019 at 12:36 PM.

  9. #9
    Hey guys sorry its been soo long since my last message.
    internet issues...

    What I should have said is that I'm trying to make a wall textured like a door blow up. I don't need a functioning door.
    is there a way to make it blow up via gun or grenade? or possible a charge that Wont end the match. The map is obj and I already have a bridge as the objective.
    I am new to scripting.

  10. #10
    Here, I made a simple tutorial map that gives you two examples:

    - one door that can only be blown up with a grenade
    - one door that can be blown up with either a grenade or a gun (effects will be different depending on which you choose)

    It may be useful for anyone else to check this out also. I use some tricks like crate debris that can give a nice effect of door pieces getting shot. It can be improved upon and the level of detail can be increased to your liking.

    Put the pk3 file (located inside the zip below) in mohaa/main folder, load up the game, and then type "map test_killdoor" in the console to try it out. The map file is included in the pk3 too. Look at how it's done in the map and in the script.

    File: https://1drv.ms/u/s!ArHk7-tKjpYEgmwM...-uBXT?e=NodYis

Posting Permissions

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