• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Reflecting angles for wave type spell

Status
Not open for further replies.
Level 10
Joined
Apr 9, 2004
Messages
502
Ok, so i'm working on a spell that fires a projectile which is meant to bounce of trees and certain units. Now the problem i have is i'm not sure how to trigger the proper bouncing angles for the projectile. So if anyone can tell me how to set the trigfers up i;d be grateful. BTW i don't just want the missile coming back in the opposite direction, i want actaul reflecting, like in one of ArkSword's maps (i think that's his name) except without the cheating by using regions to determine how the missile bounces.

PS: no offense ArkSword, your skill was still good regardless.
 
Level 10
Joined
Apr 9, 2004
Messages
502
well i kinda lied, it's not actually a missile. It's a move where my panda hero curls into a ball and rools a certain distance damaging unit's in his path. I wanted to make certain wards able to reflect him and send him another way.

So far i think you can set the trigger up, but all i know so far is you require the angle the missile is facing and the angle from the the target he's bouncing off of, and his position. These two coordinates ar certain to determine the angle he reflects at. So far, all i know is if the angle he's facing is the exact opposite of the angle form the target to him (ie his facing angle is 45 and the angle btween target and him is 225 [keep in mind the angles are always constant ingame where 0 is east, 90 degrees is north etc.]), his new course is exactly the opposite direction.

So i'm sure it is possible, it would be like trying to calculate the angle of reflection off of a circle pretty much. Now to find the formula... Perhaps someone knoews how to set this trigger up to calculate the angle...
 
Level 16
Joined
Sep 3, 2004
Messages
2,086
Hmmm, how about angle bisectors? If anyone else knows this, in pool, to make a shot in a corner, you take your panda's facing, subtract it from the wall's facing (horiz/vertical) and add/subtract from the panda's angle to change it. Here's the example pic
untitled1ff.png
 
Level 3
Joined
Dec 23, 2004
Messages
40
Well other might understand what you want but iam confused. :?

And if you want my help.
Be more precisliey
 
Level 10
Joined
Apr 9, 2004
Messages
502
Well im not sure i can completely do that because the burrow effect is attached directly onto certain models (i suppose i could make a polymorph that transfromed units to look like that.) that might work. Thanks for giving me an idea. But still, i;ve already set it up to somewhat run over units (i play their death anims so most look like they;ve been flattened anyways) but like i waid, i wanted to make certian wards that could reflect the attack, because the spell affects buildings even more than units so unless they slow down enough to stop, or they bounce or they damage the building, there's really no way to stop them otherwise. I suppose, hoever that i could simply make them change their direction completely (=180) for simply reflecting.
 
Level 16
Joined
Sep 3, 2004
Messages
2,086
YOu could seriously use angle bisectors. Just take the facing of the bouncer and the facing of the roller and average it, then turn it 180?

For the running over effect, what I mean is to immobilize them one way or another, and create a burrowed crpyt fiend with locust, which will eventually be removed and free the poor fellow who got trampled
 
Level 10
Joined
Apr 9, 2004
Messages
502
oh ok i'll try to use the bisectors...i just didn't know how. As for the running over effect, i suppose i could set it to still stun them, make them invisible, and plant a burrowed unit on their position. That could work i suppose. Right now though, i think i'd be too much. Granted, my guy rolls over units yes, but he merely runs over them, leaving them splattered on the ground. Still that gives me an excellent idea for another spell i've been trying to make for another concept i've never been able to achieve.

But as for the rolling over units, knocing them off their feet seems good enough. Thanks for the advice though. I'll try the bisectors thingies.
 
Level 10
Joined
Apr 9, 2004
Messages
502
right now, i set it up so he can roll through a certain amount of units and destructables. once he hits the number, he'll do the slowing stop and end the spell. If he hits buildings however, he deals larger damage, but gets stunned.

I actually made another ability with a hero with a harpoon weapon where he thrusts and stabs/carries unit's a fair distance before dropping them. Now if he hits a tree or building however, he deals extra damage plus a stun to unit's within range (it always hits the units he picked up, which is it's purpose but if there are other units nearby, then he'll get them too.)

So that's the rundown of the skill. I'll add it so i can show you what it looks like so far, along with all the other skills i've made ever since i've been working on a project.
 
Status
Not open for further replies.
Top