Posts: 350
Threads: 18
Joined: Oct 2014
Thanks: 26
Given 54 thank(s) in 47 post(s)
Hi, I'm a bit of a noob here, but I'm attempting to make a rocket jump plugin (Search TF2 rocketjump if you don't know what I mean). I have everything working perfectly, except the terrain being destroyed. Is there a way to create an explosion that still has significant knockback, but doesn't alter terrain? The only way i could think of doing this is spawning a primed TNT, reading the block type of a 3x3x3 cube around the TNT, setting that as water, then afterwards set those blocks back. Unfortunately, I found this to be incredibly unreliable and only works about 30% of the time. I would HIGHLY appreciate any suggestions.
Posts: 350
Threads: 18
Joined: Oct 2014
Thanks: 26
Given 54 thank(s) in 47 post(s)
The problem is that I want the explosion because they cause a large amount of player knockback. The player is able to throw snowballs and use them as "rockets" to hurt others or to propel himself in the air. I just can't find a way to make an explosion that still hurts the player and sends him flying, but Don't damage the terrain. I tried to use the OnExploding hook to restore that segment of the terrain but it turned out to be unreliable.
Posts: 6,485
Threads: 176
Joined: Jan 2012
Thanks: 131
Given 1075 thank(s) in 852 post(s)
I'd go about it that way as well - do not actually use explosions, but simulate them by setting the nearby players' speed and perhaps sending the particles. There is currently no way to stop an explosion from destructing terrain, other than removing the explosion altogether.