• 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.

Casting spell via triggers?

Status
Not open for further replies.
  • Trigger
  • Events
    • Time - Every 60.00s econds of game-time
  • Conditions
  • Actions
    • Set Point1 = (Center of (Region))
    • Unit - Create 1 Dummy for Player at Point1 facing default building degrees
    • Unit - Hide (Last created unit)
    • Custom script: call IssuePointOrderLoc (GetLastCreatedUnit(), "clusterrockets", udg_Point1)
    • Unit - Add a 6.00 seconds generic expiration timer to (Last created unit)
    • Custom script: call RemoveLocation (udg_Point1)
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,285
Issue the unit the order the ability uses. Most ability do not allow you to change their governing order (one of the few exceptions is channal which does) and some item abilities do not have an order string (you must use an order ID which is an integer in that case) like the staff of illusion ability.

Do be warned that trigger issued orders to cast spells can result in unexpected behaviour like ignoring cooldown.
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
There are several ways to create "invisible-casting-spell-unit"

1. Go to Object Editor and edit a Dummy model yourself (this way is standard and works for a large project)

2. Use Pharaoh_'s way:

  • Unit - Create 1 Dummy for Player at Point1 facing default building degrees
    • Unit - Hide (Last created unit)
Hiding a unit will make the unit... well, invisible
But this method is NOT wise lol as it the trigger runs a 0.0016s/line
Also, this unit can be killed during initiation (wonder if there is an AOE-type spell being launched at the position..)

3. Use Ghost's way. This also might be killed

Conclusion: Your own way~
 
Level 1
Joined
Jun 14, 2010
Messages
4
Here is a solution which doesn't lag as much-you see, unit create and unit remove actions pemanently lag the game.
Every 60 seconds, Order Dummy to cast cluster rockets (9999999 range) at Centre of Region X.
If this won't work, move him.
 
Everyone knows Cluster Rocket default ability is from Tinker Hero
How can a Normal Unit casts Hero Spell ???
Explanation please~
(well, every dummy MUST be normal unit (Locust ability only works on Normal Unit eh?)

you could make cluster rocket a unit ability... after that, there's no more problem...
 
Status
Not open for further replies.
Top