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.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
Cool! Let me know if that works. Yes, just use the spawnairdrop command in the console.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 ?
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.
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!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).
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.I finally pushed some improvments, sorry for the delayAvailable at the same address (https://github.com/Umbrella7D/7Dmods)
- Explosion chance is 50%
- Explosion destroys the crate
- Secondary projectiles spawn better