Login

russian armor

How to make shell explode without hitting the ground

3 Jun 2017, 04:55 AM
#1
avatar of Dreadbot
Donator 11

Posts: 94

I gave the Sexton an airburst barrage ability a while ago, but it has an annoying visual bug that the shells hit the ground at the same time as the airburst explosion happens above them. I would like to make it so the shell stops in the air (and disappears) at the same place where the explosion happens - if this is even possible.
4 Jun 2017, 14:53 PM
#2
avatar of Mr.Smith

Posts: 2636 | Subs: 17

The best way is to give your sexton airburst shells a deathtimer. That way, the shells will disappear before they hit the ground.

Ideally you want to make the shells disappear well after they're no longer practically visible. Then, when the shell actually collides, the effect will make it appear as if it had just entered the screen.

To achieve this, have a look at how mortars fire their mortar flares (the actual flare projectile disapperas into the air).

Just make sure that your sextons fire at a very high angle, so that the shell disappears while it's out of view.
4 Jun 2017, 21:31 PM
#3
avatar of Dreadbot
Donator 11

Posts: 94

I tried setting deathtimer to 1 second (it was 2.5 seconds) and... nothing changed, despite the projectile taking more than 1 second to reach the target. Is there anything else I could try?
4 Jun 2017, 21:47 PM
#4
avatar of Mr.Smith

Posts: 2636 | Subs: 17

Nothing happened, as in the projectile didn't disappear, or nothing happened as in there was no damage caused, etc?
4 Jun 2017, 21:56 PM
#5
avatar of Dreadbot
Donator 11

Posts: 94

I said nothing changed. The shell visibly hits the ground as before.

Edit: Any idea what they did differently in CoH1?
4 Jun 2017, 23:39 PM
#6
avatar of Mr.Smith

Posts: 2636 | Subs: 17

I know next to nothing about CoH1 modding. However, when I asked Nachocheese he tried to explain to me that airburst was implemented different between CoH2 and CoH1

Have a look at this mod:
https://github.com/xxpatch/consmod

And have a look at the projectile for the "elefant_airburst_barrage_weapon_mp" is implemented. I've set both deathtimer and life_time_while alive to 2 (still not sure which one does what).

If your shell doesn't disappear fast enough, set that thing to an even lower duration (e.g., 0.5 secs).

If that doesn't work, then feel free to copy what I did for the Elefant barrage:
- I have one weapon that fires the visible shell (that disappears when it reaches above the intended target)
- I have another weapon that fires an invisible shell that does the actual damage and the explosion visuals
- Finally, I have a 3rd shell that fires once to coordinate the visible and the invisible shells

In my case, the Elefant gun cannot aim high enough to cover all possible ranges. Therefore I had to limit the barrage to 60-70 range to make the visuals "believable".

For your case, the "visible" shell and the "invisible" shell should share the same arc characteristics.

The "visible" shell should die while airborne (you need to see how much time you need for that. The "invisible" shell will have to stay alive (but invisible) until it can collide with the desired target.

To synchronize the shells:
- Make sure that there is no randomness (min aim/reload/whatever time = max)
- set collision to tp_sticky (so that neither shell will collide with anything on their way)

5 Jun 2017, 10:43 AM
#7
avatar of Mr.Smith

Posts: 2636 | Subs: 17

Actually; remove the deathtimer/alive thing I told you earlier (i.e., set them to 0).

Instead, look at the action-apply-ext of the projectile. There's something there that executes to make the shell visible.

You could try wrapping that in a timed action (fire and forget: true) for X seconds, and see if that makes the projectile "disappear" after a while.
6 Jun 2017, 20:48 PM
#8
avatar of Dreadbot
Donator 11

Posts: 94

Well I just tried setting life_time_while_alive to 1 second and it does result in the shell disappearing... and the actual explosion not happening. So I guess I'll need the second, invisible shell like you mentioned.
0 user is browsing this thread:

Ladders Top 10

  • #
    Steam Alias
    W
    L
    %
    Streak
Data provided by Relic Relic Entertainment

Replay highlight

VS
  • U.S. Forces flag cblanco ★
  • The British Forces flag 보드카 중대
  • Oberkommando West flag VonManteuffel
  • Ostheer flag Heartless Jäger
uploaded by XXxxHeartlessxxXX

Board Info

808 users are online: 808 guests
0 post in the last 24h
8 posts in the last week
35 posts in the last month
Registered members: 49104
Welcome our newest member, zhcnwps
Most online: 2043 users on 29 Oct 2023, 01:04 AM