How to make shell explode without hitting the ground
3 Jun 2017, 04:55 AM
#1
1
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
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.
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
1
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
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
1
Posts: 94
I said nothing changed. The shell visibly hits the ground as before.
Edit: Any idea what they did differently in CoH1?
Edit: Any idea what they did differently in CoH1?
4 Jun 2017, 23:39 PM
#6
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)
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
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.
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
1
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.
PAGES (1)
1 user is browsing this thread:
1 guest
Livestreams
36 | |||||
27 | |||||
58 | |||||
20 | |||||
16 | |||||
8 | |||||
3 | |||||
2 | |||||
2 | |||||
1 |
Ladders Top 10
-
#Steam AliasWL%Streak
- 1.831222.789+37
- 2.600215.736+15
- 3.34957.860+14
- 4.1107614.643+8
- 5.305114.728+1
- 6.916405.693-2
- 7.273108.717+24
- 8.722440.621+4
- 9.1041674.607-2
- 10.17146.788+1
Replay highlight
VS
- cblanco ★
- 보드카 중대
- VonManteuffel
- Heartless Jäger
Einhoven Country
Honor it
9
Download
1235
Board Info
971 users are online:
971 guests
0 post in the last 24h
8 posts in the last week
37 posts in the last month
8 posts in the last week
37 posts in the last month
Registered members: 49103
Welcome our newest member, 77betgratis
Most online: 2043 users on 29 Oct 2023, 01:04 AM
Welcome our newest member, 77betgratis
Most online: 2043 users on 29 Oct 2023, 01:04 AM