• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Armor Ricochet

Should this even be implemented in the 1st place?


  • Total voters
    4
Status
Not open for further replies.
Level 13
Joined
Jul 2, 2015
Messages
872
For my "Tiriath Civil War" map I want tanks to have a chance that their armor negates a attack and the projectile shot at them bounces off and hits something else (Ground or if unlucky another unit) and this only works if the tank has a ability/upgrade called "Angled Armor" and I want this to be able to fluctuate depending on vehicle (T-34/76 may have a much larger chance of bouncing shots then a Panzer III/IV) Does anyone know of a spell/ability that can atleast somewhat replicate this?
 
Level 39
Joined
Feb 27, 2007
Messages
5,011
No spell like this in the game; an attack launched can't be redirected. Defend can be used to absorb projectile damage but afaik it can't send that damage anywhere else on your own. You could modify a DamageDetectSystem and store data about what projectile models each unit has (to be able to create & launch the redirected ones yourself), but at the end of the day that's a fair amount of data you'd have to precache.

The simplest solution I see you have is to trigger your own projectile system or implement one you find here. At that stage it should be easy to get such an ability to function properly, you just need a lot of framework to reach that point.
 
Last edited:
Level 13
Joined
Jul 2, 2015
Messages
872
No spell like this in the game; an attack launched can't be redirected. Defend can be used to absorb projectile damage but afaik it can't send that damage anywhere else on your own. You could modify a DamageDetectSystem and store data about what projectile models each unit has (to be able to create & launch the redirected ones yourself), but at the end of the day that's a fair amount of data you'd have to precache.

The simplest solution I see you have is to trigger your own projectile system or implement one you find here. At that stage it should be easy to get such an ability to function properly, you just need a lot of framework to reach that point.
Ideas on how it could be done?
 
Level 28
Joined
Apr 6, 2010
Messages
3,106
Pretty sure Defend can send attacks back to the sender (I've seen Wind Riders get killed by Footmen), but I think it's inactive by default.

Maybe you can set it up so the attacker firing on the ricochet target has a bouncing attack that does no damage on the first but hits the second target?
 
Level 12
Joined
Mar 24, 2011
Messages
1,082
Btw, also, sloped armor is designed to direct ricochets vertically high into the air for the exact reason not to hit another unit, usually ally, if ricochet horizontally.

Anyway, My suggestion is to design a 2d box collision system yourself for the tanks and a point collision missile system for the projectiles.
Actually, you could do it with a circle for the tanks and point for the projectiles and work out what angle the projectile would go after ricochet by the facing of the tank and the quadrant the impact is in...

You will have to learn some basic trigonometry and basic game programming for this though...

-Ned
 
Level 10
Joined
Oct 5, 2008
Messages
355
I have thought about triggering something like that myself, the most important part is really how you code your projectile system.

Do you make it velocity based? Do you have static paths? Do you have the movement independing or instrinstic to the missile (Independance can creatge nice things like wind skewing your missile into a certain direction, but could cause upredicable behaviour with stacked v elocity in a single direction. Elevator jumps in platformer or fps games are a cause of such a system)?

Depending on how you code such a system, you theoretically don't even need the missile to deal damage and thus fire a dds system, you could just switch up some variables and "look at it go". This will require some triggerwork, though.
 
Status
Not open for further replies.
Top