A trample ability for cavalry type units...

hellblazer-1

New Member
Reaction score
3
A trample ability for cavalry type units...

Yeah, Hey again Guys
That's my question...

I want to make an ability that causes all cavalry units to "crush" nearby enemy units when they move past them, so basing it off permanent immolation would not work. Basically, I want an ability that only hurts enemy units if the horse is moving itself.

How would I trigger this, or off which ability would i base it? Thorn aura won't work, hmmm.... Help would really be appreciated!!!
 

Hildagarn

Member
Reaction score
20
hmm....
Code:
Events
 A unit comes within 200 of horse
Conditions
 The unit must be moving?
Actions
 Play entering unit's(prolly isnt entering unit) death animation
 Deal ### damage to entering unit
dont know the condition....i might have done it all wrong XD
 

Draphoelix

It's not the wintercold that's killing me
Reaction score
132
Code:
A unit is issued targeting a point
Condition
Triggering unit equal to Horse
Action
If
(Issued order) Equal to (Order(move))
Then
Add Immolation to (Triggering unit)
Else
Remove Immolation from (Triggering unit)

Code:
A unit is issued an order with no target
Condition
Triggering unit equal to Horse
Action
If
(Issued order) Equal to (Order(stop))
Then
Remove Immolation from (Triggering unit)
Else

Not sure if it works.
 

Romek

Super Moderator
Reaction score
964
I'd use "Unit within Range" event. It only triggers when a unit comes into range (Which it has to move to do so) and won't keep triggering if the unit stays in range :)

Edit:
Beat.. A lot.
 

hellblazer-1

New Member
Reaction score
3
thank you very much!
But.. one problem with that trigger, I need the trigger or spell to work with every cavalry unit in the game, not just one, and there could be hundreds in it....

Its just an ability that cavalry units have. I know, its probably impossible to trigger without having to use jass >< :(
But thanks for helping me, plus rep to you!
Please, if there is any way to make it work with multiple units (and not variables or single units determined through a trigger, but every unit of type...)

Please let me know :)


--- EDIT ---

I know that one using immolation is the best one, because it can be changed to target any cavalry type unit, but it uses immolation - immolation gives off a "fire" buff, even if you remove any buffs it has. Dunno why :S
 

Draphoelix

It's not the wintercold that's killing me
Reaction score
132
Uh mine trigger doesn't work with multiple units? Have you tested it? I think the stop condition is struggling it, cause if you stop with multiple units it stops excactly at the same time. Yes I can make it MUI.. I think, just tell me if it's MUI now or not and I'll pm you the code.
 

Romek

Super Moderator
Reaction score
964
thank you very much!
But.. one problem with that trigger, I need the trigger or spell to work with every cavalry unit in the game, not just one, and there could be hundreds in it....

Its just an ability that cavalry units have. I know, its probably impossible to trigger without having to use jass >< :(
But thanks for helping me, plus rep to you!
Please, if there is any way to make it work with multiple units (and not variables or single units determined through a trigger, but every unit of type...)

Please let me know :)

Easy.
Use a unit-type comparison instead of a unit comparison, and don't use waits.
It'll work perfectly :D

Also, I suggest using the "Damage Unit" action instead of adding and removing immolation.
 

AdamGriffith

You can change this now in User CP.
Reaction score
69
Just use an event that detects when a new cavalry unit comes into play. And then add the specific unit event concerning that cavalry unit to a trigger.
 

hellblazer-1

New Member
Reaction score
3
thank you! Working on it now :D:) Plus rep for everyone who helped me, and thank you very much!!!

EDIT ---

Sorry, one more question, I know how to make the unit damage an area, and Ive gotten it so far ---

Code:
trampling
    Events
        Unit - A unit Is issued an order targeting a point
    Conditions
        ((Unit-type of (Triggering unit)) Equal to Scout Cavalry) or ((Unit-type of (Triggering unit)) Equal to Knight)
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Issued order) Equal to (Order(move))
            Then - Actions
                Unit - Cause (Triggering unit) to damage circular area after 0.00 seconds of radius 100.00 at (Position of (Triggering unit)), dealing 5.00 damage of attack type Normal and damage type Universal
            Else - Actions
                Do nothing

But this will only make the unit damage the area around it once, I need it to damage the area around it for all the time, until it is either ordered to stop, or reaches its targeted destination... can someone please tell me if this trigger is right, or what to add / change about it??
Thank you!
 

FireBladesX

Eating my wings!
Reaction score
123
If you do that trigger anyways, it would basically just cast a fan of knives around you every time you move. So you could do that if you're having trouble. But...

I don't have world editor up, but I think you should do something like this...
Two triggers.

Trample Prime
E: Unit issues move order
C:
A:
Clear all units from Trample Group

Trample Active
E: Periodic event, .10 seconds, maybe?
C:
A:
Pick units within 250 of (units of type Horseman)
-If Picked Unit is in Trample Group equal to false, do Then, else do Else.
--Then:
---Unit - damage Picked Unit "X damage"
---Unit Group - Add Picked Unit unit to Trample Group
---Else

That should work, I think. If you're ordered to move rapidly however, it will do lots of damage, so you might want to put a cooldown time on the trigger.
 

XxShadyxX

I abused the rep system.
Reaction score
81
Yes periodic event. and that trigger leaks.. wait... nvm lmao XD
That should work but it might be too fast.. every .10 sec would mean all he needs to do is stand next to some1 and it would damage them really fasst. you need a condition to make sure your horsemen is moving not standing still
EDIT: wait i see you have the group there to do that. but that would mean he would needto keep clicking to make it work am i correct? there needs to be some type of pause before adding the picked unit to trample group.... becuase its doing it too fast. also this trigger would damage himself am i correct?
 

FireBladesX

Eating my wings!
Reaction score
123
Yeah, if you're having problems, Shady is right. Haste ftl, my trigger probably leaks somewhere and it will hurt yourself. You have to add conditions so that, when picking units in radius matching condition, make the condition:
Code:
[COLOR="DarkSlateBlue"]Matching unit[/COLOR] is enemy of [COLOR="DarkSlateBlue"](Horseman Player)[/COLOR] equal to [COLOR="DarkSlateBlue"]True[/COLOR].

Or something like that. I dunno.
The only problem is that unless the Horseman Player variable has an array for each player, it's not MPI.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top