Spawning two units exactly on each other

Zwiebelchen

You can change this now in User CP.
Reaction score
60
Errr, I know this problem sounds ridiculous, but I haven't found a solution even after two hours of trying ...

My problem is: I want a spellcaster to create a dummyunit on spellcast. So far no problem, but how can I make it that the dummyunit spawns exactly at the same spot as the spellcaster?

And please don't answer something like "set collision to 0". I'm not stupid. I already did that. I also tried to set the unit to "flying" and removed the collision of the caster temporary with the setUnitPathing() function. Nothing did work; the unit was always spawning beside the unit instead of the exact same location.
The dummy unit also has the same properties as the caster unit, same scaling, same flying height and min flying height.

My Spawning function uses "GetUnitX" and "GetUnitY" to detect the location of the caster. This can't be a problem either.
 

Andrewgosu

The Silent Pandaren Helper
Reaction score
716
Spawn the unit and set its position again.

Use "SetUnitX" and "SetUnitY" custom script.


e.g

- set tmpunit = whatunit
- custom script: call SetUnitX(udg_tmpunit)
- custom script: call SetUnitY(udg_tmpunit)
 

Kikac_NNGK

Well-Known Member
Reaction score
33
myb add to dummy the locust ability? This will cr8 at the spot of the spellcaster, cos the locust ability is working like: when a unit has locust ability this unit cant be selected or targeted and u can walk over him
 

Zwiebelchen

You can change this now in User CP.
Reaction score
60
Hm, obviously its not possible to spawn a unit directly above another one. I solved the problem by simply ordering the dummy unit to move to the position of the caster. Works fine like this, though it feels a little bit like a workaround.
 
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