Making Units Cast Custom Spells

jaybles169

New Member
Reaction score
2
How do you make enemy units cast custom spells (using GUI)? I've read the tut on the main page and I guess I couldn't get it to work. Does the unit just have to be given the ability in the object editor and then you order it to use a similar type of spell? If someone could post an example that'd be fantastic.
 

Firezy

New Member
Reaction score
14
Assuming the unit cant be killed in 1 hit

freehand

Event
A unit is attacked
Condition
Unit type of attacked unit equal to yourunit
Action
Order yourunit to <whatever your custom spell is based off of> targeting point/object etc.
 

lindenkron

You can change this now in User CP
Reaction score
102
Trigger:
  • DummyUnitCast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Storm Bolt
    • Actions
      • Set TempLocation = (Position of (Triggering unit))
      • Unit - Create 1 Dummy Unit for (Owner of (Triggering unit)) at TempLocation facing Default building facing degrees
      • Unit - Add Storm Bolt to (Last created unit)
      • Unit - Order (Last created unit) to Human Mountain King - Storm Bolt (Target unit of ability being cast)
      • Unit - Add a 2.00 second Water Elemental expiration timer to (Last created unit)
      • Custom script: call RemoveLocation (udg_TempLocation)


This would create a dummy unit that cast an additional Storm Bolt each time you cast storm bolt. Hope you get the idea ;)

Edit:
Does the unit just have to be given the ability in the object editor and then you order it to use a similar type of spell? If someone could post an example that'd be fantastic.
Every spell have a "Order String" in the ability. Set the order string to what ever you want (make sure the dummy unit don't have 2 spells with same order string on at a time) and order the unit to use the ability that fits that order string (in your custom ability).

-Lindenkron
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      • Ghan
        Administrator - Servers are fun

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top