• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

Dummy Unit Cast Rain of Chaos

Status
Not open for further replies.
Level 2
Joined
Oct 2, 2021
Messages
10
Hello all. I'm trying to make a dummy unit cast Rain of Chaos so that my hero doesn't need to channel the ability, however, I can't seem to get it to cast the ability (the default issue order targeting point trigger:
1639181735397.png
, unfortunately doesn't work because the spell activation string is none by default for rain of chaos). I've found a few forums that explain how to make it cast in different ways, but I can't figure out how to make it cast at the ability point my hero just casted at. The trigger is:
1639181071180.png

I just need a custom script that incorporates the order id of the spell and points it to cast at the target point of ability being cast, but I have no idea how to do it in custom script. I found the order id for Rain of Chaos (852237), but I can't figure out how to tell the dummy to rain of chaos the spell location. Any help is greatly appreciated!
 
Do this but change:
  • Custom script: call IssuePointOrderLoc(GetTriggerUnit(), "852237", udg_point)
to
  • Custom script: call IssuePointOrderLoc(GetLastCreatedUnit(), "rainofchaos", udg_point)
(If you are using the above one I posted, make sure you create Location Variable and name it "point" and use it to mark (target location of the ability being cast))

but with tests it seems that the "852237" doesn't work, but "rainofchaos" does.
Credits to this thread too.

To use a customscript there must be zero errors or it will fail on testing the map or using validate triggers:
1639193772233.png

Use validate to test if there are errors.

To make a custom script:
1639193742606.png

Find the script you want to copy and paste it in the script code area.
 
So your Dummy unit does not need to face the (Target point of ability being cast). A properly setup Dummy unit will cast a spell instantly without having to turn to face it's target.

When creating a Dummy unit, do it like this:
  • Copy and paste the Locust unit and use this as the base for the unit (Found under Undead - Special)
  • Set Attacks Enabled to None
  • Set Movement Type to None
  • Set Speed Base to 0
  • Remove Undead classification (99.99% of the time this is unnecessary)

Regarding Orders and Custom script, there are multiple versions of these Order functions so using the correct one can be tricky.
Here is what you're looking for:
vJASS:
IssuePointOrderLoc(whichUnit, order, whichLocation)
IssuePointOrderByIdLoc(whichUnit, order, whichLocation)
The first function here takes a "string" as the order.
The second function here takes an integer as the order.

And if you want to work with Coordinates instead of Points (locations) it's very similar:
vJASS:
IssuePointOrder(whichUnit, order, x, y)
IssuePointOrderById(whichUnit, order, x, y)
The first function takes a "string" as the order.
The second function takes an integer as the order.
 
Last edited:
Tested out the trigger and it works perfectly! Dummy unit is casting right where I need it to :) Thank you guys for the quick response. And thank you Uncle for explaining that. Maybe in the future I'll be able to figure something like this out with your guys' explanation and I won't need to post :thumbs_up:
 
Status
Not open for further replies.
Back
Top