HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Trample and extended melee attack range

01-13-2007, 08:00 PM#1
Pyrogasm
How would one go about making an ability that would enable the hero to "trample" in a straight line towards a given point? It must have something to do with disabling collision, but that then enables the hero to move through buildings and over cliffs, which I don't want.

What happens if I do something like this:
Trigger:
For each (Integer A) from 1 to 8, do (Actions)
Collapse Loop - Actions
Unit - Turn collision off for (Triggering Unit)
Wait - .125 game-time seconds
Unit - Turn collision on for (Triggering Unit)
Wait - .125 game-time seconds
Would that do bad things?

Question 2:

The max attack range to be considered "melee" is ~ 130, but I have a scaled-up mountain giant model that should have an attack range of about 250. How would I go about making it still say "melee" on his attack card, but have him deal damage at the correct point (the way it looks now, he his stuff with his elbow)?
01-13-2007, 08:32 PM#2
Captain Griffen
Question 2:

Probably gameplay constants.

Mess with the animation hit point.
01-13-2007, 08:44 PM#3
Rising_Dusk
Quote:
The max attack range to be considered "melee" is ~ 130, but I have a scaled-up mountain giant model that should have an attack range of about 250. How would I go about making it still say "melee" on his attack card, but have him deal damage at the correct point (the way it looks now, he his stuff with his elbow)?
Max melee range is 128, and I believe this is a WC3 engine thing that we cannot change.
If it can be changed, I have never, ever seen it done before.

And the trigger you posted would do the same 4 actions 8 times, right after one another.
It wouldn't do anything "wrong", though it might be a kind of long period of time.
12.5*8 is 200 seconds afterall.

The real thing you need to know about turning off collision is that the unit you turn collision off for treats nothing else as an obstacle, but is still itself considered an obstacle.
Quote:
It must have something to do with disabling collision, but that then enables the hero to move through buildings and over cliffs, which I don't want.
Then don't turn off collision for the unit, simple as that.
And if you want any more details on possibilities, you'll need to better explain what you mean when you say "trample."
01-13-2007, 08:57 PM#4
shadow1500
Quote:
The max attack range to be considered "melee" is ~ 130
What difference does it make though? If Attack Types and Damage Types are set correctly it shouldn't make a difference.

EDIT:
UI\MiscData.txt:
[InfoPanel]
MeleeRangeMax=128
Don't know but it may be possible to change Worldedit's Gameplay constants menu to include this field so you can change it without MPQ editing.
01-13-2007, 11:53 PM#5
Pyrogasm
D'oh!

I meant to put 0.125 seconds, not 12.5 seconds; that should better explain why I was wondering if it was doing something "wrong". I've fixed the above post.

As for the "trample" ability, I intend to have the hero rapidly move from one point to another in a straight-line charge (meaning that he will go through units, not around them), dealing damage to units along the way (with permanent immolation, obviously).

Could I do something with putting regions around buildings and such, so that the hero enters the region with the buff on, he'll gain collision; if he leaves the region with the buff, he'll lose his collision again?
Quote:
Originally Posted by Rising_Dusk
The real thing you need to know about turning off collision is that the unit you turn collision off for treats nothing else as an obstacle, but is still itself considered an obstacle.
I did know this, actually, but thanks for confirming my tests
Quote:
Originally Posted by shadow1500
What difference does it make though? If Attack Types and Damage Types are set correctly it shouldn't make a difference.
For looks. And if I make him ranged, things might look weird because I'd have to give him a projectile...
01-14-2007, 12:15 AM#6
Rising_Dusk
Quote:
I'd have to give him a projectile...
No you wouldn't.
Just make him ranged with a melee attack appearance.
You can still do "Attack: Normal" with a range of 250.

Quote:
As for the "trample" ability, I intend to have the hero rapidly move from one point to another in a straight-line charge (meaning that he will go through units, not around them), dealing damage to units along the way (with permanent immolation, obviously).
Make it a target point spell, disable collision for him, use a timer to set his X/Y coords with SetUnitX/Y calls and then destroy it when distance traveled is greater than or equal to the distance between his starting point and the target point of the spell.
I've made a spell practically identical to it several times before, so trust me here. :P
01-14-2007, 02:39 AM#7
Pyrogasm
Quote:
Originally Posted by Rising_Dusk
No you wouldn't.
Just make him ranged with a melee attack appearance.
You can still do "Attack: Normal" with a range of 250.
D'oh. I'm just not thinking this evening...
Quote:
Originally Posted by Rising_Dusk
Make it a target point spell, disable collision for him, use a timer to set his X/Y coords with SetUnitX/Y calls and then destroy it when distance traveled is greater than or equal to the distance between his starting point and the target point of the spell.
I've made a spell practically identical to it several times before, so trust me here. :P
Won't the unit be moved into buildings and over cliffs still? Setting unit X/Y for a unit with no collision seems like it won't do anything different than what it does now?
01-14-2007, 03:02 AM#8
Rising_Dusk
Well if there's a mountain between you and the target point, then yes there is that problem.
But that's the only real way to do it.

You could check pathability of every single point, and stop the spell if a single point isn't pathable to walk.
However, that might get annoying for the caster in-game.

It's a matter of preference when it boils down to it.
Do what feels like it makes the most sense for your hero.
01-14-2007, 03:22 AM#9
Pyrogasm
Meh. Thanks for the help...
01-14-2007, 03:15 PM#10
NmdSnprEnigma
I just made something like this for a map of mine. Try using Windwalk as your base ability, set the fade time to higher than the duration and it won't become invisible. You'll probably wanna get rid of the backstab too. Oh, also if you want it to really 'dash', set the speed factor to something. And I checked, it doesn't let you walk through buildings.

Trigger:
Dash Stun Copy
Collapse Events
Unit - A unit Starts the effect of an ability
Collapse Conditions
(Ability being cast) Equal to Dash (Move)
Collapse Actions
Unit - Add Permanent Immolation (Neutral Hostile 1) to (Triggering unit)
Wait until (((Triggering unit) has buff Dash ) Equal to True), checking every 0.10 seconds
Wait until (((Triggering unit) has buff Dash ) Equal to False), checking every 0.10 seconds
Unit - Remove Permanent Immolation (Neutral Hostile 1) from (Triggering unit)