custom abilities to use?

blooman

New Member
Reaction score
16
Trigger:
  • entangling
    • Events
      • Unit - A unit Is attacked
    • Conditions
    • Actions
      • Unit - Create 1 Keeper of the Grove for Player 1 (Red) at (Position of (Attacked unit)) facing Default building facing (270.0) degrees
      • Unit - Order (Last created unit) to Night Elf Keeper Of The Grove - Entangling Roots (Attacked unit)

Pretend I want the unit to use a custom ability like entangling Worms or something
is there a way to
Replacing the entangling Roots?
Unit - Order (Last created unit) to Night Elf Keeper Of The Grove - Entangling Roots (Attacked unit)
 

WolfieeifloW

WEHZ Helper
Reaction score
372
You put there whatever you based your custom spell off of.
If you based your "Entangling Worms" off of "Entangling Roots" then having "Entangling Roots" for the order would be correct.
 

blooman

New Member
Reaction score
16
You put there whatever you based your custom spell off of.
If you based your "Entangling Worms" off of "Entangling Roots" then having "Entangling Roots" for the order would be correct.
so if a unit had a different spell base on entangling roots and it used entangle roots would it work?
 

WolfieeifloW

WEHZ Helper
Reaction score
372
I'm pretty sure not.
The orders would collide and the game would either crash or randomly use one of the two abilities.
 

Azylaminaz

Vox Populi
Reaction score
91
Indeed, alternatively, you can use a JASS solution.

If you rather do it that way, here you go:
Cusom script: call IssueTargetOrderBJ(GetLastCreatedUnit(), "<raw code of ability>", GetAttackedUnitBJ())

or randomly use one of the two abilities.
It would pick the first one with the same order code. If you have two abilities of the same order code, it will use the first one added (in the Object Editor, Abilities of the unit).
 

blooman

New Member
Reaction score
16
Indeed, alternatively, you can use a JASS solution.

If you rather do it that way, here you go:
Cusom script: call IssueTargetOrderBJ(GetLastCreatedUnit(), "<raw code of ability>", GetAttackedUnitBJ())

It would pick the first one with the same order code. If you have two abilities of the same order code, it will use the first one added (in the Object Editor, Abilities of the unit).
what might be the raw code?
is the code next to the name when i do control D
 

Sim

Forum Administrator
Staff member
Reaction score
534
To sum it up, what matters is the order id. The name of the spell has no consequences.

Then, what also matters is to have only one spell per hero with a specific order id.
 

blooman

New Member
Reaction score
16
Try my suggestion(s):

JASS:
yours just sends me back to the main menu
Trigger:
  • Rawr
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Owner of (Attacking unit)) Equal to (==) Player 1 (Red)
    • Actions
      • Unit - Create 1 Footman for (Owner of (Attacking unit)) at (Position of (Attacked unit)) facing Default building facing (270.0) degrees
      • Unit - Add a 1.00 second Raise Dead expiration timer to (Last created unit)
      • Unit - Order (Last created unit) to Night Elf Keeper Of The Grove - Entangling Roots (Attacked unit)

this actually works even though my ability is rawr
 

WolfieeifloW

WEHZ Helper
Reaction score
372
Your trigger should actually go like this:
Trigger:
  • Rawr
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Owner of (Attacking unit)) Equal to Player 1 (Red)
    • Actions
      • Set tempPoint = (Position of (Triggering unit))
      • Unit - Create 1 Footman for (Owner of (Attacking unit)) at tempPoint facing Default building facing degrees
      • Unit - Add &lt;YOUR SPELL&gt; to (Last created unit)
      • Custom script: call IssueTargetOrder(GetLastCreatedUnit(), &#039;A001&#039;, GetTriggerUnit())
      • Unit - Remove &lt;YOUR SPELL&gt; from (Triggering unit)
      • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
      • Custom script: call RemoveLocation(udg_tempPoint)
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top