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

Dummy unit refuses to cast spell

Status
Not open for further replies.
Level 7
Joined
May 15, 2009
Messages
192
I wanted to create a "multishot-look-alike" spell.
The spell is suppose to work like this: You cast a standard shockwave spell anywhere u want, then as you cast it, a dummy unit appears and casts two shockwaves close to the one you just fired. The shockwaves casted by the dummy are suppose to be on both sides of the original shockwave.

My problem is that the dummy won't quite cast the shockwave, not even one. The dummy spell has 0 cooldown and mana cost, range is ok. But nothing happends.

  • A unit starts the effect of an ability
  • Ability being cast equal to MyShockwave
  • Actions:
  • Create 1 Dummy for Owner of Triggering Unit at Position of Triggering Unit. facing (Facing angle of triggering unit)
  • Add MyShockwave(Special) to Last Created Unit
  • Add a 4.00 second Genetic expiration timer to Last Created Unit
  • Set Shockwave_Point[1] = Target point of ability being cast
  • Set SW_Dummy = Last Created Unit.
  • Order SW_Dummy to Orc Tauren Chieftain - Shockwave ((Target point of ability being cast) offset by 15.00 towards ((Facing of Triggering unit)) - 10.00 degrees)
  • wait - 0.02 seconds
  • Order SW_Dummy to Orc Tauren Chieftain - Shockwave ((Target point of ability being cast) offset by 15.00 towards ((Facing of Triggering unit)) + 10.00 degrees)
  • Custom Script: call RemovelLocation(udg_ShockWave_TargetPoint[1])[/

Sorry for the long trigger, but please help me out here. The dummy refuses to cast the spell.
 
Last edited:
Did you base it off the Chieftain's Shockwave? If not, use
  • Set ShockwavePoint1 = (Target point of ability being cast)
  • Set ShockwavePoint2 = (ShockwavePoint1 offset by 15.00 towards ((Facing of (Triggering unit)) - 10.00 degrees)
  • Custom script: call IssuePointOrderLoc (GetLastCreatedUnit(), "shockwave", udg_ShockwavePoint2)
  • Custom script: call RemoveLocation (udg_ShockwavePoint1)
  • Custom script: call RemoveLocation (udg_ShockwavePoint2)
Another issue to notice, waits under 0.27 are inaccurate, which means that 0.27 is the limit (however, 0.00 seconds seem to work too). Use a timer to recast it.
 
Level 7
Joined
May 15, 2009
Messages
192
I made the trigger just like you said Pharoh, added a 0.27 seconds countdown timer to be started, and used the
Set ShockwavePoint1 = (Target point of ability being cast)
Set ShockwavePoint2 = (ShockwavePoint1 offset by 15.00 towards ((Facing of (Triggering unit)) - 10.00 degrees)
Custom script: call IssuePointOrderLoc (GetLastCreatedUnit(), "shockwave", udg_ShockwavePoint2)
Custom script: call RemoveLocation (udg_ShockwavePoint1)
Custom script: call RemoveLocation (udg_ShockwavePoint2)

But still, no effect
 
1. Make sure the dummy's spell has no casting cost, because a unit with no mana cannot cost a 90 mana shockwave spell.

2. Removing the cooldown on the dummy spell would allow you to just entirely remove any need for waiting in the trigger, so I would recommend that.

3. In your posted trigger, put the variable assigning the last created unit before the expiration timer, then add the timer using the variable. It's more efficient.

4. Follow Pharoah_'s advice, and make sure that your polar offsets are also variables. You need to destroy the variable then reassign it. Memory leaks are important to destroy. Also, you leak the location where the unit is spawned at the very start of the actions.

  • Create 1 Dummy for Owner of Triggering Unit at Position of Triggering Unit. facing (Facing angle of triggering unit) ////// THIS LEAKS THE LOCATION. USE A VARIABLE THEN DESTROY THE LEAK
  • Add MyShockwave(Special) to Last Created Unit
  • Add a 4.00 second Genetic expiration timer to Last Created Unit
  • Set Shockwave_Point[1] = Target point of ability being cast
  • Set SW_Dummy = Last Created Unit. ////// MOVE THIS TO ABOVE THE EXPIRATION TIMER
  • Order SW_Dummy to Orc Tauren Chieftain - Shockwave ((Target point of ability being cast) offset by 15.00 towards ((Facing of Triggering unit)) - 10.00 degrees) ////// USE A VARIABLE FOR THE OFFSET, AND MAKE SURE TO CLEAR THE LEAK
  • wait - 0.02 seconds ////// REMOVE THIS ENTIRELY
  • Order SW_Dummy to Orc Tauren Chieftain - Shockwave ((Target point of ability being cast) offset by 15.00 towards ((Facing of Triggering unit)) + 10.00 degrees) ////// USE A VARIABLE FOR THE OFFSET, AND MAKE SURE TO CLEAR THE LEAK
  • Custom Script: call RemovelLocation(udg_ShockWave_TargetPoint[1])[/
 
Level 7
Joined
May 15, 2009
Messages
192
I tried everything(Btw, the Shockwave has had 0 mana cost and 0 casting time from the start)

Here is the map with the trigger, sorry for this taking soo long with fixing, maby I am just missing something stupid. Now you can see for yourselves.
 

Attachments

  • Multi Shockwave.w3x
    12.2 KB · Views: 43
Level 7
Joined
May 15, 2009
Messages
192
Thx a zillion for the Trigger mckill and thx for all else lended their knowledge. But one thing I would like to know mckill, what did I do wrong?

You know the old saying: "Give a man a fish, and he can eat for a day. Teach him how to fish, and he can eat for a lifetime." In other words, I want to learn triggering, rather than just have them given to me.
 
- No need for ghost ability, use locust only
- Make dummy model xxx.mdl or anything "NONE"
- Dont reduce the scale, it will affect the projectile scale also
- Make the unit fly instead of none
- Set base move speed to 1 (not a must)

But that's not the point, your triggering is not correct, the order in which your dummy cast, in short, just see what I did...
 
Status
Not open for further replies.
Top