hey,
So I made a spell that issues an order to the target -at lev 1 to move to a random point, and at lev2,3 to attack a random enemy of the caster . I also added to lev 3 of the spell "replace unit" so it would also take the target unit out of any control groups its in (with help from @Zwiebelchen ). when I cast level 3 on creeps a super weird bug happens (consistently) -
for every time casted it creates an invisible (even with detecting units), unselectable copy of the unit who chases the caster and attacks it (and only it) endlessly (or until the caster goes into a zeppelin or something or dies).
I changed the ability so it doesn't make neutral hostiles get replaced (which doesn't matter for them anyways...) but I was just curious if anyone has any idea what's causing this...
the ability:
thanks!
So I made a spell that issues an order to the target -at lev 1 to move to a random point, and at lev2,3 to attack a random enemy of the caster . I also added to lev 3 of the spell "replace unit" so it would also take the target unit out of any control groups its in (with help from @Zwiebelchen ). when I cast level 3 on creeps a super weird bug happens (consistently) -
for every time casted it creates an invisible (even with detecting units), unselectable copy of the unit who chases the caster and attacks it (and only it) endlessly (or until the caster goes into a zeppelin or something or dies).
I changed the ability so it doesn't make neutral hostiles get replaced (which doesn't matter for them anyways...) but I was just curious if anyone has any idea what's causing this...
the ability:
-
Voodoo Doll
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to Voodoo Doll
-
Actions
- Set Temptarget = (Target unit of ability being cast)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Owner of Temptarget) Equal to Neutral Hostile
-
Then - Actions
- If ((Temptarget is Sleeping) Equal to True) then do (Unit - Wake up Temptarget) else do (Do nothing)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Level of Voodoo Doll for (Triggering unit)) Greater than or equal to 2
-
Then - Actions
- Set Temp_PlayerGroup = (All enemies of (Triggering player))
- Custom script: set bj_wantDestroyGroup = true
- Unit - Order (Last replaced unit) to Attack (Random unit from (Units in (Playable map area) owned by (Random player from Temp_PlayerGroup)))
- Custom script: call DestroyForce(udg_Temp_PlayerGroup)
- Else - Actions
-
If - Conditions
- Set TempPoint = (Random point in (Playable map area))
- Unit - Order Temptarget to Move To TempPoint
- Custom script: call RemoveLocation (udg_TempPoint)
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Level of Voodoo Doll for (Triggering unit)) Equal to 1
-
Then - Actions
- Selection - Remove Temptarget from selection for (Owner of Temptarget)
- Set TempPoint = (Random point in (Playable map area))
- Unit - Order Temptarget to Move To TempPoint
- Custom script: call RemoveLocation (udg_TempPoint)
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Level of Voodoo Doll for (Triggering unit)) Equal to 2
-
Then - Actions
- Selection - Remove Temptarget from selection for (Owner of Temptarget)
- Custom script: set bj_wantDestroyGroup = true
- Unit - Order Temptarget to Attack (Random unit from (Units in (Playable map area) owned by (Random player from (All enemies of (Owner of (Triggering unit))))))
-
Else - Actions
- Set UnitType = (Unit-type of Temptarget)
- Unit - Replace Temptarget with a UnitType using The old unit's relative life and mana
- Set Temp_PlayerGroup = (All enemies of (Triggering player))
- Custom script: set bj_wantDestroyGroup = true
- Unit - Order (Last replaced unit) to Attack (Random unit from (Units in (Playable map area) owned by (Random player from Temp_PlayerGroup)))
- Special Effect - Create a special effect attached to the head of (Last replaced unit) using Objects\Spawnmodels\Other\ToonBoom\ToonBoom.mdl
- Custom script: call DestroyForce(udg_Temp_PlayerGroup)
- Special Effect - Destroy (Last created special effect)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Events
thanks!
Last edited: