Announcement

Collapse
No announcement yet.

Airdrop ~ Aerial bomb/nuke

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Request Airdrop ~ Aerial bomb/nuke

    Do you think it is possible to make the plane drop a bomb or nuke instead of the supply crate? I know this will probably make the server lag as hell when the bomb explodes, depending on how much is actually destroyed. I guess this cannot be changed with just an xml edit.

    #2
    I think not,

    -Air drops are far from the players
    -I don't know how to trigger targeting on players
    - created an explosion in contact with the ground? maybe the molotov code

    For the skin (barrel bomb) with a nuclear barrel

    Comment


      #3
      Originally posted by ArMaReZ View Post
      I think not,

      -Air drops are far from the players
      -I don't know how to trigger targeting on players
      - created an explosion in contact with the ground? maybe the molotov code

      For the skin (barrel bomb) with a nuclear barrel
      Yes, maybe the distance from the players can be changed in the assemblycsharp.dll file or something. I have tried adding different values on the crate. I tried making the supply crate to be a zombie instead just for the lols. It worked, but now I am getting a different idea. The demolition zombie gave me that idea with his beeping and explosiveness.

      So now I am thinking on how to make the supply crate explode, like it was a bomb inside. Adding in a random variable (buff) that sometimes the airdrop could be a bomb and you would need to be cautious. Listening for ticking sounds or something. Tried with explosive values when the crate gets destroyed, but the crate just gets destroyed with no explosion and no block or entitydamage whatsoever. I am going to try some more before I will give up. Maybe someone here knows how it could be done if I'm lucky. 🙂

      Comment


        #4
        Hello,

        I don't know if you can set an Explosion on an Entity (which is what the plane drops), instead of an item (eg molotov).

        What you could do is harmony-patch the method AIDirectorAirDropComponent.SpawnSupplyCrate():
        - Alter this.supplyCrates[0] in the prefix method to spawn an Entity that looks like a bomb (boulder maybe ?)
        - Get the created Entity in the postfix (value returned by the method). Then start a coroutine that waits for x second, and create an explosion at the entity location. Main issue may be that entity no longer exists, so maybe track the position continuously in the waiting coroutine and use the last known position.

        I will try this when I have time. Is there a game command to trigger an air drop, in order to test this easily ?

        Comment


          #5
          Even better than waiting for x second : trigger as soon as the dropped item hits ground.

          Comment


            #6
            Originally posted by Umbrella View Post
            Hello,

            I don't know if you can set an Explosion on an Entity (which is what the plane drops), instead of an item (eg molotov).

            What you could do is harmony-patch the method AIDirectorAirDropComponent.SpawnSupplyCrate():
            - Alter this.supplyCrates[0] in the prefix method to spawn an Entity that looks like a bomb (boulder maybe ?)
            - Get the created Entity in the postfix (value returned by the method). Then start a coroutine that waits for x second, and create an explosion at the entity location. Main issue may be that entity no longer exists, so maybe track the position continuously in the waiting coroutine and use the last known position.

            I will try this when I have time. Is there a game command to trigger an air drop, in order to test this easily ?
            Cool! Let me know if that works. Yes, just use the spawnairdrop command in the console.

            Comment


              #7
              Hello,

              Here you go !
              https://github.com/Umbrella7D/7Dmods

              The readme contains some details. This is only a first version (the easiest I could come up with). Much more could be done (multiple possible crates; change bomb graphism, modify flight path ...).

              NB: Only tested through game command in a single player game.
              Last edited by Umbrella; 2 weeks ago.

              Comment


                #8
                Originally posted by Umbrella View Post
                Hello,

                Here you go !
                https://github.com/Umbrella7D

                The readme contains some details. This is only a first version (the easiest I could come up with). Much more could be done (multiple possible crates; change bomb graphism, modify flight path ...).

                NB: Only tested through game command in a single player game.

                Wow! Thank you so much! I am going to test it out

                Comment


                  #9
                  It looks like the secondary projectiles explode right away. I will fix the way they are spawn (looks like they collide directly with either the crate, the initial molotov, or with each other).
                  Last edited by Umbrella; 3 weeks ago.

                  Comment


                    #10
                    Originally posted by Umbrella View Post
                    It looks like the secondary projectiles explode right away. I will fix the way they are spawn (looks like they collide directly with either the crate, the initial molotov, or with each other).
                    Yes, I tried it out and it exploded so I thought that was pretty cool. I wanna learn scripting like this, it seems like fun! Is it possible to add a random trigger that sometimes it explodes and sometimes it doesn't? So it is like an fake airdrop made to kill the player. So when an airdrop spawns you are not sure if it is the original airdrop or the fake airdrop lol.

                    Comment


                      #11
                      Glad you liked it !

                      Adding a random trigger is pretty straightforward (easier than creating a list of possible crates to drop). Also, I fixed the spawn of the secondary projectiles. They no longer explode right away, so the "bomb" looks much nicer. I will upload both fixes to github tonight.

                      Comment


                        #12
                        I finally pushed some improvments, sorry for the delay
                        Available at the same address (https://github.com/Umbrella7D/7Dmods)
                        - Explosion chance is 50%
                        - Explosion destroys the crate
                        - Secondary projectiles spawn better
                        Last edited by Umbrella; 2 weeks ago.

                        Comment


                          #13
                          Originally posted by Umbrella View Post
                          I finally pushed some improvments, sorry for the delay
                          Available at the same address (https://github.com/Umbrella7D/7Dmods)
                          - Explosion chance is 50%
                          - Explosion destroys the crate
                          - Secondary projectiles spawn better
                          Good job! I tested it out and it is nice. Can you make it so it won't explode right away? Like a random trigger time between 15 seconds and 2 minutes after landing. ^^ and that it autoexplodes when a player tries to open it. So now players need to let the airdrop land and wait for a while before they can be sure it is a real airdrop and not the bomb.

                          Comment


                            #14
                            Thanks ! This sounds very doable, but with more work (for instance make sure no bug occurs if the crate is destroyed).
                            Not sure when I'll have the time.

                            Comment

                            Working...
                            X